SetVehicleHealth weird issue.
#1

It fires up the vehicle. I don't have any idea what's wrong.

pawn Код:
if(!strcmp(cmd, "/fix",true))
    {
        if(PlayerInfo[playerid][AdminLevel] >= 3)
        {
        new Float:health, vehicleid =GetPlayerVehicleID(playerid);
        GetVehicleHealth(vehicleid, health);
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_GREY,"You have to be in a vehicle in order to repair.");
        SetVehicleHealth(vehicleid, 100);
        GameTextForPlayer(playerid, "Vehicle repaired", 1000, 5);
        }
        else return 0;
        return 1;
    }
Reply
#2

1000 is full health the vehicle starts burning at 249 health

Edit: Also you should use RepairVehicle(vehicleid); to fix the actual car like doors tires etc
Reply
#3

lol veh. Max health is a 1000
Reply
#4

Quote:
Originally Posted by xerox8521
Посмотреть сообщение
1000 is full health the vehicle starts burning at 249 health

Edit: Also you should use RepairVehicle(vehicleid); to fix the actual car like doors tires etc
This
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)