SA-MP Forums Archive
Script Help - 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)
+--- Thread: Script Help (/showthread.php?tid=297264)



Script Help - MS:RP Mason - 15.11.2011

Hi all ITS ME AGAIN SORRY HAHA
Okay
i need a hand i have made a map in MTA it includes a gate which i need to move, in my server i just do like this /gedit tome ect...

But if i do /gnear it wont show up so i cannot edit it in game, could i get a tutorial how to edit the gate so it will move even tho its a mapping item i scripted in THANKS I love you guys


Re: Script Help - -Rebel Son- - 15.11.2011

Visit the wiki and read up on MoveObject.

-Dakota.


Re: Script Help - park4bmx - 15.11.2011

Search "Auto Gates Samp" on ******


Re: Script Help - MS:RP Mason - 15.11.2011

Ok ima do both but Dakota i appreciate your help but how long will it take for me to learn?because i want to get this up and running ASAP! and i need to make it faction restricted


Re: Script Help - ricardo178 - 15.11.2011

I didn't get what you want exactly, but, here you go with a moving gate code... you just need to replace with your object and positions...

pawn Код:
#include <a_samp>
#include <zcmd>
new Gate;
forward GateClose();

public OnFilterScriptInit()
{
    Gate = CreateObject(208,0.00,0.00,0.00,0.00,0.00,0.00);
    return 1;
}

CMD:opengate(playerid, params[])
{
    MoveObject(Gate, 0.00, 0.00, 0.00, 2.0);
    SendClientMessage(playerid, 0xFFFFFF, "Gate Opened. It will close in 10 seconds.");
    SetTimer("GateClose", 10000, false);
    return 1;
}

public GateClose()
{
    MoveObject(Gate, 0.00, 0.00, 0.00, 2.0);
    return 1;
}
To make it restricted, i need to know which variables you use to define your faction... It might be many things...