Cooldown Timer for Garage CMD
#3

Quote:
Originally Posted by [NWA]Hannes
Посмотреть сообщение
pawn Код:
//At your global variables
new HasPlayerUserGarageCommand[MAX_PLAYERS];

//Under OnPlayerConnect
HasPlayerUserGarageCommand[MAX_PLAYERS] = 0;

//When the played uses the command
if(HasPlayerUserGarageCommand[playerid] == 0)
{
    HasPlayerUserGarageCommand[playerid] = 1;
    SetTimerEx("GarageCommandCooldown", YourTimerInMilliseconds, false, "i", playerid);
    //Garage stuff here
}
else return SendClientMessage(playerid, PutYourOwnColourHere, "Put your message here");

//Somewhere in your script
forward GarageCommandCooldown(playerid);
public GarageCommandCooldown(playerid)
{
    HasPlayerUserGarageCommand[playerid] = 0;
    return 1;
}
Just edit "YourTimerInMilliseconds", "PutYourOwnColourHere" and "Put your message here" to your own stuff..
I don't understand what's the HasPlayerUserGarageCommand is for.
Reply


Messages In This Thread
Cooldown Timer for Garage CMD - by Robert515 - 02.08.2014, 01:47
Re: Cooldown Timer for Garage CMD - by [NWA]Hannes - 02.08.2014, 01:54
Re: Cooldown Timer for Garage CMD - by Robert515 - 02.08.2014, 02:05
Re: Cooldown Timer for Garage CMD - by [NWA]Hannes - 02.08.2014, 02:27
Re: Cooldown Timer for Garage CMD - by Robert515 - 02.08.2014, 02:42
Re: Cooldown Timer for Garage CMD - by [NWA]Hannes - 02.08.2014, 04:32
Re: Cooldown Timer for Garage CMD - by Robert515 - 02.08.2014, 04:46
Re: Cooldown Timer for Garage CMD - by IceBilizard - 02.08.2014, 04:50
Re: Cooldown Timer for Garage CMD - by Robert515 - 02.08.2014, 04:52
Re: Cooldown Timer for Garage CMD - by IceBilizard - 02.08.2014, 04:53

Forum Jump:


Users browsing this thread: 1 Guest(s)