10.07.2011, 17:03
Hi people.I want to ask one thing.How to do when player with vehicle hit to the wall,he's car engine off?
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,0,lights,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid, 0xFF0000FF, "Your vehicle was turned off because you hit something.");
return 1;
}
new engine,lights,alarm,doors,bonnet,boot,objective;
if(GetVehicleHealth(vehicleid, &Float:health) < 700)
{
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,0,lights,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid, 0xFF0000FF, "Your vehicle was turned off because you hit something.");
return 1;
}