23.07.2013, 08:51
i have a problem,i do how you say:
but the problem is that when i enter in car,after 5 seconds the textdraw appear but not disappear
PHP код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(IsPlayerInRangeOfPoint(playerid,100,-66.5552,-1128.7533,1.0781) && IsATruck(vehicleid) && !IsTrailerAttachedToVehicle(vehicleid))
{
//TextDrawShowForPlayer(playerid, Textdraw020);
_timer = SetTimer("text_timer", 5000, 0);
}
PHP код:
new _timer;
new bool: shown = false;
forward public text_timer();
public text_timer()
{
switch(shown)
{
case true:
{
TextDrawHideForAll(Textdraw020);
shown = !shown;
}
case false:
{
TextDrawShowForAll(Textdraw020);
shown = !shown;
}
}
return 1;
}