SA-MP Forums Archive
CreateDynamicObject in all worlds(-1) and not in world 0 - 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: CreateDynamicObject in all worlds(-1) and not in world 0 (/showthread.php?tid=479792)



CreateDynamicObject in all worlds(-1) and not in world 0 - Admigo - 07.12.2013

Hello all,

I am making some custom interiors for the server and i want to create the objects in all worlds and not in world 0.
How can i manage that?

Admigo


Re: CreateDynamicObject in all worlds(-1) and not in world 0 - Patrick - 07.12.2013

by checking the parameter you can change the Virtual World to value you want.

pawn Код:
native CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 300.0);
This: worldid = -1 just change the number, PS: the default is -1


Re: CreateDynamicObject in all worlds(-1) and not in world 0 - Admigo - 07.12.2013

Quote:
Originally Posted by pds2k12
Посмотреть сообщение
by checking the parameter you can change the Virtual World to value you want.

pawn Код:
native CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 300.0);
This: worldid = -1 just change the number, PS: the default is -1
I know that but i dont want to create 1000 objects of each...


Re: CreateDynamicObject in all worlds(-1) and not in world 0 - iZN - 07.12.2013

If you want to make the objects in all worlds, simply leave that parameter (worldid) because it is -1 by default. Also I don't get what you need, can you explain more?


Re: CreateDynamicObject in all worlds(-1) and not in world 0 - erminpr0 - 07.12.2013

Quote:
Originally Posted by iZN
Посмотреть сообщение
If you want to make the objects in all worlds, simply leave that parameter (worldid) because it is -1 by default. Also I don't get what you need, can you explain more?
Admigo sorry for posting in your thread and not helping you, but,
I wanna reply to iZN's post:

-Admigo wants to create object in ALL virtual worlds except 0.
So if he uses -1 as worldid, it will create object in ALL world INCLUDING 0..


Re: CreateDynamicObject in all worlds(-1) and not in world 0 - Admigo - 07.12.2013

Quote:
Originally Posted by erminpr0
Посмотреть сообщение
Admigo sorry for posting in your thread and not helping you, but,
I wanna reply to iZN's post:

-Admigo wants to create object in ALL virtual worlds except 0.
So if he uses -1 as worldid, it will create object in ALL world INCLUDING 0..
Yep you are right. Thanks for explaining more.


Re: CreateDynamicObject in all worlds(-1) and not in world 0 - Jefff - 07.12.2013

pawn Код:
CreateDynamicObjectEx(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, Float:drawdistance = 0.0, Float:streamdistance = 200.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players);



Re: CreateDynamicObject in all worlds(-1) and not in world 0 - iZN - 07.12.2013

Thanks for explaining me erminpr0.

Quote:
Originally Posted by Jefff
Посмотреть сообщение
pawn Код:
CreateDynamicObjectEx(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, Float:drawdistance = 0.0, Float:streamdistance = 200.0, worlds[] = { -1 }, interiors[] = { -1 }, players[] = { -1 }, maxworlds = sizeof worlds, maxinteriors = sizeof interiors, maxplayers = sizeof players);
Please check erminpr0's post.

Try doing like this, you can also generate your custom objects through convertffs.com

pawn Код:
new worldz;
if(!IsValidWorld(worldz)
{
    CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldz);
}

stock IsValidWorld(world)
{
    return (1 <= world <= 2147483647);
}