Problem with using MoveObject - 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 with using MoveObject (
/showthread.php?tid=486127)
Problem with using MoveObject -
kingracer - 07.01.2014
Hi all, i want to make moving gate, but it copies itself: when i'm writing cmd to open it - it's opening but it's copying and leaving closed.
Closed:
sa-mp-000.jpg
Opened:
sa-mp-001.jpg
And code:
Код HTML:
#include <a_samp>
#pragma tabsize 0
#define FILTERSCRIPT
#if defined FILTERSCRIPT
new mhs;
#endif
public OnFilterScriptInit()
{
mhs = CreateObject(980,-2276.5000000,2354.1999500,6.7000000,0.0000000,0.0000000,54.0000000);
return 0;
}
public OnPlayerCommandText(playerid, cmdtext[]) {
if (strcmp(cmdtext, "/otk", true)==0) {
MoveObject (mhs, -2276.5000000,2354.1999500,10.7000000 , 2);
return 1;
}
if (strcmp(cmdtext, "/zak", true)==0) {
MoveObject (mhs, -2276.5000000,2354.1999500,6.7000000 , 3);
return 1;
}
return 0;
}
Re: Problem with using MoveObject -
AIped - 07.01.2014
search threw your script(s) if the gate isnt created elsewhere again
Re: Problem with using MoveObject -
offon - 07.01.2014
Seems like the arguments in your MoveObject are not correct. Take a look here:
https://sampwiki.blast.hk/wiki/MoveObject
Or as AIped said,try to look at your other scripts if you didn't create an object at the same coordinates. If not, try what I said.
EDIT: I didn't noticed that the rotation arguments are optional, my mistake.
Re: Problem with using MoveObject -
iJumbo - 07.01.2014
i don't see anything wrong about the arguments..
Re: Problem with using MoveObject -
kingracer - 07.01.2014
Quote:
Originally Posted by AIped
search threw your script(s) if the gate isnt created elsewhere again
|
No, it isn't, it was created as simple object, but i commented it and made moving script... And that's always happening with me when i'm trying to make something moving, idk why...
UPD. Fixed it: gate was "stucked" in the other object and copied itself, thread might be closed. And thanks to all for the answers!