SA-MP Forums Archive
Timer problem ??? - 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: Timer problem ??? (/showthread.php?tid=375443)



Timer problem ??? - [p3]pr0t0typ3 - 06.09.2012

Ok so Heres the code

OnPlayerConnect
Код:
TextDrawShowForPlayer(playerid, BGBLACK);
TextDrawShowForPlayer(playerid, TrinBG);
TextDrawShowForPlayer(playerid, FreeroamBG);
TextDrawShowForPlayer(playerid, BlueLineBG);
TextDrawShowForPlayer(playerid, YellowLineBG);
TextDrawShowForPlayer(playerid, VersionBG);
LastVehicle[playerid]=-1;
introtimer = SetTimer("TDhide", 5000, true);
Timer
Код:
forward TDhide(playerid);
public TDhide(playerid)
{
    TextDrawHideForPlayer(playerid, BGBLACK);
	TextDrawHideForPlayer(playerid, TrinBG);
	TextDrawHideForPlayer(playerid, FreeroamBG);
	TextDrawHideForPlayer(playerid, BlueLineBG);
	TextDrawHideForPlayer(playerid, YellowLineBG);
	TextDrawHideForPlayer(playerid, VersionBG);
    return 1;
}
The problem is the textdraws only get hidden for first player to join (Id 0) and im not sure why.Any help?


Re: Timer problem ??? - Kirollos - 06.09.2012

pawn Код:
//onplayerconnect
TextDrawShowForPlayer(playerid, BGBLACK);
TextDrawShowForPlayer(playerid, TrinBG);
TextDrawShowForPlayer(playerid, FreeroamBG);
TextDrawShowForPlayer(playerid, BlueLineBG);
TextDrawShowForPlayer(playerid, YellowLineBG);
TextDrawShowForPlayer(playerid, VersionBG);
LastVehicle[playerid]=-1;
SetTimerEx("TDhide", 5000, false, "i", playerid);

//anywhere

forward TDhide(playerid);
public TDhide(playerid)
{
    TextDrawHideForPlayer(playerid, BGBLACK);
    TextDrawHideForPlayer(playerid, TrinBG);
    TextDrawHideForPlayer(playerid, FreeroamBG);
    TextDrawHideForPlayer(playerid, BlueLineBG);
    TextDrawHideForPlayer(playerid, YellowLineBG);
    TextDrawHideForPlayer(playerid, VersionBG);
    return 1;
}
?


Re: Timer problem ??? - deltapro - 06.09.2012

kiroloss i think it'll work


Re: Timer problem ??? - [p3]pr0t0typ3 - 06.09.2012

Thanks :> it wurks