SetVehicleHealth dont work on first time?
#1

Hi guys!

I am having this problem.When i start server and boxville is spawned it isnt damaged, but when it is destroyed and respawns, it is damaged.I dont get it! I have on OnGameModeInit that the boxville should be damaged, but it isnt.... why?

This is my code:

Код:
new box;

public damagebox()
{
SetVehicleHealth(box,250);
}

public OnGameModeInit()
{
box=AddStaticVehicle(498,-2252.0337,2285.1367,4.8855,89.2817,3,3); // boxville
SetTimer("damagebox",1000,0);
}

public OnVehicleSpawn(vehicleid)
{
if(vehicleid==box)
	  {
	  SetTimer("damagebox",1000,0);
	  }
}
Reply
#2

What you've done there is everytime box spawns, it blows up every second.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)