[Tutorial] Moveable Objects.
#1

Hello,
Today I will tell you how can we make Moveable objects today in this case I will make Moveable Gates in this case

-Fisrt of all you need to have a map editor.((I will use MTA map editor))
If you use MTA map editor you need to convert for samp objects here ConvertFFS

-You need to make a Closed gate and save it to take the map it looks like this,





-Then you need to map a open gate like this





Once you have coordinates you will open your Pawno
Here are my coordinates
-CLOSED GATE CreateObject(969,2465.30004883,-1663.59997559,12.30000019,0.00000000,0.00000000,90 .00000000);
-OPEN GATE
CreateObject(969,2465.50000000,-1672.90002441,12.30000019,0.00000000,0.00000000,90 .00000000);

Now you need to open Pawno and select new,

First of all you need to define it like that,

pawn Код:
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif
new gate;
after you are done with it you need to create object the closed gate,Take the coordinates for closed gate and do it like this, this should be done under Game Mode Init
pawn Код:
gate =   CreateObject(969,2465.30004883,-1663.59997559,12.30000019,0.00000000,0.00000000,90.00000000);
    return 1;
}
After you are done with this your gate is ready now you need to script the command to open and close it.
You can do that like this to Open your Gate

pawn Код:
if (strcmp("/open gate", cmdtext, true, 10) == 0)
    {
        MoveObject(gate,2465.50000000,-1672.90002441,12.30000019,1);//Open Gate
        return 1;
    }
After you are done with open gate command you need to script close gate command like this

pawn Код:
if (strcmp("/close gate", cmdtext, true, 10) == 0)
    {
        MoveObject(gate,2465.30004883,-1663.59997559,12.30000019,1);//Close Gate
        return 1;
    }
Do not for get to put return 0; at the end.

Once you are done with it your Gate is ready now, you can then test it.

Here is a link to my gate which I created if you need further help with it.

Paste Bin
Reply
#2

Nice Tutorial guy.
Reply
#3

Simple but helpful, good job.
Reply
#4

Well I created it simple my self so new people to scripting can eaisly understand it.
Reply
#5

Looks same to [ame="http://www.youtube.com/watch?v=E_aO0Bp64I4"]this[/ame]
Reply
#6

Thanks for the tutorial.
Reply
#7

Quote:
Originally Posted by newbienoob
Посмотреть сообщение
Looks same to this
Obv c/p...
Reply
#8

Nice work
Reply
#9

Quote:
Originally Posted by Mr_DjolE
Посмотреть сообщение
Obv c/p...
Its not a Copy at all I made this one My self.
Reply
#10

Quote:
Originally Posted by Dare Devil.....
Посмотреть сообщение
Its not a Copy at all I made this one My self.
He didn't tell you that you copied, he said that there's many tutorials like this.
Back to the topic, I see you're new then I should say that you did a good job.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)