25.10.2009, 13:00
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?
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
}