19.08.2012, 22:50
pawn Код:
public OnPlayerUpdate(playerid)
{
if(IsPlayerInAnyVehicle(playerid))
{
new Float:hp,vehicleid = GetPlayerVehicleID(playerid);
GetVehicleHealth(vehicleid,hp);
if(hp < 270)
{
SetVehicleHealth(vehicleid,280);
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, 0);
GameTextForPlayer(playerid, "~r~Vehicle Totalled", 3000, 4);
}
}
return 1;
}