Local and global commands for paths
DarkObscurity opened this issue ยท 0 comments
It would be nice if you could mark a command which is executed on path completion to be a "global" or "local" command.
When a path is added on a server, autorank will add the path to a table in the database (Table could be named "Paths" or something) and then it will use the name of the path as primary key, so each path name has to be unique. Then when a player completes a path and on a server, Autorank executes all commands listed under that path, it will mark the path as executed in the database by setting a 1 in the collum "Executed" in the table "paths" and it will add the value from "ServerName" (Which is defined in the config on each server) to the collum "Executed on" in the table "paths". Then when the player joins another server where Autorank is active on, it will check the database for the Executed collum, because it notices that the player has had a rank-up, and sees that the "global" commands have already been executed, so it will only execute the "local" commands.
With this feature, Autorank can grant gamemode specific rewards to players which makes ranking up even more fun!