[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


Messages In This Thread
Moveable Objects. - by Dare Devil..... - 22.06.2012, 10:30
Re: Moveable Objects. - by TaLhA XIV - 22.06.2012, 20:25
Re: Moveable Objects. - by Mimic - 22.06.2012, 22:40
Re: Moveable Objects. - by Dare Devil..... - 23.06.2012, 08:46
Re: Moveable Objects. - by newbienoob - 23.06.2012, 11:38
Re: Moveable Objects. - by Lordzy - 23.06.2012, 11:45
Re: Moveable Objects. - by Djole1337 - 23.06.2012, 11:46
Re: Moveable Objects. - by abubaker98 - 23.06.2012, 11:55
Re: Moveable Objects. - by Dare Devil..... - 24.06.2012, 06:02
Respuesta: Re: Moveable Objects. - by CaptainMactavish - 24.06.2012, 06:12

Forum Jump:


Users browsing this thread: 3 Guest(s)