Vehicle spawn with more health
#1

How can i make that example all cop cars spawn with 2000.0 health ?
Reply
#2

PHP код:
new COPCAR;

public 
OnGameModeInit()
{
    
COPCAR CreateVehicle(5202109.17631503.045332.288782.28730160);
    return 
1;
}

public 
OnVehicleSpawn(vehicleid)
{
    if(
vehicleid == COPCAR) { SetVehicleHealth(vehicleid2000.0); }
    return 
1;

Reply
#3

https://sampwiki.blast.hk/wiki/SetVehicleHealth

Edit: Too late =(. Btw that is a Hydra not a cop car.
Reply
#4

thanks

but is there a way wich i can make it with GetPlayerVehicleID/GetVehicleModel ... and not using CreateVehicle ?
Reply
#5

pawn Код:
public OnVehicleSpawn(vehicleid)
{
    new model = GetVehicleModel(vehicleid);
    if(model > 595 && model < 600)
    {
        SetVehicleHealth(vehicleid, 2000);
    }
    return 1;
}
Reply
#6

ty i will try it now
Reply
#7

Quote:
Originally Posted by alpha500delta
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/SetVehicleHealth

Edit: Too late =(. Btw that is a Hydra not a cop car.
It was only an example ¬¬'

Source: https://sampwiki.blast.hk/wiki/CreateVehicle
Reply
#8

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...
Reply
#9

*bump*
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)