Help me with MAP :( - 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: Help me with MAP :( (
/showthread.php?tid=590570)
Help me with MAP :( -
JizZy00 - 01.10.2015
Hey,
I want to move that all map on Verona Beach. But its too hard, here is many objects to map.
Can i move that all map to verona beach?
Pls
Re: Help me with MAP :( -
JizZy00 - 01.10.2015
PLSSSSSSSSSSSSS
AW: Help me with MAP :( -
Nero_3D - 01.10.2015
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
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;
}
Well afterwards you need to save the objects again