Command help :)
#2

Alright i'll give you few ideas..
first , on top :
PHP код:
new cmdpossible[MAX_PLAYERS
OnGameModeInit()
PHP код:
cmdpossible[playerid] = 1
OnPlayerConnect :
PHP код:
cmdpossible[playerid] = 1
Now when the player types the command, you need to add this :
PHP код:
if(cmdpossible[playerid] == 1)
{
// your codes here etc.. then add the following :
cmdpossible[playerid] = 0;
SetTimerEx("waittimer"300000false"i"playerid); //here i made it for you 5minutes you can change it.
}
else
{
SendClientMessage(playeridCOLOR_RED"You need to wait 5 minutes before using this command again." 
Now somewhere but not under any callback :
PHP код:
forward waittimer(playerid);
public 
waittimer(playerid)
{
   
cmdpossible[playerid] = 1;

Just edit it if needed, i just gave few ideas on how to make it. Good luck!
Reply


Messages In This Thread
Command help :) - by NexySamp - 11.07.2015, 19:47
Re: Command help :) - by Moudix - 11.07.2015, 22:44
Re : Command help :) - by KillerDVX - 12.07.2015, 02:40
Re: Command help :) - by NexySamp - 12.07.2015, 07:51
Re: Re : Command help :) - by NexySamp - 12.07.2015, 13:24
Re : Command help :) - by KillerDVX - 12.07.2015, 14:55

Forum Jump:


Users browsing this thread: 1 Guest(s)