Gate is not moving
#1

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;
    }
Reply
#2

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

Ok thank you
Reply
#4

when i close, its done close at the same place..
Reply
#5

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


Forum Jump:


Users browsing this thread: 1 Guest(s)