SA-MP Forums Archive
Maps gm - 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: Maps gm (/showthread.php?tid=628192)



Maps gm - BrianFaria - 07.02.2017

How to put all maps of gm to another world?


Re: Maps gm - kloning1 - 07.02.2017

if you use CreateObject, you can set object to another world
Code:
CreateObject((modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance = 0.0)
if you use streamer, you can set to another object
Code:
CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_OBJECT_SD, Float:drawdistance = STREAMER_OBJECT_DD, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1, priority = 0);
so, just convert them.


Re: Maps gm - BrianFaria - 07.02.2017

No, I mean, there are a lot of maps and everywhere, what I need is a script or something that passes all mappings to another world


Re: Maps gm - X337 - 07.02.2017

You can use this function to set all created dynamic objects to specific world id, but i wouldn't suggest this method, you can use "Find and Replace" in your script editor instead.
Code:
MoveAllDynamicObjectsToVW(vwid)
{
	for(new i, j = CountDynamicObjects(); i < j; i++)
		if(IsValidDynamicObject(i))
			Streamer_SetIntData(STREAMER_TYPE_OBJECT, i, E_STREAMER_WORLD_ID, vwid);
}
Note: It doesn't work with static objects.


Re: Maps gm - BrianFaria - 07.02.2017

To see, as I pass this map to another world (I just want an example)
Code:
CreateDynamicObject(1557, 275.656005, -1621.033081, 46.010025, 0.000000, 0.000000, 79.400062);



Re: Maps gm - princejeet1510 - 07.02.2017

If you don't need them just comment them by using
PHP Code:
/* this all area will be out of script till you apply */
So (/*) and (*/is to start and close a comment respectively 



Re: Maps gm - BrianFaria - 07.02.2017

Yes, I want to put the maps but in another world, because they interfere with the others.