Random + Odds / Maths [PAYING $$$]
#1

If i have lots of odds like, 2:1 and 3:1 and 6/1. How do i work out random like for what odd is infavour to win.

Thanks
Reply
#2

pawn Код:
switch(random(3))
{
case 0:
{
/// do something here
}
case 1:
{
/// do something here
}
case 2:
/// do something here
}
}
if you know what I mean
Reply
#3

No, Look at the odds some horses are better then another horse so they have more chance of that horse winning.
Reply
#4

pawn Код:
switch(random(9))
{
case 0,1,2,3:
{
/// do something here
}
case 4,5,6:
{
/// do something here
}
case 7,8:
/// do something here
}
}
Reply
#5

That dont help me?
Reply
#6

If someone sorts this out. And you have posts above 300+ I will Give You Ј4.00 on Paypal.
Reply
#7

Quote:
Originally Posted by Mr_Tom
If someone sorts this out. And you have posts above 300+ I will Give You Ј4.00 on Paypal.
Okay, but can you at least explain a little bit clearly
I just can't understand with you only saying odds random winnings
and stuff
Reply
#8

Quote:
Originally Posted by Mr_Tom
If someone sorts this out. And you have posts above 300+
Killed the deal right there for me.

Also...
Quote:
b) Do not bump
Some people apparently think they are important enough to bump their own topic after 10 minutes.
You can bump topics when the last reply is at least 12 hours old, and it needs to have useful information about your problem.

Reply
#9

Nah Evolution because your a sa-mp safe 'trusted' member i can make an allowance for you.

Here are four horses in the race.

H1 = 2:1
H2 = 6:1
H3 = 4:1
H4 = 9:1

Obviously the horse that is in favour to win is H1 because if you put 1 cash on you get 2 more. But with horse 4 with the odds of
9:1 that means that its hard for that horse to win. So i need to know how do i work it out on who will win.
So bassicaly the horse with the lowest odds e.g 2:1 will win.
Reply
#10

pawn Код:
new HorseRand[4];
HorseRand[0] = random(3);
HorseRand[1] = random(7);
HorseRand[2] = random(5);
HorseRand[3] = random(10);
if(HorseRand[0] == 0) //Winnar lol
if(HorseRand[1] == 0) //Winnar lol
if(HorseRand[2] == 0) //Winnar lol
if(HorseRand[3] == 0) //Winnar lol
Or

pawn Код:
stock OddsToOne(Odds)
{
  new Rand = random(Odds);
  if(Odds == 1) return 1;
  if(Rand == 0) return 1;
  if(Rand != 0) return 0;
}
Returns 1 if you get the certain one.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)