Setvehiclehealth globally?
#1

Hello,i need to set to ALL vehicles health to 970.

How?
Reply
#2

pawn Code:
for(new i=0;i<MAX_VEHICLES;i++)
{
   SetVehicleHealth(i,970);
}
Reply
#3

Thank you,i need to place that on OnVehicleSpawn?
Reply
#4

Yes,and when you respawn all cars,their health will be 970.
Reply
#5

Nope,doesn't work,their health is always 1000.
Reply
#6

pawn Code:
public OnVehicleSpawn(vehicleid)
{
    SetVehicleHealth(vehicleid,970);
    return 1;
}
This should work, since every car calls this function atleast once.
Reply
#7

Ah now it works,thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)