SA-MP Forums Archive
[Help] Vehicle Health For Police Cars - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Help] Vehicle Health For Police Cars (/showthread.php?tid=416711)



[Help] Vehicle Health For Police Cars - AchievementMaster360 - 18.02.2013

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


Re: [Help] Vehicle Health For Police Cars - Kontrol - 18.02.2013

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.


Re: [Help] Vehicle Health For Police Cars - AchievementMaster360 - 18.02.2013

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


Re: [Help] Vehicle Health For Police Cars - Scenario - 18.02.2013

SetVehicleHealth()


Re: [Help] Vehicle Health For Police Cars - Kontrol - 18.02.2013

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


Re: [Help] Vehicle Health For Police Cars - Jewell - 18.02.2013

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)