SA-MP Forums Archive
Move Object - 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: Move Object (/showthread.php?tid=584386)



Move Object - whatreally - 04.08.2015

guys i want move some objects any help

CreateDynamicObject(14562, -624.37866, -44.83037, 5.88050, 0.00000, 0.00000, 0.00000);
CreateDynamicObject(14562, -611.20209, -62.77650, 5.70050, 0.00000, 0.00000, -172.00000);
CreateDynamicObject(14562, -663.04999, -16.50000, 6.35000, 0.00000, 0.00000, 238.88000);


Re: Move Object - Fancy - 04.08.2015

Your object
Код:
CreateDynamicObject(14562, -624.37866, -44.83037, 5.88050, 0.00000, 0.00000, 0.00000);
Make variable
Код:
new object1;
And after that
Код:
object1 = CreateDynamicObject(14562, -624.37866, -44.83037, 5.88050, 0.00000, 0.00000, 0.00000
Make a command to move them like this
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/moveobject", cmdtext, true, 10) == 0)
	{
                new Float:x, Float:y, Float:z;
                GetObjectPos(object1, x, y, z);
		MoveObject(object1, x,y+20.0,z,10.0);
		return 1;
	}
	return 0;
}