Auto close gates
#1

I have about 30 gates in my server and for every gate I made a sepparate callback to close it after 5 seconds. Isn't there a way to make this 1? So I just have to do SetTimer(closegate..) at the /open command?
Reply
#2

SetTimerEx when you open gate.
Reply
#3

pawn Код:
forward CloseTimer(playerid);

if(strcmp(cmd,"/open",true) == 0)
{
  MoveObject
  SetTimer("CloseTimer",time,0);
}
if(strcmp(cmd,"/open2",true) == 0)
{
  MoveObject
  SetTimer("CloseTimer",time,0);
}

//Etc

public CloseTimer(playerid)
{
  MoveObject
  MoveObject

//Etc
}
An example
Reply
#4

Mozillah, that will close all gates lol.. I just want it to close the gate it openend
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)