03.05.2012, 18:30
Hey,
heres my setup.
I have textdraws for a /fixveh function to show up when the car is fixed and then disappear in 4 seconds.
well its disappearing before my eyes can see it, so I dont think the timer is working.
I have tested it without the textdrawhide lines and I saw the shown textdraws so I know for a fact it is the set timer function not waiting like its supposed to.
heres my setup.
I have textdraws for a /fixveh function to show up when the car is fixed and then disappear in 4 seconds.
well its disappearing before my eyes can see it, so I dont think the timer is working.
pawn Код:
if (!strcmp("/fixveh", cmdtext, true))
{
if(IsPlayerInAnyVehicle(playerid))
{
new VehicleID = GetPlayerVehicleID(playerid);
RepairVehicle(VehicleID);
///// SHOW /////
TextDrawShowForPlayer(playerid,Text:Textdraw14);
TextDrawShowForPlayer(playerid,Text:Textdraw15);
SetTimerEx("delay",4000,false,"i",playerid); // delay is just a "dummy" function that returns 1
///// HIDE /////
TextDrawHideForPlayer(playerid,Text:Textdraw14);
TextDrawHideForPlayer(playerid,Text:Textdraw15);
return 1;
}
else
{
return 1;
}
}