Moveable Objects. -
Dare Devil..... - 22.06.2012
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
Re: Moveable Objects. -
TaLhA XIV - 22.06.2012
Nice Tutorial guy.
Re: Moveable Objects. -
Mimic - 22.06.2012
Simple but helpful, good job.
Re: Moveable Objects. -
Dare Devil..... - 23.06.2012
Well I created it simple my self so new people to scripting can eaisly understand it.
Re: Moveable Objects. -
newbienoob - 23.06.2012
Looks same to [ame="http://www.youtube.com/watch?v=E_aO0Bp64I4"]this[/ame]
Re: Moveable Objects. -
Lordzy - 23.06.2012
Thanks for the tutorial.
Re: Moveable Objects. -
Djole1337 - 23.06.2012
Quote:
Originally Posted by newbienoob
|
Obv c/p...
Re: Moveable Objects. -
abubaker98 - 23.06.2012
Nice work
Re: Moveable Objects. -
Dare Devil..... - 24.06.2012
Quote:
Originally Posted by Mr_DjolE
Obv c/p...
|
Its not a Copy at all I made this one My self.
Respuesta: Re: Moveable Objects. -
CaptainMactavish - 24.06.2012
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.