20.09.2009, 16:49
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:
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);
}
}

