01.10.2015, 14:22
If you already have your objects in sa-mp you only need to add a offset to all of them to move them together
Example
Well afterwards you need to save the objects again
Example
pawn Код:
// Global
new
gMapStart,
gMapEnd
;
// Init
gMapStart = CreateObject(...);
//...
gMapEnd = CreateObject(...);
// Command
ZCMD:movemap(playerid, params[]) {
new
Float: oX,
Float: oY,
Float: oZ,
Float: tX,
Float: tY,
Float: tZ
;
GetPlayerPos(playerid, tX, tY, tZ);
GetObjectPos(gMapStart, oX, oY, oZ);
oX -= tX;
oY -= tY;
oZ -= tZ;
for(playerid = gMapStart; playerid <= gMapEnd; ++playerid) {
GetObjectPos(playerid, tX, tY, tZ);
SetObjectPos(playerid, tX - oX, tY - oY, tZ - oZ);
}
return true;
}