SA-MP Forums Random numbers
 New Account Members List Search Today's Posts Mark Forums Read

 01/02/2011, 06:08 PM #1 Jimbo01 Big Clucker   Join Date: Jul 2010 Posts: 154 Reputation: 1 Random numbers I'm making a casino game... with random paying new rand; rand = random(300); Example if numer 5 = he wins 50k... if number 10,20,150 = he wins 25k The question is wich number will come hardly ? My jackpot numer is "1" its hard to get it.... i tested it wich numbers could be the same/hardly ?
 01/02/2011, 06:10 PM #2 Vince Spam Machine     Join Date: Sep 2007 Location: Belgium Posts: 10,079 Reputation: 2655 Re: Random numbers They all have the same chance to be chosen. That's why it is called RANDOM. Random number - A number generated from a large set of numbers, using an algorithm that gives every number an equal probability of occurring. __________________ [Tutorial] Database normalization: Vehicle components - Weapon data - GeoIP and rangebans - Association tables Useful: How NOT to store passwords
01/02/2011, 07:45 PM   #3
Niixie
Gangsta

Join Date: Aug 2008
Location: Denmark
Posts: 523
Reputation: 3
Re: Random numbers

Quote:
 Originally Posted by Vince They all have the same chance to be chosen. That's why it is called RANDOM. Random number - A number generated from a large set of numbers, using an algorithm that gives every number an equal probability of occurring.
You use it like this

pawn Code:
new rand = random([b]300[/b]);

The less the bolded number is, the bigger changes is there for winning.
__________________
Code:
____      __    __    __    ___       ___    __    ________
|    \    |  |  |  |  |  |  \   \     /   /  |  |  |   _____|
|     \   |  |  |  |  |  |   \   \_ _/   /   |  |  |  |
|  |\  \  |  |  |  |  |  |    \    |    /    |  |  |  |__
|  | \  \ |  |  |  |  |  |    /   _|_   \    |  |  |   __|
|  |  \  \|  |  |  |  |  |   /   /   \   \   |  |  |  |_____
|__|   \_____|  |__|  |__|  /___/     \___\  |__|  |________|

 Thread Tools Display Modes Linear Mode

 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 Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post psoftware Help Archive 7 31/12/2010 06:14 PM Rainbow_Six Help Archive 4 21/10/2010 06:08 PM Torran Help Archive 1 02/04/2010 07:51 PM SiJ Help Archive 6 09/08/2009 02:14 PM *BueNoOo* Help Archive 11 18/06/2009 04:13 PM

All times are GMT. The time now is 12:58 PM.

 -- (EN) English -- (RU) Русски SA-MP - Archive - Top