Timer problem / question - 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: Timer problem / question (
/showthread.php?tid=88125)
Timer problem / question -
Jakku - 24.07.2009
I have following timer:
pawn Код:
SetTimer("Timer",1800000,false);
pawn Код:
public Timer(playerid)
{
SendClientMessage(playerid, COLOR_YELLOW, "xD");
GivePlayerMoney(playerid, 15000);
KillTimer(Timer(playerid));
}
How to make it it comes only ONCE, when "xD" has appeared it doesn't repeat, Killtimer didn't take effect. Please help me
Re: Timer problem / question -
refshal - 24.07.2009
Try this:
pawn Код:
lol = SetTimerEx("Timer", 1800000, 0, "i", playerid);
pawn Код:
public Timer(playerid)
{
SendClientMessage(playerid, COLOR_YELLOW, "xD");
GivePlayerMoney(playerid, 15000);
KillTimer(lol);
return 1;
}
Re: Timer problem / question -
Jakku - 24.07.2009
Quote:
Originally Posted by еddy
Try this:
pawn Код:
lol = SetTimerEx("Timer", 1800000, 0, "i", playerid);
pawn Код:
public Timer(playerid) { SendClientMessage(playerid, COLOR_YELLOW, "xD"); GivePlayerMoney(playerid, 15000); KillTimer(lol); return 1; }
|
Actually that's not right. Timer's name is here: SetTimerEx("
-> ThisTimer", 1800000, 0, "i", playerid);. There cannot be made another variable :/