SA-MP Forums Archive
Make a gate - 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: Make a gate (/showthread.php?tid=178565)



Make a gate - Baspol - 22.09.2010

Hello

I've downloaded VX:Rp 1.0 and there are alot of gates in it. But there are gates without and i moved them but I would like to make a gate for it. How can I make a gate?

With the command /gate?


Thanks!

Bas


Re: Make a gate - NoobScripter1 - 22.09.2010

pawn Код:
new mygate //at the top of the script

mygate = CreateDynamicObject(969, 2720.3772,-2409.7523,12.6,0, 0.0000, 90); //this on gamemode init this is the default position where you will need to close

    if(!strcmp(cmdtext, "/opendoor", true))
    {
        MoveDynamicObject(mygate, 239.774,111.511,1000.61, 1.7500); // you need to get the cordinates of the opened position to work
        SendClientMessage(playerid, COLOR_BLUE,"Gate opened!!");
        return 1;
    }
    if(!strcmp(cmdtext, "/opendoor", true))
    {
        MoveDynamicObject(mygate, 239.774,111.511,1000.61, 1.7500); // you need to get the closed cordinates
        SendClientMessage(playerid, COLOR_BLUE,"Gate closed");
        return 1;
     }