SA-MP Forums Archive
A quick help. - 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: A quick help. (/showthread.php?tid=526086)



A quick help. - biker122 - 15.07.2014

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..


Re: A quick help. - Dignity - 15.07.2014

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);
}



Re: A quick help. - Vince - 15.07.2014

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


Re: A quick help. - biker122 - 15.07.2014

Oh right.. Thanks