Gates that close automatically - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Gates that close automatically (
/showthread.php?tid=179898)
Gates that close automatically -
phatlaced - 29.09.2010
I have a couple gates that can open and close using the same command, but i was wondering how you create a gate that opens by using a command and closes automaticly.
Re: Gates that close automatically -
Scenario - 29.09.2010
Use a timer.
Re: Gates that close automatically -
Hal - 29.09.2010
in gate command after the moveobject to open the gate
pawn Код:
SetTimer("closegate", 10000, 0); // 10000 opens it for 10 seconds
then make a new public like:
pawn Код:
public closegate()
{
MoveObject(object,1273.041992,-1270.346191,11.955486, 3.00);
return 1;
}
so when the timer is done, it gets the closegate public we made, and it starts it.
Re: Gates that close automatically -
phatlaced - 29.09.2010
It works, thanks for the help.