Auto moving objects - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Auto moving objects (
/showthread.php?tid=170565)
Auto moving objects -
Dime - 23.08.2010
So i have this when player pick pickup objects move.I wanna know how make when server start objects auto-move on one side and than come back?
Re: Auto moving objects -
Nonameman - 23.08.2010
Use SetTimer function, and check the objects' position. If they are at the first coords, move them to the second, else move them back to the start position.
Re: Auto moving objects -
Dime - 23.08.2010
I was tryed everything before few days but didnt work

Can i get it from someone?
Re: Auto moving objects -
WillyP - 23.08.2010
look at scripts with moving objects....................................
Re: Auto moving objects -
Dime - 23.08.2010
I sayd i didnt found ..^
Re: Auto moving objects -
Nonameman - 23.08.2010
Get the coords of the objects, and the coords of the places where you want to move them, and i'll make it for you.
Re: Auto moving objects -
Dime - 23.08.2010
k i will post like "create object"
Quote:
CreateObject(3115, 834.58679199219, -2077.3247070313, 11.756024360657, 0, 0, 0);
CreateObject(3115, 834.35845947266, -2116.4672851563, 5.5060243606567, 0, 0, 0);
|
Re: Auto moving objects -
Nonameman - 24.08.2010
The 1st object moves to the 2nd object's position, and the 2nd to the 1st's position:
http://pastebin.com/SJxcngJn
I hope you wanted this.
Re: Auto moving objects -
Dime - 24.08.2010
Nonameman tnx on spending time but that dont work for me.Objects dont move
Re: Auto moving objects -
Donny_k - 24.08.2010
pawn Код:
// global
new
obj,
bool:at_start;
// OnGameModeInit
obj = CreateObject(model, start_x, start_y..............
MoveObject(obj, new_x, new_y,...........
// OnObjectMove // or moved ?
if (objectid == obj)
{
if (!at_start) MoveObject(obj, start_x, start_y, start_z, speed);
else MoveObject(obj, new_x, new_y, new_z, speed);
at_start = !at_start;
}
That would move back and forth repeatedly as the callback gets fired when an object stops moving.