[Help] Vehicle Health For Police Cars
#1

Hello, I wanted to know how i can set the health for all police vehicles to 5000, Thank you for your help
Reply
#2

Pretty sure the maximum health for a vehicle is 1000 if im correct, setting it too 5000 doesent mean it can take 5x the damage you just need to set it back to 1000 when its damaged.
Reply
#3

Quote:
Originally Posted by Kontrol
Посмотреть сообщение
Pretty sure the maximum health for a vehicle is 1000 if im correct, setting it too 5000 doesent mean it can take 5x the damage you just need to set it back to 1000 when its damaged.
I seen in other servers the police cars have 5000 health though
Reply
#4

SetVehicleHealth()
Reply
#5

Quoted from samp wiki. "Note: Full vehicle health is 1000."
thats a server side calculation the max vehicle health it 1000.

https://sampwiki.blast.hk/wiki/SetVehicleHealth
Reply
#6

thats true, vehicle Full health is 1000. but even we can set any vehicle health value (like 5000 or more) .
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
   if(GetVehicleModel(vehicleid) == 596/*|| GetVehicleModel(vehicleid) == other police car ids */)
    {
        SetVehicleHealth(vehicleid,5000);
    }
    return 1;
}
improve above code yourself for your script. (you should block vehicle health refill when player re-enter the car)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)