04.06.2010, 19:32
These textdraws below doesn't seem to want to hide when I exit a vehicle.
Here's the script to show them:
Are they bugged or did I mess up?
pawn Код:
if(newstate == PLAYER_STATE_ONFOOT)
{
TextDrawHideForPlayer(playerid, Textdraw0);
TextDrawHideForPlayer(playerid, Textdraw1);
TextDrawHideForPlayer(playerid, Textdraw2);
TextDrawHideForPlayer(playerid, Textdraw3);
TextDrawHideForPlayer(playerid, Textdraw5);
TextDrawHideForPlayer(playerid, Textdraw6);
TextDrawHideForPlayer(playerid, Textdraw7);
TextDrawHideForPlayer(playerid, Textdraw8);
TextDrawHideForPlayer(playerid, Textdraw9);
TextDrawHideForPlayer(playerid, Textdraw14);
TextDrawHideForPlayer(playerid, SpeedoSpeed);
TextDrawHideForPlayer(playerid, SpeedoFuel);
TextDrawHideForPlayer(playerid, SpeedoDoors);
TextDrawHideForPlayer(playerid, SpeedoHealth);
KillTimer(updatespeedtimer[playerid]);
KillTimer(updatehealthtimer[playerid]);
KillTimer(updatefueltimer[playerid]);
TogglePlayerControllable(playerid, 1);
}
pawn Код:
if(newstate == PLAYER_STATE_DRIVER)
{
new vehid = GetPlayerVehicleID(playerid);
new fuelrandom;
fuelrandom = 75+random(25);
if(GotFuel[vehid] == 0)
{
Fuel[vehid] = fuelrandom;
GotFuel[vehid] = 1;
}
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw3);
TextDrawShowForPlayer(playerid, Textdraw5);
TextDrawShowForPlayer(playerid, Textdraw6);
TextDrawShowForPlayer(playerid, Textdraw7);
TextDrawShowForPlayer(playerid, Textdraw8);
TextDrawShowForPlayer(playerid, Textdraw9);
TextDrawShowForPlayer(playerid, Textdraw14);
TextDrawShowForPlayer(playerid, SpeedoDoors);
TextDrawShowForPlayer(playerid, SpeedoHealth);
TextDrawShowForPlayer(playerid, SpeedoFuel);
TextDrawShowForPlayer(playerid, SpeedoSpeed);
updatespeedtimer[playerid] = SetTimerEx("UpdateSpeed", 250, true, "%d", playerid);
updatehealthtimer[playerid] = SetTimerEx("UpdateHealth", 650, true, "%d", playerid);
updatefueltimer[playerid] = SetTimerEx("UpdateFuel", 25000, true, "%d", playerid);