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


Messages In This Thread
SetVehicleHealth dont work on first time? - by BMW_M3_GTR - 20.09.2009, 16:49
Re: SetVehicleHealth dont work on first time? - by ilikepie2221 - 20.09.2009, 17:07

Forum Jump:


Users browsing this thread: 2 Guest(s)