Vehicle Health
#1

Hello ,i just wanted to ask if there is anyway to set the vehicles health so i can set the PD Factions health from 1000 to any other value ,i saw a lot of other server doing it ,so if you know how ,post it please
Reply
#2

Use this function.

pawn Код:
SetVehicleHealth(vehicleid, Float:health);
So for example; if you have something like this under OnGameModeInit().
pawn Код:
LSPDCar[0] = CreateVehicle(relevant data);
You can set that vehicle's health to 10000 if you do this;
pawn Код:
SetVehicleHealth(LSPDCar[0], 10000);
Reply
#3

i only found this
pawn Код:
LSPDVehicles[0] = AddStaticVehicleEx(596,1602.0660,-1683.9678,5.6124,90.3080,0,1, VEHICLE_RESPAWN);
what should i do to change the health of it ?
Reply
#4

Change it to
pawn Код:
LSPDVehicles[0] = CreateVehicle(596, 1602.0660, -1683.9678, 5.6124, 90.3080, 0, 1, VEHICLE_RESPAWN);
Then set the health
pawn Код:
SetVehicleHealth(LSPDVehicles[0], 10000);
Reply
#5

SetVehicleHealth(LSPDVehicles[0], 10000);

UnderGamemodeInit
Reply
#6

Thanks for helping guys ,i got it working now
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)