Car trobles
#1

Hello. I recently added a script, thank you to my fellow sampers for helping me, that shuts the vehicle off when reaches 400.0 or below health

I added a "SendClientMessage"
At first, it spammed my chat when the vehicle took damage
Second, after I moved it, it spammed my chat when I was in it and it was working.

Can someone fit
Код:
SendClientMessage(playerid, yellow, "Your vehicle has taken too much damage and refuses to move! ((Find a Mechanic))");
into
Код:
public OnPlayerUpdate(playerid)
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        new Float:fVehicleHealth; GetVehicleHealth(vehicleid, fVehicleHealth);

		if(fVehicleHealth <= 400.0)
        {
            new engine, lights, alarm, doors, bonnet, boot, objective;
            GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
            SetVehicleParamsEx(vehicleid, false, lights, alarm, doors, bonnet, boot, objective);
        }
    }

    return 1;
}
For me?
Reply


Messages In This Thread
Car trobles - by xXRealLegitXx - 15.02.2013, 04:38
Re: Car trobles - by Neil. - 15.02.2013, 04:42
Re: Car trobles - by xXRealLegitXx - 15.02.2013, 04:45
Re: Car trobles - by RajatPawar - 15.02.2013, 05:38
Re: Car trobles - by LarzI - 15.02.2013, 05:48

Forum Jump:


Users browsing this thread: 1 Guest(s)