SA-MP Forums Archive
[Question Of Scripting] CreateObject/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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Question Of Scripting] CreateObject/MoveObject (/showthread.php?tid=89858)



[Question Of Scripting] CreateObject/MoveObject - TheGtaLover - 04.08.2009

Okay.. Well im making a gamemode... but.. Theres one thing.. I Dont know how to MoveObject Like.. You put some Objects In gamemode? and have like a simple gamemode like /under and it moves the objects you want it to move to a diffrent.. Location?

Please Help,


Re: [Question Of Scripting] CreateObject/MoveObject - MrPanz - 04.08.2009

Look for Bruzer18's moving gates script it explains it.


Re: [Question Of Scripting] CreateObject/MoveObject - TheGtaLover - 04.08.2009

Cant find nothing??

Well heres the code.. like.. i want all the objects.. in one place?? but only one object would mvoe... :/


Quote:

if(strcmp(cmd, "/onroof", true) == 0) {
SendPlayerFormattedText(playerid,"The road block is now on the roof near By,", 0);
MoveObject(1225,1517.8679,-1565.2029,23.5469,6);
MoveObject(1225,1517.8679,-1565.2029,23.5469,6);
MoveObject(1225,1517.8679,-1565.2029,23.5469,6);
MoveObject(1225,1517.8679,-1565.2029,23.5469,6);
MoveObject(1225,1517.8679,-1565.2029,23.5469,6);
MoveObject(1225,1517.8679,-1565.2029,23.5469,6);
MoveObject(1654,1517.8679,-1565.2029,23.5469,6);
MoveObject(1282,1517.8679,-1565.2029,23.5469,6);
MoveObject(1282,1517.8679,-1565.2029,23.5469,6);
MoveObject(1282,1517.8679,-1565.2029,23.5469,6);
MoveObject(1282,1517.8679,-1565.2029,23.5469,6);
MoveObject(1228,1517.8679,-1565.2029,23.5469,6);
MoveObject(1228,1517.8679,-1565.2029,23.5469,6);
MoveObject(1228,1517.8679,-1565.2029,23.5469,6);
MoveObject(1228,1517.8679,-1565.2029,23.5469,6);
MoveObject(1228,1517.8679,-1565.2029,23.5469,6);
MoveObject(1228,1517.8679,-1565.2029,23.5469,6);
MoveObject(1282,1517.8679,-1565.2029,23.5469,6);
MoveObject(1282,1517.8679,-1565.2029,23.5469,6);
MoveObject(1282,1517.8679,-1565.2029,23.5469,6);
MoveObject(1282,1517.8679,-1565.2029,23.5469,6);
MoveObject(1650,1517.8679,-1565.2029,23.5469,6);
MoveObject(1650,1517.8679,-1565.2029,23.5469,6);
MoveObject(1650,1517.8679,-1565.2029,23.5469,6);
MoveObject(1650,1517.8679,-1565.2029,23.5469,6);
return 1;
}




Re: [Question Of Scripting] CreateObject/MoveObject - JaTochNietDan - 04.08.2009

MoveObject uses the ID of the object, not the modelid that the objects use, are you sure this is what you are using? You can store the objectid in an array, like so:

pawn Код:
new Variable[10];

Variable[0] = CreateObject(....);
Variable[1] = CreateObject(....);
Then you can move them by referring to Variable[id] for the objectid, like so:

pawn Код:
MoveObject(Variable[0],................);
Hope that helps you


Re: [Question Of Scripting] CreateObject/MoveObject - TheGtaLover - 05.08.2009

Quote:
Originally Posted by JaTochNietDan
MoveObject uses the ID of the object, not the modelid that the objects use, are you sure this is what you are using? You can store the objectid in an array, like so:

pawn Код:
new Variable[10];

Variable[0] = CreateObject(....);
Variable[1] = CreateObject(....);
Then you can move them by referring to Variable[id] for the objectid, like so:

pawn Код:
MoveObject(Variable[0],................);
Hope that helps you
Im new in scripting.. So.. I wish. I knew wth.. you talking about .. :/


Re: [Question Of Scripting] CreateObject/MoveObject - TheGtaLover - 05.08.2009

Sorry. Double post
but.. Wondering.. If.. Like, Someone can edit the command below.. where all the objects can move?? or??

Quote:

if(strcmp(cmd, "/onroof", true) == 0) {
SendPlayerFormattedText(playerid,"The road block is now on the roof near By,", 0);
MoveObject(1225,1517.8679,-1565.2029,23.5469,6);
MoveObject(1225,1517.8679,-1565.2029,23.5469,6);
MoveObject(1225,1517.8679,-1565.2029,23.5469,6);
MoveObject(1225,1517.8679,-1565.2029,23.5469,6);
MoveObject(1225,1517.8679,-1565.2029,23.5469,6);
MoveObject(1225,1517.8679,-1565.2029,23.5469,6);
MoveObject(1654,1517.8679,-1565.2029,23.5469,6);
MoveObject(1282,1517.8679,-1565.2029,23.5469,6);
MoveObject(1282,1517.8679,-1565.2029,23.5469,6);
MoveObject(1282,1517.8679,-1565.2029,23.5469,6);
MoveObject(1282,1517.8679,-1565.2029,23.5469,6);
MoveObject(1228,1517.8679,-1565.2029,23.5469,6);
MoveObject(1228,1517.8679,-1565.2029,23.5469,6);
MoveObject(1228,1517.8679,-1565.2029,23.5469,6);
MoveObject(1228,1517.8679,-1565.2029,23.5469,6);
MoveObject(1228,1517.8679,-1565.2029,23.5469,6);
MoveObject(1228,1517.8679,-1565.2029,23.5469,6);
MoveObject(1282,1517.8679,-1565.2029,23.5469,6);
MoveObject(1282,1517.8679,-1565.2029,23.5469,6);
MoveObject(1282,1517.8679,-1565.2029,23.5469,6);
MoveObject(1282,1517.8679,-1565.2029,23.5469,6);
MoveObject(1650,1517.8679,-1565.2029,23.5469,6);
MoveObject(1650,1517.8679,-1565.2029,23.5469,6);
MoveObject(1650,1517.8679,-1565.2029,23.5469,6);
MoveObject(1650,1517.8679,-1565.2029,23.5469,6);
return 1;
}




Re: [Question Of Scripting] CreateObject/MoveObject - TheGtaLover - 05.08.2009

Sorry for triple post.. lol

OKAY im locking topic, i found out how!