14.07.2012, 17:32
Everytime I exit a vehicle or am teleported away or something, the speedo and fuel meter remains.
The code I have is this:
Now, that should cover it, right?
The code I have is this:
pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
TextDrawHideForPlayer(playerid,speed[playerid]);
TextDrawHideForPlayer(playerid,fuel[playerid]);
return 1;
}
pawn Код:
if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT)
{
VehicleSQLID[vehicleid] = MySQL_GetValue(VehicleSQLID[vehicleid], "id", "vehicles");
MySQL_SetInteger(VehicleSQLID[vehicleid], "VehFuel", VehFuel[vehicleid], "vehicles");
if(EngineStartStatus[vehicleid] == 0)
{
KillTimer(SpeedoSysTimer[playerid]);
KillTimer(FuelSysTimer[playerid]);
}
TextDrawDestroy(enginestring);
TextDrawHideForPlayer(playerid, enginestring);
TextDrawHideForPlayer(playerid,speed[playerid]);
TextDrawHideForPlayer(playerid,fuel[playerid]);
}
return 1;
}