SA-MP Forums Archive
MoveDynamicObject PROBLEM - 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: MoveDynamicObject PROBLEM (/showthread.php?tid=396167)



MoveDynamicObject PROBLEM - AwokenNeoX - 29.11.2012

IF I TYP /TOR THE GATE DONT OPEN..

Variable:

Код:
new lsoszu1;
new lsoszu2;
new lstorzu;
The Object:

Код:
lsoszu1 = CreateObject(985, 1546.7359619141, -1623.6981201172, 14.057813644409, 0, 0, 90); 
lsoszu2 = CreateObject(986, 1546.7437744141, -1631.6374511719, 14.057786941528, 0, 0, 90); 
lstorzu = CreateObject(980, 1588.2983398438, -1637.8962402344, 15.175374984741, 0, 359.25, 359.75);
My Command:

Код:
if(strcmp("/tor", cmdtext, true) == 0)
{ 
        if(IsPlayerInFrak(playerid, 1))
        {
	        if(IsPlayerInRangeOfPoint(playerid, 20, 1588.2978515625, -1637.8955078125, 9.6003952026367))
			{
                                 MoveDynamicObject(lstorzu, 1588.2978515625, -1637.8955078125, 9.6003952026367, 4);
                                 SetTimer("lstorzuTimer", 7000, 0);
                                 return 1;
			}
			     if(IsPlayerInRangeOfPoint(playerid, 20, 1546.7431640625, -1631.63671875, 6.8828058242798))
			{
                                 MoveDynamicObject(lsoszu2, 1546.7431640625, -1631.63671875, 6.8828058242798, 4);
	                         SetTimer("lsoszu2Timer", 7000, 0);
	                         MoveDynamicObject(lsoszu1, 1546.7353515625, -1623.697265625, 6.8828330039978, 4);
                                 SetTimer("lsoszu1Timer", 7000, 0);
                                 return 1;
            }
        }



Re: MoveDynamicObject PROBLEM - NumbSkull - 29.11.2012

you are trying to move dynamic object when they arn't dynamic either create dynamic object or move object


Re: MoveDynamicObject PROBLEM - blackbhuta - 29.11.2012

lsoszu1 = CreateDynamicObject(985, bla bla
lsoszu2 = CreateDynamicObject(986, bla bla
lstorzu = CreateDynamicObject(980, bla bla

follow this format:
// CreateDynamicObject(object ID, Float:X, Float:Y, Float:Z, Float:RotX, Float:RotY, Float:RotZ, virtualworld, interior, -1(all player will see the object if you put it -1), radius);
//MoveDynamicObject(objectid, Float:X, Float:Y, Float:Z, Float:Speed, Float:RotX = -1000.0, Float:RotY = -1000.0, Float:RotZ = -1000.0);

example:
lsoszu1 = CreateDynamicObject(985, 1546.7359619141, -1623.6981201172, 14.057813644409, 0, 0, 90, 5, 10, -1, 200);
so, the object for "lsoszu1" will show on virtualworld 5th, and interior 10th.