[Tutorial] Moving Gates, Elevators Etc.
#1

Hello, Many people have asked me " Can you help me make a moving gate" So now i am showing a tutorial of how to make one.

Alright first, We need cords.
Step 1. Go to the place you want your gate to be, /save Gate
Step 2. Now go to the place where you want your gate to move to ( I usually make it move up. )
Step 3. Then get the Cords for when it moves back down.
Step 4. Go to your GTA SA File ( Located In ProgramFiles/Rockstargames/Grand Theft Auto GTA SA/ And search for Saved Positions.



Example code :

Quote:

First, add
( new elevator; ) Near the top of your script, I will be using the Object named "elevator" You can edit this.
Example : new elevator;

Quote:

Second,Get the cords of where your gate,elevator etc is. Make sure it's the cord of where it's closed.
Then add something like this, Put it under your Vehicle spawns/skins/objects- you pick.

Now it should look like this :
elevator = CreateObject( 2669 , -1489.413085 , 2624.577148 , 61.223720 , 0.000000 , 0.000000 , 358.000000 );
^ ^
| |
Is the object name Object id ( Now the wrest is the cords. Put yours in )

Quote:

And now the final step!

Put your command in under "OnPlayerCommandText" - Edit this command to your wishes.

if(strcmp(cmd, "/eup", true) == 0) { // Edit the /eup to your elevator command.
MoveObject(elevator,-1489.413085,2624.461914,84.440391,2.00); // Put your cords in here
SendClientMessage(playerid, COLOR_RED, "You are now going up, Please Wait."); // You dont alwas have to put this in, delete if wanted.
return 1;
}
if(strcmp(cmd, "/edown", true) == 0) { // Same deal as before
MoveObject(elevator,-1489.413085,2624.461914,60.960697,-2.00); // Same deal as before
SendClientMessage(playerid, COLOR_RED, "The Elevator is now comming, Please Wait."); // Same deal as before
return 1;
}

And Tada ! Your done. Enjoy your moving gates.
Please tell me if this helped you at all, If not i can explain better in a Pm etc.
- Hugs from Bruzer
Reply
#2

Not bad ^^ , next time with OnPlayerToPoint
Reply
#3

Oh shoot! Forgot about that

But i find this way more simple for newbies .
Even for me!
Reply
#4

Its great to find tutorials rather then questions in this section.
Reply
#5

So true, Saves time, Makes people happy.
Reply
#6

Yes .. but with OnPlayerToPoint , Not need to do some commands and lost time and it's the must for me , i think
Reply
#7

Like i said, Not all like it like that.
Reply
#8

Quote:
Originally Posted by g@k
Yes .. but with OnPlayerToPoint , Not need to do some commands and lost time and it's the must for me , i think
Nope soz, the onplayertopoint is if you want everyone to be able to goto that object and it moves, what if you have a gate and you only want to be the person to get in
Reply
#9

Then set the team.
Of who can call the gate etc.
Reply
#10

can you post for others object names, example for gates, if i dont want elevater
Reply
#11

https://sampwiki.blast.hk/wiki/Object_St...C_and_Barriers

EDIT : Gate ids , 969,971,974,975,976,980,985,986,987
Reply
#12

Quote:
Originally Posted by ssǝן‾ʎ
pawn Code:
CreateGate(model, xPos, yPos, zPos, xTarget, yTarget, zTarget);
Creating a gate (or elevator if you set the target up) using YSI.
burn
Reply
#13

Quote:
Originally Posted by SilentHuntR
Quote:
Originally Posted by ssǝן‾ʎ
pawn Code:
CreateGate(model, xPos, yPos, zPos, xTarget, yTarget, zTarget);
Creating a gate (or elevator if you set the target up) using YSI.
burn
Whats so burn about that, He's just explaining How his Program works..
Reply
#14

Quote:
Originally Posted by ssǝן‾ʎ
pawn Code:
CreateGate(model, xPos, yPos, zPos, xTarget, yTarget, zTarget);
Creating a gate (or elevator if you set the target up) using YSI.
Is there something wrong with you today ? That's mighty short for one of your tutorials
Reply
#15

Quote:
Originally Posted by ssǝן‾ʎ
Quote:
Originally Posted by Donny
Quote:
Originally Posted by ssǝן‾ʎ
pawn Code:
CreateGate(model, xPos, yPos, zPos, xTarget, yTarget, zTarget);
Creating a gate (or elevator if you set the target up) using YSI.
Is there something wrong with you today ? That's mighty short for one of your tutorials
All my YSI tutorials are short because it's designed to be quick and easy to use .

Anyway, it wasn't a burn, he wrote a tutorial, I gave additional information for the tutorial, as I hope people do on mine.
That's not additional information, that's re-writing his tutorial
Reply
#16

No it's not, Stop post huntin buddy, it's pointless
Reply
#17

Is there any need for define object, and can you paste tutorial for walls, and barries
Reply
#18

You mean how to make a Wall..? Just get the object ID and Put the cords of where you want it.
Reply
#19

Quote:
Originally Posted by Bruzer18
You mean how to make a Wall..? Just get the object ID and Put the cords of where you want it.
ok,tnx, but is there any web site where is IDs and pictures of objects
Reply
#20

****** SAMP WIKI.

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)