SA-MP Forums Archive
[problem] MoveObject bug - 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: [problem] MoveObject bug (/showthread.php?tid=348346)



[problem] MoveObject bug - IsraelRPP - 05.06.2012

Hello there.

I am try to move an object, I done everything right but the rotation of it is just bad.
I dont know why, in the MTA everything is has i done.

Everything I am try to move it right - nothing.

Quote:

if(strcmp(cmd, "/opendoor", true) == 0 || strcmp(cmd, "/od", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsACop(playerid) || IsASheriff(playerid))
{
if(PlayerToPoint(5, playerid,239.60000610352, 121, 1006.5) && IsACop(playerid))
{
MoveObjectEx(pdd1, 239.60000610352, 121, 1006.5, 5);
}
else if(PlayerToPoint(2, playerid,253.191696,109.082427,1003.22570)
{
MoveObject(pdd2, 253.199696,107.082427,1003.225708,1);
}
else if(PlayerToPoint(2, playerid,253.207733,125.242126,1003.218750))
{
MoveObject(pdd3, 253.207733,123.242126,1003.218750,1); //V
}
else if(PlayerToPoint(2, playerid,232.931304,109.093315,1010.208679) && IsACop(playerid))//d.chief
{
if(PlayerInfo[playerid][pRank] >=
{
MoveObject(pdddc, 233.031304,107.093315,1010.208679,1);
}
else
{
SendClientMessage(playerid, COLOR_DARKRED, "Access Deny!");
return 1;
}
}
else if(PlayerToPoint(2, playerid,231.135330,119.553451,1010.218750) && IsACop(playerid))//chief
{
if(PlayerInfo[playerid][pRank] >=
{
MoveObject(pddc, 229.135330,119.653451,1010.218750,1);
}
else
{
SendClientMessage(playerid, COLOR_DARKRED, "Access Deny!");
return 1;
}
}
else if(PlayerToPoint(2, playerid,275.642517,117.420158,1004.617187) && IsACop(playerid))
{
MoveObject(pdd4, 275.542517,119.420158,1004.617187,1);
}
else if(PlayerToPoint(2, playerid,265.835815,112.502014,1004.617187) && IsACop(playerid))
{
MoveObject(pdd5, 263.835815,112.302014,1004.617187,1);
}
else if(PlayerToPoint(2, playerid,265.989532,115.889060,1004.617187) && IsACop(playerid))
{
MoveObject(pdd6, 267.989532,115.999060,1004.617187,1);
}
else if(PlayerToPoint(2, playerid,239.628219,125.069351,1003.218750) && IsACop(playerid))
{
MoveObject(pdd7, 239.543219,127.069351,1003.218750,1);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "you are not near any door!");
return 1;
}
format(string, sizeof(string), "* %s types the access code **** while covering with his free hand.", sendername);
ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
}
else {SendClientMessage(playerid, COLOR_GREY, " You are not a Cop!");}
}
return 1;
}

I got the same problem as this guy : [ame]http://www.youtube.com/watch?v=lOakUxee1H0&feature=related[/ame]

Hope for some help!
Thanks.


Re: [problem] MoveObject bug - Jstylezzz - 05.06.2012

are you using a streamer?
if yes, use MoveDynamicObject to move the objects.
if you tried that and it didn't work, update the plugin and include, and recompile the script

if it still doesn't work, then you got some other problem


Re: [problem] MoveObject bug - ricardo178 - 05.06.2012

https://sampwiki.blast.hk/wiki/MoveObject

Your solution is there... Read the params you should introduce there... You are only setting positions, not rotations..


Re: [problem] MoveObject bug - IsraelRPP - 05.06.2012

you are didnt understood me.
I done everything right, my x,y,z are good. But its moving the gate to bad rotation.


Re: [problem] MoveObject bug - Jstylezzz - 05.06.2012

Quote:
Originally Posted by IsraelRPP
View Post
you are didnt understood me.
I done everything right, my x,y,z are good. But its moving the gate to bad rotation.
I will ask my question once again, are you using a streamer to create the objects?


Re: [problem] MoveObject bug - IsraelRPP - 05.06.2012

I am using MTA


Re: [problem] MoveObject bug - Jstylezzz - 05.06.2012

I know you are using that, but whem you move these objects it should be like this:

pawn Code:
new somegate = CreateObject(blabla);

//and when you move it

MoveObject(somegate,blabla);
What i am trying to understand, is if you are using CreateObject or createdynamic object or w/e..


Re: [problem] MoveObject bug - IsraelRPP - 05.06.2012

I am doing : CreateObject.
and then : MoveObject.

The mod I am using was made in the earlier version of SAMP, 0.3d or older one I guess.

I am scripting alot of time. When samp was older version its worked perfectly, only now
when its 0.3e something wrong, and I cant understand what.


Re: [problem] MoveObject bug - Jstylezzz - 05.06.2012

My advice, update the script with a streamer.. idk if it solves your problem, but i think it's more reliable than the standard functions


Re: [problem] MoveObject bug - IsraelRPP - 05.06.2012

What to you mean update the script ? how ?


Re: [problem] MoveObject bug - Jstylezzz - 05.06.2012

download for example, THis plugin
then include it
and replace all the CreateObject and Moveobject with CreateDynamicObject and MoveDynamicObject

I am using it and it works fine
make sure that you back up your script before doing it

if the problem still persists, then you are doing something wrong in the moveobject code or somewhere in that section

good luck!


Re: [problem] MoveObject bug - IsraelRPP - 05.06.2012

Quote:

C:\Users\user\Desktop\Server\pawno\include\streame r.inc(156) : error 017: undefined symbol "OBJECT_MATERIAL_SIZE_256x128"
C:\Users\user\Desktop\Server\pawno\include\streame r.inc(382) : warning 235: public function lacks forward declaration (symbol "OnPlayerEditObject")
C:\Users\user\Desktop\Server\pawno\include\streame r.inc(404) : warning 235: public function lacks forward declaration (symbol "OnPlayerSelectObject")
C:\Users\user\Desktop\Server\pawno\include\streame r.inc(406) : error 017: undefined symbol "SELECT_OBJECT_PLAYER_OBJECT"

.. help :\


Re: [problem] MoveObject bug - Firo - 05.06.2012

Send us lines

EDIT : i see this include is too old, get a fresh one like Igontio one.


Re: [problem] MoveObject bug - IsraelRPP - 05.06.2012

this is the newset. I download what this guy gave me...
can you give me download for Igonito ?


Re: [problem] MoveObject bug - Jstylezzz - 05.06.2012

Quote:
Originally Posted by IsraelRPP
View Post
.. help :\
these unknown functions, are samp0.3e functions, you should update the server package too
go to the sa-mp downloads page, and extract the zip into your server folder, allow overwrite..
this will updated the outdated s_samp include but also the outdated a_objects or w/e

try that


Re: [problem] MoveObject bug - Firo - 05.06.2012

https://sampforum.blast.hk/showthread.php?tid=102865 , All functions and download right there.
The best streamer for now


Re: [problem] MoveObject bug - Jstylezzz - 05.06.2012

Quote:
Originally Posted by Firo
View Post
https://sampforum.blast.hk/showthread.php?tid=102865 , All functions and download right there.
The best streamer for now
That's the exact one i gave him, but the newest version of incognito's streamer requires 0.3e includes of sa-mp
this means he needs to update his standard includes like a_samp where the setobjectmaterial was added into


Re: [problem] MoveObject bug - speed258 - 05.06.2012

MoveObject(gatename, X,YZ,Speed,RX,RY,RZ); // that why your gates are spining
Now you need to do:
MoveObject(pdd3, 253.207733,123.242126,1003.218750,1,0.0,0.0,0.0); //V
and gates didn't spin


Re: [problem] MoveObject bug - IsraelRPP - 05.06.2012

Quote:
Originally Posted by speed258
View Post
MoveObject(gatename, X,YZ,Speed,RX,RY,RZ); // that why your gates are spining
Now you need to do:
MoveObject(pdd3, 253.207733,123.242126,1003.218750,1,0.0,0.0,0.0); //V
and gates didn't spin
Quote:

C:\Users\user\Desktop\New folder\gamemodes\M-RP.pwn(17193) : warning 202: number of arguments does not match definition
C:\Users\user\Desktop\New folder\gamemodes\M-RP.pwn(17193) : warning 202: number of arguments does not match definition
C:\Users\user\Desktop\New folder\gamemodes\M-RP.pwn(17193) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Warnings.

Thats the warning.
and the errors with the streamer are still the same.
please help..


Re: [problem] MoveObject bug - Jstylezzz - 05.06.2012

try this for example:

pawn Code:
MoveObject(pdd3, 253.207733,123.242126,1003.218750,1);