SA-MP Forums Archive
Gate 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: Gate Help (/showthread.php?tid=472259)



Gate Help - CountryTrooper441 - 27.10.2013

Hello,

I put this Police Station into my Server and now i want to put a gate arm thing that goes put and down like if you were going through a Toll both that Arm thing how do i put on somewhere and make it work?

The People that help me will get +rep..


Re: Gate Help - RowdyrideR - 27.10.2013

https://sampwiki.blast.hk/wiki/MoveObject

Check the example in it.


Re: Gate Help - CountryTrooper441 - 27.10.2013

But how do i make it go up and down?
That doesnt really help..


Re: Gate Help - Konstantinos - 27.10.2013

It does help.

Quote:
Originally Posted by SA-MP Wiki
The Z coordinate to move the object to.
Let's say an object has been created at:

x: 5.0
y: 10.0
z: 15.0

Using MoveObject will move the object to the coordinates were given. So if you give:

x: 5.0
y: 10.0
z: 20.0

It will move the object 5 meters up. Uzing Z as 10, it will move it down.


Re: Gate Help - Scrillex - 27.10.2013

change x coordinates..


Re: Gate Help - JakeHunter - 27.10.2013

if (strcmp("/opengate", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_WHITE, "{37F906}INFO:{FFFFFF}You open'et the gate");
MoveObject(name, cordinations);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s Openet the gates.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
return 1;
}


And you need to add new name on the gate
And object name on the gate = CreateObject(object);


Re: Gate Help - Patrick - 27.10.2013

Follow these interface, this would help you ALOT



X = Left / Right
Y = Forward / Backward
Z = UP