31.07.2014, 21:39
pawn Код:
// Outside any callback
new bool: NewbieChatCooldown[MAX_PLAYERS];
// Top of your command or wherever, anywhere but before the actual code
if(NewbieChatCooldown[playerid]) return SendClientMessage(playerid, -1, "You can't talk in newbie chat yet!");
// After they have sent a message, do this:
NewbieChatCooldown[playerid] = true;
SetTimerEx("NewbieChatCDExpire", 30000, false, "i", playerid);
// Anywhere outside of a callback
forward NewbieChatCDExpire(playerid);
public NewbieChatCDExpire(playerid);
{
NewbieChatCooldown[playerid] = false;
return true;
}