SA-MP Forums Archive
CreateDynamicObjectEx - worldids - 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: CreateDynamicObjectEx - worldids (/showthread.php?tid=574406)



CreateDynamicObjectEx - worldids - ranme15 - 16.05.2015

Hey,

I wannna create an object for 60 worlds only (1-60), I tried using CreateDynamicObjectEx but it doesn't work.
The function:
Код:
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);
I tried replacing the worlds[] = {-1} in:
Код:
{1, 2, 3, 4, 5}
Код:
new worlds[] = {1,2,3,4,5};   .., worlds
Both gives me an error.
Help?


Re: CreateDynamicObjectEx - worldids - Jefff - 16.05.2015

create array
pawn Код:
new my_worlds[61] = {1,2,3, ...};
before CreateDynamicObjectEx
and replace
pawn Код:
worlds[] = { -1 }
to
pawn Код:
my_worlds



Re: CreateDynamicObjectEx - worldids - ranme15 - 16.05.2015

Quote:
Originally Posted by Jefff
Посмотреть сообщение
create array
pawn Код:
new my_worlds[61] = {1,2,3, ...};
before CreateDynamicObjectEx
and replace
pawn Код:
worlds[] = { -1 }
to
pawn Код:
my_worlds
Did you even read?
I already tried that, it gives me an error:
Код:
error 035: argument type mismatch (argument 11)



Re: CreateDynamicObjectEx - worldids - Jefff - 17.05.2015

Nope it doesn't if you do it good, show your line with CreateDynamicObjectEx


Re: CreateDynamicObjectEx - worldids - ranme15 - 17.05.2015

Quote:
Originally Posted by Jefff
Посмотреть сообщение
Nope it doesn't if you do it good, show your line with CreateDynamicObjectEx
Код:
new worlds[5] = {0,1,2,3,4};

ObjectInfo[i][ObjID] = CreateDynamicObjectEx(ObjectInfo[i][model], ObjectInfo[i][posX], ObjectInfo[i][posY], ObjectInfo[i][posZ], ObjectInfo[i][rotX], ObjectInfo[i][rotY], ObjectInfo[i][rotZ], 300.0, 200.0, worlds, -1, ObjectInfo[i][interior], -1);



Re: CreateDynamicObjectEx - worldids - Jefff - 17.05.2015

Argument 11 is interiors[] you need set -1 in {}
+ you sets ObjectInfo[i][interior] as players[]


Re: CreateDynamicObjectEx - worldids - ranme15 - 17.05.2015

Quote:
Originally Posted by Jefff
Посмотреть сообщение
Argument 11 is interiors[] you need set -1 in {}
+ you sets ObjectInfo[i][interior] as players[]
Much thanks.