Timer problem ???
#1

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?
Reply
#2

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;
}
?
Reply
#3

kiroloss i think it'll work
Reply
#4

Thanks :> it wurks
Reply


Forum Jump:


Users browsing this thread: