SetTimerEx isn't starting. - 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)
+--- Thread: SetTimerEx isn't starting. (
/showthread.php?tid=424682)
SetTimerEx isn't starting. -
Jack.7331 - 23.03.2013
I've been trying to fix this for hours; I've re-done it several times to no avail. Could anyone please tell me what is wrong with this? It's probably me being stupid, again...
Код:
if(pInfo[playerid][pTutorial] == 0)
{
SetSpawnInfo(playerid, 0, 0, 854.4556,-604.7520,18.4219, 0, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
SetPlayerCameraPos(playerid, 857.8197,-577.9849,18.2964);
SetPlayerCameraLookAt(playerid, 855.6580,-593.2801,17.9993);
TogglePlayerControllable(playerid, 0);
-- bunch of SendClientMessages
pInfo[playerid][pTutorial] = 1;
SetTimerEx("Tutorial1", 8000, false, "d", playerid);
}
Код:
forward Tutorial1(playerid);
public Tutorial1(playerid)
{
SetPlayerPos(playerid, -105.0782,-337.5756,1.6060);
SetPlayerCameraPos(playerid, -96.6556,-395.3662,44.1454);
SetPlayerCameraLookAt(playerid, -89.5856,-330.3827,32.2500);
TogglePlayerControllable(playerid, 0);
-- bunch of SendClientMessages
pInfo[playerid][pTutorial] = 2;
SetTimerEx("Tutorial2", 8000, false, "d", playerid);
return 1;
}
The timer isn't being called or something, because I placed a print underneath the timer and that wasn't appearing in the console.
Re: SetTimerEx isn't starting. -
dusk - 23.03.2013
I don't see a problem with the timers. Are you sure that pInfo[playerid][pTutorial] is 0?
Re: SetTimerEx isn't starting. -
Jack.7331 - 23.03.2013
Yes, it's the Tutorial1 that isn't being called.
E: The timers are on the lines ABOVE the settimer - should I move them?