18.12.2014, 15:28
Use a timer for this
pawn Code:
new Advert[MAX_PLAYERS];
CMD:ad(playerid, param[])
{
if(Advert[playerid] ==1)return SendClientMessage(playerid,0x33AA33AA,"You're just allowed to advert each 30 seconds");
{
SetTimerEx("AdvertWait",30000,false,"i",playerid);
Advert[playerid] = 1;
//Make here the advert or whatever
return 1;
}
forward AdvertWait(playerid);
public AdvertWait(playerid)
{
Advert[playerid] = 0;
SendClientMessage(playerid,0x33AA33AA,"You're now again allowed to advertise your car.");
return 1;
}