[Question Of Scripting] CreateObject/MoveObject
#1

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,
Reply
#2

Look for Bruzer18's moving gates script it explains it.
Reply
#3

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;
}

Reply
#4

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
Reply
#5

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 .. :/
Reply
#6

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;
}

Reply
#7

Sorry for triple post.. lol

OKAY im locking topic, i found out how!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)