Cvolton / GMDprivateServer

Geometry Dash Private Server
GNU General Public License v3.0
396 stars 293 forks source link

how to add a my command? (thx google translate) #218

Open ghost opened 6 years ago

ghost commented 6 years ago

I want to add my command, but idk. (Command.php)

fakemancat commented 6 years ago

ahahahaha, really? Cristal? :kappa:

EndNation commented 6 years ago

Just copy one of the commands and paste it then change them or else tell us what command u want and its functionality

fIuffy commented 6 years ago
if(substr($comment,0,8) == '!yourcmd' AND $gs->checkPermission($accountID, $permissionhere)){
    if(!is_numeric($levelID)){
        return false;
    }
    // do what you want your command to do
    /* where it says ($comment,0,8) replace
    the 8 with how many characters the command is (including the !)

    permissionhere should be replaced with the permission you would like the user to have in order to do the command.
    */
    return true;
}