Automatic 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: Automatic Move Object (
/showthread.php?tid=654017)
Automatic Move Object -
Hiei - 19.05.2018
When I near object, i want it automatic move to different place, how to do that ?
Sorry for my bad english
Re: Automatic Move Object -
JasonRiggs - 19.05.2018
You first need to detect if the player is near an object.
You can use timers that loops towards the players, or you can make it by (FOR EXAMPLE)
PHP код:
CreateDynamicCircle(Float:x, Float:y, Float:size, worldid = -1, interiorid = -1, playerid = -1) "
then under
PHP код:
IsPlayerInDynamicArea(playerid, areaid, recheck = 0)
detect if the player is near your object by the radius which you want, If he is near then you can use MoveDynamicObject to the new place you want