30.09.2010, 22:55
Try debugging..
For example, say the last thing it would print in your server log is "d" then we can assume it's crashing at TextDrawSetString(Dash[playerid], tstring);
pawn Код:
public DashUpdate(playerid)
{
print("a");
new State = GetPlayerState(playerid);
if(State == PLAYER_STATE_DRIVER && IsPlayerInAnyVehicle(playerid))
{
print("b");
new vehid = GetPlayerVehicleID(playerid);
new estring[7];
switch(EngineStatus[vehid])
{
case 0: estring = "Off";
case 1: estring = "On";
default: estring = "Broken";
}
print("c");
new tstring[300];
format(tstring,sizeof(tstring),"Engine: %s~n~Fuel: %d~n~Speed: %d KM" , estring, Fuel[vehid], GetVehicleSpeed(vehid));
print("d");
TextDrawSetString(Dash[playerid], tstring);
print("e");
TextDrawHideForPlayer(playerid,Dash[playerid]);
TextDrawShowForPlayer(playerid,Dash[playerid]);
}
else
{
print("f");
TextDrawHideForPlayer(playerid,Dash[playerid]);
KillTimer(DashUpdate(playerid));
print("g");
}
return 1;
}