A quick help.
#1

I'm working on a house system, and I'd just like to create the pickups only on 6 worlds (0,1,2,3,4,5).
I did it like this:
pawn Код:
new Worlds[7] =
{
    0,1,2,3,4,5
};
So, how can i place the pickup on these worlds?

Код:
CreateDynamicPickup(modelid, type, Float:x, Float:y, Float:z, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 100.0);
What should I enter in the worldid field?
Thanks in advance..
Reply
#2

I guess you could use a loop although I'm not sure if that is the best way to do it.

pawn Код:
for(new i; i < sizeof(Worlds); i ++)
{
//  Usage: "Worlds[i]". Example:
    CreateDynamicPickup(1337, 1, 0.0, 0.0, 0.0, Worlds[i], -1, -1, 100.0);
}
Reply
#3

Use the "Ex" version of the function, which accepts arrays.
Reply
#4

Oh right.. Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)