How to make Moving gate Please Help -
Omarkhan122211 - 01.08.2016
Hello, How to make Moving Gate
Please Guys If You Know Please Give it i dont know How to make Please !
Like
i made a Gate airport gate Obejct in mta
And
CreateObject(980,321.0000000,-1188.2000000,78.1000000,0.0000000,0.0000000,40.000 0000); //object(airportgate) (1)
How can i move with pass and move gate
Re: How to make Moving gate Please Help -
WingedFrostWolf - 01.08.2016
Use MoveObject and MoveDynamicObject:
https://sampwiki.blast.hk/wiki/MoveObject
Here's a quick example, hope it works:
Код:
new gatemoved =0;
CMD:gate(playerid, params[])
{
if (IsPlayerInRangeOfPoint(playerid, 20.0, -113.3937, 1666.2185, 17.9398))
{
if(gatemoved== 0)
{
SendClientMessage(playerid, -1, "Gate opened.");
MoveDynamicObject(gate1, -98.1134, 1665.4869, 17.6971, 3); // Replace the coordinates and the object you want to move, in this case gate1
gatemoved = 1;
}
else
{
SendClientMessage(playerid, -1, "Gate closed.");
MoveDynamicObject(gate1, -104.77339,1665.48694,17.69710, 3);
gatemoved = 0;
}
}
return 1;
}
If you use CreateDynamicObject use MoveDynamicObject, if you use CreateObject use MoveObject.
Re: How to make Moving gate Please Help -
Omarkhan122211 - 01.08.2016
how to do that LoL plz give me Expain !!!
Re: How to make Moving gate Please Help -
WingedFrostWolf - 01.08.2016
Do what exactly? The code I provided makes the object gate1 move from -104.77339,1665.48694,17.69710 to -98.1134, 1665.4869, 17.6971. You should have gate1 = CreateObject[ .etc] in your script.
Re: How to make Moving gate Please Help -
K0P - 01.08.2016
Quote:
Originally Posted by WingedFrostWolf
Do what exactly? The code I provided makes the object gate1 move from -104.77339,1665.48694,17.69710 to -98.1134, 1665.4869, 17.6971. You should have gate1 = CreateObject[ .etc] in your script.
|
Bro 20.0 Range is too much
Re: How to make Moving gate Please Help -
WingedFrostWolf - 01.08.2016
Quote:
Originally Posted by K0P
Bro 20.0 Range is too much
|
Eh, just an example.
@Omarkhan122211 You can use any range that suits you. 20 is quite large.