CreateDynamicObjectEx - worldids
#1

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?
Reply
#2

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

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)
Reply
#4

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

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);
Reply
#6

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)