Multiple Objects
#1

Hi, I've got this problem with moving some objects all at once. Here are some of the objects:

pawno code:
Код:
	ALLOBJ = CreateObject(8357, 153.70, -2127.47, 198.67,   0.00, 0.00, 90.00);
	ALLOBJ = CreateObject(16613, 704.55, -2147.47, 204.26,   0.00, 0.00, 180.00);
	ALLOBJ = CreateObject(17951, 481.17, -2147.34, 200.73,   0.00, 0.00, 0.00);
	ALLOBJ = CreateObject(17950, 476.52, -2128.66, 201.13,   0.00, 0.00, 270.00);
	ALLOBJ = CreateObject(17950, 484.95, -2127.68, 3.14,   0.00, 0.00, 270.00);
	ALLOBJ = CreateObject(17950, 483.79, -2146.72, 3.04,   0.00, 0.00, 270.00);
	ALLOBJ = CreateObject(17951, 488.09, -2146.68, 2.53,   0.00, 0.00, 0.10);
	ALLOBJ = CreateObject(1499, 469.72, -2118.77, 201.64,   0.00, 0.00, 90.00);
and this is my CMD:
Код:
if (strcmp("/sink", cmdtext, true, 10) == 0)
	{
	if(IsPlayerAdmin(playerid))
	{
		
	    for(new i;i<MAX_PLAYERS;i++)
	    {
	        if(!IsPlayerConnected(i)) continue;
	        {
	        new Float:X, Float:Y, Float:Z;
	        GetObjectPos(ALLOBJ,X,Y,Z);
             	MoveObject(ALLOBJ, X, Y, Z+-200, 5.0);
             	MoveObject(ELE, X, Y, Z+-200, 5.0);
             	MoveObject(ELE2, X, Y, Z+-200, 5.0);
	        }
	    }
	    
	}
	else SendClientMessage(playerid, 0xFF0000, "You do not have the rights to use this CMD");
	return 1;
	}
By the way there are no errors or warnings it compiles perfectly..

OH YEAH the problem is that non of the objects move
Reply
#2

anyone please!
Reply
#3

new ALLOBJ[8];

ALLOBJ[0] = CreateObj..
ALLOBJ[1] = CreateObj..


for(new a;a<sizeof(ALLOBJ);a++)
{
GetObjectPos(ALLOBJ[a],X,Y,Z);
MoveObject(ALLOBJ[a], X, Y, Z+-200, 5.0);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)