Little question about yTimers.
#6

Sorry but that didn't work the way I expected, I've done everything the way I should and heres what I got.
pawn Код:
CMD:report(playerid,o[])
{
new rcd[MAX_PLAYERS];
new ctime = gettime();
new msg[80],str[128],pname[MAX_PLAYER_NAME];

if(sscanf(o,"s[80]",msg)) return SCM(playerid,COLOR_LIGHTBLUE,"USAGE:/report [text]");
if(!rcd[playerid] || rcd[playerid] >= ctime + 15)
{
rcd[playerid] = ctime;
GetPlayerName(playerid,pname,sizeof(pname));
format(str,sizeof(str),"Report from %s(%i): %s",pname,playerid,msg);
SAM(COLOR_AQUA,str);
SCM(playerid,COLOR_YELLOW,"Your report has been sent to the online administrators.");
}

else
{
SCM(playerid,COLOR_LIGHTBLUE,"You must wait 15 seconds in order to send another report!");
}
I still can spam the command, any solution?
Reply


Messages In This Thread
Little question about yTimers. - by moadi - 10.11.2011, 22:37
Re: Little question about yTimers. - by Norn - 10.11.2011, 22:39
Re: Little question about yTimers. - by moadi - 10.11.2011, 22:45
Re: Little question about yTimers. - by Norn - 10.11.2011, 22:50
Re: Little question about yTimers. - by moadi - 10.11.2011, 23:01
Re: Little question about yTimers. - by moadi - 10.11.2011, 23:12
Re: Little question about yTimers. - by Norn - 10.11.2011, 23:13
Re: Little question about yTimers. - by moadi - 10.11.2011, 23:15
Re: Little question about yTimers. - by Norn - 10.11.2011, 23:18
Re: Little question about yTimers. - by moadi - 10.11.2011, 23:20

Forum Jump:


Users browsing this thread: 1 Guest(s)