[SOLVED]Vehicle Health
#4

First of
Код:
if (VehicleHealt = 100))
assigning a value to variable inside an if statement?
Probably unintended statement so change it to
Код:
if (VehicleHealt == 100))
Secondly, don't forget that vehiclehealth is a float. I do not see any declaration of the variable vehiclehealt so my guess it is a global variable.
don't forget it make it a float and get the vehicle health.

Код:
new Float:VehicleHealt;//assuming you really meant VehicleHealt and not VehicleHealth
public OnPlayerEnterCheckpoint(playerid)
{
if (IsPlayerInRangeOfPoint(playerid, 7.0,cardelckp1))
{
GivePlayerMoney(playerid, 1000);
GetVehicleHealth(GetPlayerVehicleID(playerid),VehicleHealt);
RemovePlayerFromVehicle(playerid);
DisablePlayerCheckpoint(playerid);
GameTextForPlayer(playerid, "~y~You Completed The Deliver, Well Done!", 3000, 1);
{
if (VehicleHealt == 1000))//Change 1000 to max vehicle health, cuz I honestly do not know.
{
GivePlayerMoney(playerid, 300);
GameTextForPlayer(playerid, "~y~Great You Deliver It In Perfect Condition Bonus 300$!", 3000, 3);
}
return 1;
}
Reply


Messages In This Thread
[SOLVED]Vehicle Health - by eDz0r - 01.05.2010, 15:28
Re: [HELP]Vehicle Healt - by aircombat - 01.05.2010, 15:40
Re: [HELP]Vehicle Healt - by eDz0r - 01.05.2010, 15:42
Re: [HELP]Vehicle Healt - by maij - 01.05.2010, 15:46
Re: [HELP]Vehicle Healt - by eDz0r - 01.05.2010, 15:48
Re: [HELP]Vehicle Healt - by BurningSWA - 01.05.2010, 15:52
Re: [HELP]Vehicle Healt - by eDz0r - 01.05.2010, 16:10

Forum Jump:


Users browsing this thread: 1 Guest(s)