AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   random_num (https://forums.alliedmods.net/showthread.php?t=275948)

safetymoose 12-11-2015 12:25

random_num
 
https://www.amxmodx.org/api/amxmodx/random_num

So i'm using random_num to get a random number. Getting the random number seems to work fine, but i notice that on map change(might as well be server restart) it gets the same number as it did the map before that. Seems like it's getting a random pattern of numbers and repeats it the next round??

I'm not sure about the the other numbers, but the first number is always a guarantee to be the same one that was first last map.

Does anyone know an alternative way to get a random number, hopefully avoiding this sort of thing?

redivcram 12-11-2015 13:55

Re: random_num
 
Post the code here

Bugsy 12-11-2015 19:17

Re: random_num
 
That's only coincidental. The random_num() function has no idea that you just changed maps. Are you using a small range of numbers?


All times are GMT -4. The time now is 18:15.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.