Random weapon and ammo
#2

No it isn't. You use sizeof, which will simply return the size of the array (10). As a result you will you get a random value between 0 and 9 for the variable wp instead of an actual random value from the array.

pawn Код:
new wp = warray[random(sizeof(warray))];
Reply


Messages In This Thread
Random weapon and ammo - by Stoyanov - 06.03.2015, 14:37
Re: Random weapon and ammo - by Vince - 06.03.2015, 14:47
Re: Random weapon and ammo - by Stoyanov - 06.03.2015, 15:29

Forum Jump:


Users browsing this thread: 1 Guest(s)