22.06.2012, 10:30
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,
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
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
After you are done with open gate command you need to script close gate command like this
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
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;
pawn Код:
gate = CreateObject(969,2465.30004883,-1663.59997559,12.30000019,0.00000000,0.00000000,90.00000000);
return 1;
}
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;
}
pawn Код:
if (strcmp("/close gate", cmdtext, true, 10) == 0)
{
MoveObject(gate,2465.30004883,-1663.59997559,12.30000019,1);//Close Gate
return 1;
}
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