engine broke doesnt work
#6

The problem is, the timer is not sending playerid and vehicleid params.
I suggest you doing same
SetTimer("EngineBroke",200,1);
but, changing
Код:
public EngineBroke()
{
for(new i = 0; i<MAX_PLAYERS;i++){
if(IsPlayerConnected(i)){
if(GetPlayerState(i) == PLAYER_STATE_DRIVER) {
new Float:vhealth;
        new veh;
        veh = GetPlayerVehicleID(i);
        GetVehicleHealth(veh, vhealth);
        if(vhealth < 300.0)
        {
            ToggleEngine(veh, VEHICLE_PARAMS_OFF);
        }
}
}
}
}
*Code might be faulty because written in forums without compiler*
Reply


Messages In This Thread
engine broke doesnt work - by Pepino960 - 15.04.2014, 07:56
Re: engine broke doesnt work - by luis_mendoza - 15.04.2014, 08:46
Re: engine broke doesnt work - by iZN - 15.04.2014, 08:51
Re: engine broke doesnt work - by luis_mendoza - 15.04.2014, 08:53
Re: engine broke doesnt work - by iZN - 15.04.2014, 08:54
Re: engine broke doesnt work - by [WSF]ThA_Devil - 15.04.2014, 08:59
AW: engine broke doesnt work - by Pepino960 - 15.04.2014, 09:16

Forum Jump:


Users browsing this thread: 1 Guest(s)