SA-MP Forums Archive
Item random spawn - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Item random spawn (/showthread.php?tid=90701)



Item random spawn - Geekzor - 09.08.2009

How to make that The Item Arrmor/HP/Gun can random spawn ?


Re: Item random spawn - Burridge - 09.08.2009

https://sampwiki.blast.hk/wiki/CreatePickup
https://sampwiki.blast.hk/wiki/AddStaticPickup


Re: Item random spawn - Geekzor - 10.08.2009

hmm ye i check but how i can script that ? so i need that the item will random spawn at cords x y z or x y z or x y z etc how to make that ?

EDIT: Atm i just make that the item spawn somewhere but i need random spawns. ...


Re: Item random spawn - RSX - 10.08.2009

Why don't you just make like:
new RND;
RND=random(sizeof(Xcoords));
CreatePickup(model,type,Xcoords[RND],Ycoords[RND],Zcoords[RND]);
Or for smaller sys
new RND
RND=random(TOTALnumberOFrandomOptions)
switch(RND)
{
case 1:CreatePickup(model,type,X,Y,Z);
case 2:CreatePickup(model,type,X,Y,Z);
case 3:CreatePickup(model,type,X,Y,Z);
}


Re: Item random spawn - Geekzor - 10.08.2009

ow i think i need this one but can u explain this : TOTALofRANDOM... idk what u say lol

edit: this one RND=random(TOTALnumberOFrandomOptions) - TOTALnumberOFrandomOptions


Re: Item random spawn - MadeMan - 10.08.2009

This is the number of different pickup coords you have.


Re: Item random spawn - Gamer_Z - 10.08.2009

look into some other maps how they make random spawns.. lol


Re: Item random spawn - Geekzor - 10.08.2009

ty i will try


Re: Item random spawn - Geekzor - 10.08.2009

oh sry fpr dubble post but i forget to ask i should put this udner on player pickup pickup ?