Vehicle spawn with more 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Vehicle spawn with more health (
/showthread.php?tid=266973)
Vehicle spawn with more health -
Jimbo01 - 06.07.2011
How can i make that example all cop cars spawn with 2000.0 health ?
Re: Vehicle spawn with more health -
Shadoww5 - 06.07.2011
PHP код:
new COPCAR;
public OnGameModeInit()
{
COPCAR = CreateVehicle(520, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1, 60);
return 1;
}
public OnVehicleSpawn(vehicleid)
{
if(vehicleid == COPCAR) { SetVehicleHealth(vehicleid, 2000.0); }
return 1;
}
Re: Vehicle spawn with more health -
alpha500delta - 06.07.2011
https://sampwiki.blast.hk/wiki/SetVehicleHealth
Edit: Too late =(. Btw that is a Hydra not a cop car.
AW: Vehicle spawn with more health -
Jimbo01 - 06.07.2011
thanks
but is there a way wich i can make it with GetPlayerVehicleID/GetVehicleModel ... and not using CreateVehicle ?
Re: Vehicle spawn with more health -
Madsen - 06.07.2011
pawn Код:
public OnVehicleSpawn(vehicleid)
{
new model = GetVehicleModel(vehicleid);
if(model > 595 && model < 600)
{
SetVehicleHealth(vehicleid, 2000);
}
return 1;
}
AW: Vehicle spawn with more health -
Jimbo01 - 06.07.2011
ty i will try it now
Re: Vehicle spawn with more health -
Shadoww5 - 06.07.2011
Quote:
Originally Posted by alpha500delta
|
It was only an
example ¬¬'
Source:
https://sampwiki.blast.hk/wiki/CreateVehicle
AW: Re: Vehicle spawn with more health -
Jimbo01 - 07.07.2011
Quote:
Originally Posted by Madsen
pawn Код:
public OnVehicleSpawn(vehicleid) { new model = GetVehicleModel(vehicleid); if(model > 595 && model < 600) { SetVehicleHealth(vehicleid, 2000); } return 1; }
|
I tested it.. it dont works.. hm...
AW: Vehicle spawn with more health -
Jimbo01 - 07.07.2011
*bump*