timer don't work - 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 don't work (
/showthread.php?tid=266689)
timer don't work -
Amine_Mejrhirrou - 05.07.2011
hello all ,
i'm creating a new Gm , but i can't continue because i've got a problem
i've a timer that wont work ...
this is the code
Код:
public OnGameModeInit()
{
SetNameTagDrawDistance(100.0);
SetWorldTime(00);
EnableStuntBonusForAll(0);
Audio_SetPack("default_pack", true);
SetGameModeText("test");
DisableInteriorEnterExits();
AllowAdminTeleport(1);
AllowInteriorWeapons(1);
Counter = 1;
Round = 1;
SetWeather(9);
UsePlayerPedAnims();
AddPlayerClass(2,-145.9449, 1166.9469, 20.0000,269.1425,0,0,0,0,0,0);
SetTimer("reminder", 1000, true);
return 1;
}
Код:
public reminder()
{
GameTextForAll("~w~test", 10000, 3);
Counter = Counter+1;
if (Round == 1)
{
if (Counter == escape1)
{
GameTextForAll("~w~test success ", 10000, 3);
for(new I = 0; I < MAX_PLAYERS; I++)
{
if(IsPlayerConnected(I) && GetPlayerTeam(I) != 2)
{
SetPlayerCheckpoint(I, 383.6114, 245.9677, 4.0, 5.0);
return 1;
}
}
return 1;
}
return 1;
}
return 1;
}
Re: timer don't work -
Jefff - 05.07.2011
pawn Код:
public reminder()
{
GameTextForAll("~w~test", 10000, 3);
Counter = Counter+1;
if (Round == 1)
{
if (Counter == escape1)
{
GameTextForAll("~w~test success ", 10000, 3);
for(new I = 0; I < MAX_PLAYERS; I++)
{
if(IsPlayerConnected(I) && GetPlayerTeam(I) != 2)
{
SetPlayerCheckpoint(I, 383.6114, 245.9677, 4.0, 5.0);
}
}
}
}
return 1;
}
Re : timer don't work -
Amine_Mejrhirrou - 05.07.2011
nop ! that's not workin
Re : timer don't work -
Amine_Mejrhirrou - 05.07.2011
i've fixed it 