Help in scripting..
#3

Use a boolean array to check, first declare a global one in the top of your script:
pawn Код:
new bool:MinigunDM[MAX_PLAYERS];
A boolean can have 2 values, true/false (set to false by default), so in your command, set it to true.
pawn Код:
CMD:minigundm(playerid, params[])
{
    if(MinigunDM[playerid]) return SendClientMessage(playerid, -1, "Type /leave to leave minigun DM");
    // If MinigunDM is set to true, stop the rest of the cmd using "return", and send the player a message
    MinigunDM[playerid] = true;
    // If the command hasn't been stopped, it will set MinigunDM to true
    // Other codes
}
And then set it to false in your /leave command if it's set to true.
Reply


Messages In This Thread
Help in scripting.. - by fuckingcruse - 12.03.2015, 13:49
Re: Help in scripting.. - by ATGOggy - 12.03.2015, 13:55
Re: Help in scripting.. - by CalvinC - 12.03.2015, 14:00
Re: Help in scripting.. - by fuckingcruse - 12.03.2015, 14:06
Re: Help in scripting.. - by ATGOggy - 12.03.2015, 14:09
Re: Help in scripting.. - by CalvinC - 12.03.2015, 14:15
Re: Help in scripting.. - by fuckingcruse - 12.03.2015, 14:16

Forum Jump:


Users browsing this thread: 2 Guest(s)