10.11.2011, 23:18
I've just noticed a flaw in my code, wasn't thinking when I coded it:
pawn Код:
new rcd[MAX_PLAYERS];
CMD:report(playerid,o[])
{
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] || gettime() >= rcd[playerid] + 15)
{
rcd[playerid] = gettime();
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!");
}
return true;
}