[HELP] Vehicle Health - 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 (
/showthread.php?tid=400104)
[HELP] Vehicle Health -
AchievementMaster360 - 16.12.2012
Hello guys today i need help with this basically i want all the vehicles that are the same model lets say LSPD Car have 5000 Health When they are spawned or if they are already spanwned
Re: [HELP] Vehicle Health -
LarzI - 16.12.2012
OnVehicleSpawn:
pawn Код:
if( GetVehicleModel( vehicleid ) == 596 ) //if the model of the vehicle spawned is in fact the LSPD
{
SetVehicleHealth( vehicleid, 5000 );
}
Re: [HELP] Vehicle Health -
zDevon - 17.12.2012
Remember that OnVehicleSpawn is called only when a vehicle
respawns. AKA that code will not be executed when the server is started.
Re: [HELP] Vehicle Health -
maramizo - 17.12.2012
pawn Код:
public OnGameModeInit()
{
//code
AllVehSetHealth();
return 1;
}
AllVehSetHealth()
{
for(new v; v<MAX_VEHICLES;v++)
{
SetVehicleHealth(v, 5000);
}
}