01.05.2010, 15:46
First of
assigning a value to variable inside an if statement?
Probably unintended statement so change it to
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.
Код:
if (VehicleHealt = 100))
Probably unintended statement so change it to
Код:
if (VehicleHealt == 100))
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; }