23.01.2013, 14:56
pawn Код:
new adtimer = 0;
forward ADTimer();
public ADTimer()
{
adtimer = 0;
return 1;
}
pawn Код:
CMD:ad(playerid, params[])
{
if(adtimer == 0)
{
if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /ad [chat]");
{
new s[100];
format(s,sizeof(s), "Advertisement: %s, Name: %s, Ph: %s", params, GetName(playerid), PlayerInfo[playerid][pPhone]);
SendClientMessageToAll(COLOR_GREEN, s);
adtimer = 1;
SetTimer("ADTimer", 60000, 0);
}
}
else
{
SendClientMessage(playerid, 0xFF0000FF, "You must wait 60 seconds before advertise something!");
}
return 1;
}