SA-MP Forums Archive
Gate is not moving - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Gate is not moving (/showthread.php?tid=422633)



Gate is not moving - Youtube12 - 14.03.2013

Hi guys, look my script, why my gate is not moving?

My Code:
Код:
new mygate;


mygate = CreateDynamicObject(971,2047.2998000,-1874.7998000,14.8000000,0.0000000,0.0000000,90.2470000); //object(subwaygate) (22)


    if (strcmp("/opengate", cmdtext, true, 5) == 0) // The /open command
    {
        if(IsPlayerInRangeOfPoint(playerid, manchgate, 2047.2998000,-1874.7998000,14.8000000))//Checking if the player in the range of the gate
        {
        MoveObject(mygate, 2047.2998000,-1874.7998000,14.8000000, 1.00);
        SendClientMessage(playerid, 0xEF994300, "The gate has opened.");
        }
        return 1;
	}
        
    if (strcmp("/closegate", cmdtext, true, 5) == 0) // The /close command
    {
        MoveObject(mygate, 2047.2998000,-1874.7998000,5.8000000, 1.00);
        SendClientMessage(playerid, 0xEF994300, "The gate has closed.");
        return 1;
    }



Re: Gate is not moving - Jstylezzz - 14.03.2013

CreateDynamicObject != MoveObject...
If you use CreateDynamicObject use MoveDynamicObject to move the object


AW: Gate is not moving - Youtube12 - 14.03.2013

Ok thank you


AW: Gate is not moving - Youtube12 - 14.03.2013

when i close, its done close at the same place..


Re: Gate is not moving - Jstylezzz - 14.03.2013

I don't get it... Can you describe it a little more detailed?