17.04.2009, 18:37
Just make a timer that respawns the glass...
on top:
in OnGameModeInIt:
whereever you create the glass do like this for each glass object:
and so on until you reach the last object.
in bottom of the script
on top:
pawn Код:
new glassobject[//the amount of glass objects you have + 1 goes here];
forward RespawnGlass();
pawn Код:
SetTimer("RespawnGlass",7000,1);
pawn Код:
glassobject[0] = CreateObject(................);
glassobject[1] = CreateObject(................);
glassobject[2] = CreateObject(................);
in bottom of the script
pawn Код:
public RespawnGlass()
{
for(new i; i < sizeof(glassobject); i++)
{
DestroyObject(glassobject[i]);
switch (i) {
case 0: glassobject[0] = CreateObject(//The first glass cordinates go here);
case 1: glassobject[1] = CreateObject(//The second glass cordinates go here);
case 2: //and so on....
}
}
return 1;
}