Raised This Month: $32 Target: $400
 8% 

random_num


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
safetymoose
Senior Member
Join Date: Feb 2015
Old 12-11-2015 , 12:25   random_num
Reply With Quote #1

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?
safetymoose is offline
redivcram
Veteran Member
Join Date: Jul 2014
Location: Serbia
Old 12-11-2015 , 13:55   Re: random_num
Reply With Quote #2

Post the code here
redivcram is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-11-2015 , 19:17   Re: random_num
Reply With Quote #3

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

Last edited by Bugsy; 12-11-2015 at 19:18.
Bugsy is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:22.


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