The timer only works for playerid0 ? - 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: The timer only works for playerid0 ? (
/showthread.php?tid=271711)
The timer only works for playerid0 ? -
lawonama - 25.07.2011
Well i have this:
pawn Код:
public freeze(playerid)
{
GameTextForPlayer(playerid,"~w~Materials loading: ~g~Complete!",2500,5);
SendClientMessage(playerid,COLOR_WHITE,"{FF0000}[Server:]{FFFFFF} Deliver your loading at the checkpoint!");
TruckerJob[playerid] = 2;
TogglePlayerControllable(playerid, 1);
SetPlayerCheckpoint(playerid, -520.6508,-542.0786,25.5234, 3.5);
return 1;
}
And it works only for playerid0. When someone else like ID1 or ID2 joins, wont work for him :/
Re: The timer only works for playerid0 ? -
iPLEOMAX - 25.07.2011
You should use
SetTimerEx.
Example:
pawn Код:
// function milisec repeat format value
SetTimerEx( "freeze", 5000, false, "d", playerid);