SA-MP Forums Archive
MakeDynamicObject Range... - 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: MakeDynamicObject Range... (/showthread.php?tid=464698)



MakeDynamicObject Range... - yaron0600 - 18.09.2013

How can I make the range here please?
Код:
MoveDynamicObject(objectid, Float:x, Float:y, Float:z, Float:speed);



Re: MakeDynamicObject Range... - DanishHaq - 18.09.2013

Range for what? Using the

pawn Код:
Float:x, Float:y, Float:z;
it will move the object to those coordinates with a nice animation too, and using the

pawn Код:
Float:speed
will set how fast/slow it goes.


Re: MakeDynamicObject Range... - alinategh - 18.09.2013

range? range of what? that's for moving the dynamic object to the specific point with the specific speed


Re: MakeDynamicObject Range... - DanishHaq - 18.09.2013

Quote:
Originally Posted by alinategh
Посмотреть сообщение
range? range of what? that's for moving the dynamic object to the specific point with the specific speed
Yes thank you for replicating my answer but dumbing it down.


Re: MakeDynamicObject Range... - yaron0600 - 18.09.2013

I meant, U can do it in radius of 5 meters, to open the gate, how can I do that?


Re: MakeDynamicObject Range... - DanishHaq - 18.09.2013

Quote:
Originally Posted by yaron0600
Посмотреть сообщение
I meant, U can do it in radius of 5 meters, to open the gate, how can I do that?
Use IsPlayerInRangeOfPoint. For example:

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z); /* these x y z
will be the position of the gate, and the range will be how far the player should be.*/

{
    MoveDynamicObject(objectid, Float:x, Float:y, Float:z, Float:speed); /* move the
        object to the new coordinates*/

}



Re: MakeDynamicObject Range... - alinategh - 18.09.2013

Quote:
Originally Posted by DanishHaq
Посмотреть сообщение
Yes thank you for replicating my answer but dumbing it down.
Uh, what's the rush man...I got your reply when i just replied my own one, you were faster.