Car HP
#1

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.
Код:
 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;
}
Thx for all help
Reply


Messages In This Thread
Car HP - by sanandreas - 28.03.2009, 23:58
Re: Car HP - by BMUK - 29.03.2009, 00:08
Re: Car HP - by sanandreas - 29.03.2009, 00:54

Forum Jump:


Users browsing this thread: 1 Guest(s)