Timer help
#3

Put this under OnGameModeInIt
pawn Код:
SetTimer("CloseNOpen",3000,1);//change the 3000 to the time you want the gate to close(1000 " 1 second which means the timer will check each 3 seconds if a player is near the gate.
Put this at the bottom of your script
pawn Код:
forward CloseNOpen();
public CloseNOpen)
{
for(new i=0;i<13;i++)
{
if((IsPlayerInRangeOfPoint(i,20,x, y, z) ))//Change 20 to the length you want the gate to get opened, then go to the object and replace the x y z with the object x y z (numbers)
{
MoveObject(pdgate, 1546.50000000, -1644.00000000, 15.19999981, 5);
}
else
{
MoveObject(pdgate, 1546.59997559, -1627.50000000, 15.19999981, 5);
}
}
}
Reply


Messages In This Thread
Timer help - by Riggster - 13.12.2012, 17:16
Re: Timer help - by David (Sabljak) - 13.12.2012, 17:22
Re: Timer help - by DaRk_RaiN - 13.12.2012, 17:26

Forum Jump:


Users browsing this thread: 1 Guest(s)