09.05.2014, 12:29
You may respawn it right after it gets created, or use SetVehicleHealth.
You can also create a function that automatically Add vehicles, then set their health.
Now just use:
You can also create a function that automatically Add vehicles, then set their health.
pawn Код:
stock AddReinforcedCar(modelid,Float:spawn_x,Float:spawn_y,Float:spawn_z,Float:angle,color1,color2,respawn_delay = 0,Float:health = 100.0);
{
new carid = AddStaticVehicleEx(modelid,spawn_x,spawn_y,spawn_z,angle,color1,color2,respawn_delay);
SetVehicleHealth(carid,health);
return carid;
}
pawn Код:
AddReinforcedCar(modelid,Float:spawn_x,Float:spawn_y,Float:spawn_z,Float:angle,color1,color2,respawn_delay,Float:health); // Where health are optional.