15.02.2013, 04:38
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
into
For me?
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))");
Код:
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;
}


