01.12.2010, 16:51
Okey, I would need a little bit of help.
I want to use 1 command to enable and disable a function for my server. But I dont remember
how I made it. So thats why Im asking
I want those 2 turn into 1 commands.
So instead of typing /enable and /disable I just want 1 commands like /boom :P
I want to use 1 command to enable and disable a function for my server. But I dont remember
how I made it. So thats why Im asking
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/Enable", cmdtext, true) == 0) { AMAZ[playerid] = 1; SendClientMessage(playerid,COLOR_GREEN,"Enabled"); return 1; } if (strcmp("/Disable", cmdtext, true) == 0) { SendClientMessage(playerid,COLOR_GREEN,"Disabled"); AMAZ[playerid] = 0; return 1; } return 0; }
So instead of typing /enable and /disable I just want 1 commands like /boom :P