MoveObject Problem.
#1

I have a problem with MoveObject.
When i make the commands /opengate it opens the gate going down but turning.
Код:
	if (strcmp("/opengate", cmdtext, true, 10) == 0)
	{
	    if(IsPlayerInRangeOfPoint(playerid,3.0, 2400.9426,-1629.5629,2335.6563))
	    {
	     MoveObject(gate1,2401, -1633.3994140625, 2331.1999511719, 1.50000);
	     SendClientMessage(playerid,0xF38043FF,"INFO: Hai aperto il Gates 1. ");
	     }
	     if(IsPlayerInRangeOfPoint(playerid,3.0, 2393.1169,-1623.7292,2335.6563))
	    {
	     MoveObject(gate2,2393.1999511719, -1628.0999755859, 10, 1.500000);
	     SendClientMessage(playerid,0xF38043FF,"INFO: Hai aperto il Gates 2. ");
	     }
	      if(IsPlayerInRangeOfPoint(playerid,3.0, 2364.7861,-1621.8813,2335.6563))
	    {
	     MoveObject(gate3,2364.8000488281, -1617.8000488281, 2331.1999511719, 1.500000);
	     SendClientMessage(playerid,0xF38043FF,"INFO: Hai aperto il Gates 3. ");
	     }
	     return 1;
	}
	if (strcmp("/closegate", cmdtext, true, 10) == 0)
	{
     if(IsPlayerInRangeOfPoint(playerid,3.0, 2400.9426,-1629.5629,2335.6563))
	    {
	     MoveObject(gate1,2401, -1633.3994140625, 2331.1999511719, 1.500000);
	     SendClientMessage(playerid,0xF38043FF,"INFO: Hai chiuso il Gates 1. ");
        }
         if(IsPlayerInRangeOfPoint(playerid,3.0, 2393.1169,-1623.7292,2335.6563))
	    {
	     MoveObject(gate2,2393.19921875, -1628.119140625, 2334.6999511719, 1.500000);
	     SendClientMessage(playerid,0xF38043FF,"INFO: Hai chiuso il Gates 2. ");
        }
         if(IsPlayerInRangeOfPoint(playerid,3.0, 2364.7861,-1621.8813,2335.6563))
	    {
	     MoveObject(gate3,2364.7998046875, -1617.8000488281, 2334.6999511719, 1.500000);
	     SendClientMessage(playerid,0xF38043FF,"INFO: Hai chiuso il Gates 3. ");
	      }
	     return 1;
	}
Reply
#2

I always use the Rotation behind MoveObjekt(objectid,x,y,z,rotx,roty,rotz);
Reply
#3

Quote:
Originally Posted by Davman
Посмотреть сообщение
I have a problem with MoveObject.
When i make the commands /opengate it opens the gate going down but turning.
Код:
	if (strcmp("/opengate", cmdtext, true, 10) == 0)
	{
	    if(IsPlayerInRangeOfPoint(playerid,3.0, 2400.9426,-1629.5629,2335.6563))
	    {
	     MoveObject(gate1,2401, -1633.3994140625, 2331.1999511719, 1.50000);
	     SendClientMessage(playerid,0xF38043FF,"INFO: Hai aperto il Gates 1. ");
	     }
	     if(IsPlayerInRangeOfPoint(playerid,3.0, 2393.1169,-1623.7292,2335.6563))
	    {
	     MoveObject(gate2,2393.1999511719, -1628.0999755859, 10, 1.500000);
	     SendClientMessage(playerid,0xF38043FF,"INFO: Hai aperto il Gates 2. ");
	     }
	      if(IsPlayerInRangeOfPoint(playerid,3.0, 2364.7861,-1621.8813,2335.6563))
	    {
	     MoveObject(gate3,2364.8000488281, -1617.8000488281, 2331.1999511719, 1.500000);
	     SendClientMessage(playerid,0xF38043FF,"INFO: Hai aperto il Gates 3. ");
	     }
	     return 1;
	}
	if (strcmp("/closegate", cmdtext, true, 10) == 0)
	{
     if(IsPlayerInRangeOfPoint(playerid,3.0, 2400.9426,-1629.5629,2335.6563))
	    {
	     MoveObject(gate1,2401, -1633.3994140625, 2331.1999511719, 1.500000);
	     SendClientMessage(playerid,0xF38043FF,"INFO: Hai chiuso il Gates 1. ");
        }
         if(IsPlayerInRangeOfPoint(playerid,3.0, 2393.1169,-1623.7292,2335.6563))
	    {
	     MoveObject(gate2,2393.19921875, -1628.119140625, 2334.6999511719, 1.500000);
	     SendClientMessage(playerid,0xF38043FF,"INFO: Hai chiuso il Gates 2. ");
        }
         if(IsPlayerInRangeOfPoint(playerid,3.0, 2364.7861,-1621.8813,2335.6563))
	    {
	     MoveObject(gate3,2364.7998046875, -1617.8000488281, 2334.6999511719, 1.500000);
	     SendClientMessage(playerid,0xF38043FF,"INFO: Hai chiuso il Gates 3. ");
	      }
	     return 1;
	}
You said what happens, you didn't say what you expect to happen. So what's the problem? -..
Quote:
Originally Posted by dalkgamler
Посмотреть сообщение
I always use the Rotation behind MoveObjekt(objectid,x,y,z,rotx,roty,rotz);
U serious? MoveObject doesn't take 7 parameters, only 5. id, x,y,z, speed.
Reply
#4

Quote:
Originally Posted by Gamer_Z
Посмотреть сообщение
U serious? MoveObject doesn't take 7 parameters, only 5. id, x,y,z, speed.
It has 8 parameters, 3 of them optional.
Reply
#5

Quote:
Originally Posted by YJIET
Посмотреть сообщение
It has 8 parameters, 3 of them optional.
LOL didn't notice the new parameters, I'm outdated xD anyway he forgot speed in his code :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)