17.04.2009, 23:20
Quote:
Originally Posted by Infamous
In your script you could add a variable to turn the command on or off.
example: Код:
if(strcmp(cmdtext, "/cash", true) == 0 && CmdInUse == 1) { GivePlayerMoney(playerid, 100000); return 1; } Код:
if(strcmp(cmdtext, "/Cashon", true) == 0) { CmdInUse[playerid] =1; return 1; } Код:
if(strcmp(cmdtext, "/Cashoff", true) == 0) { CmdInUse[playerid] =0; return 1; } |
Код:
if(strcmp(cmdtext, "/cash", true) == 0 && CmdInUse[playerid] == 1) { GivePlayerMoney(playerid, 100000); return 1; }
Код:
if(strcmp(cmdtext, "/Cashon", true) == 0) { CmdInUse[playerid] =1; return 1; }
Код:
if(strcmp(cmdtext, "/Cashoff", true) == 0) { CmdInUse[playerid] =0; return 1; }