28.03.2009, 23:58
Hi all,
I have this problem with this code. I want the code to get the cars health so that when the car is about to blow up they get a message and they get kicked out of the car.
Thx for all help
I have this problem with this code. I want the code to get the cars health so that when the car is about to blow up they get a message and they get kicked out of the car.
Код:
Above OnGameModeInit
forward Carhp(playerid, vehicleid);
new car;
public Carhp(playerid, vehicleid)
{
car = GetPlayerVehicleID(playerid);
new Float:vehhp = GetVehicleHealth(car,vehhp);
if(vehhp <= 250)
{
SendClientMessage(playerid,COLOR_BLUE,"GET OUT!");
RemovePlayerFromVehicle(playerid);
}
return 1;
}

