SA-MP Forums Archive
If a player is in a vehicle and they die, the speedo still displays.. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: If a player is in a vehicle and they die, the speedo still displays.. (/showthread.php?tid=360358)



If a player is in a vehicle and they die, the speedo still displays.. - Dokins - 17.07.2012

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        TextDrawHideForPlayer(playerid,speed[playerid]);
        TextDrawHideForPlayer(playerid,fuel[playerid]);
        KillTimer(FuelSysTimer[playerid]);
        KillTimer(SpeedoSysTimer[playerid]);

    }
    Hospitalized[playerid] = 1;
    MySQL_SetInteger(PlayerSQLID[playerid], "HospitalTime", 30, "accounts");
    HospitalTime[playerid] = 30;
    dohospital(playerid);
   
    return 1;
}
That should hide it, right? But it doesn't.


Re: If a player is in a vehicle and they die, the speedo still displays.. - newbienoob - 17.07.2012

Try OnPlayerStateChange (PLAYER_STATE_WASTED)


Re: If a player is in a vehicle and they die, the speedo still displays.. - Dokins - 17.07.2012

Thanks.