How to make Moving gate Please Help
#2

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.
Reply


Messages In This Thread
How to make Moving gate Please Help - by Omarkhan122211 - 01.08.2016, 17:08
Re: How to make Moving gate Please Help - by WingedFrostWolf - 01.08.2016, 17:15
Re: How to make Moving gate Please Help - by Omarkhan122211 - 01.08.2016, 17:18
Re: How to make Moving gate Please Help - by WingedFrostWolf - 01.08.2016, 17:21
Re: How to make Moving gate Please Help - by K0P - 01.08.2016, 17:25
Re: How to make Moving gate Please Help - by WingedFrostWolf - 01.08.2016, 17:43

Forum Jump:


Users browsing this thread: 1 Guest(s)