SA-MP Forums Archive
[HELP] Seconds beteween each post ( newbie / ad ) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Seconds beteween each post ( newbie / ad ) (/showthread.php?tid=144312)



[HELP] Seconds beteween each post ( newbie / ad ) - andershh - 26.04.2010

How can i add waiting time between each " newbie " post or each " Adervisement " ?

like if you just posted and newbie and you wanna post a new one 1 sec after it says " You have to wait 50 seconds "
Same at adervisement


Re: [HELP] Seconds beteween each post ( newbie / ad ) - johnnyc - 26.04.2010

add this under your /ad command,
Код:
if ((GetTickCount() - AdTimer[playerid]) < 50000)
{
SendClientMessage(playerid, COLOR_GRAD2, "Sorry, 1 ad every 50 seconds");
return 1;
}



Re: [HELP] Seconds beteween each post ( newbie / ad ) - RyDeR` - 26.04.2010

At the top of ur command: >>
pawn Код:
if(GetPVarInt(playerid, "CMDSpam") > GetTickCount()) return SendClientMessage(playerid, 0xFFFFFFFF, ">> Do not command-spam!");
SetPVarInt(playerid, "CMDSpam"), GetTickCount()+3000);