Need help with random numbers...
#1

Hello all SA-MP players... I got a little problem here, well I would like to make a Gambling System, then realise it But I am kind of noob in that stuff, so I want to ask you guys for help
I was wondering how to make it working, I want something about 30-40 numbers. Is that code OK ? :

pawn Код:
new LottoNumbers[10][1] = {
{1},
{2},
{3},
{4},
{5},
{6},
{7}
{8}
{9}
{10}
};
Is that code OK ? I would like to make it so when player types /lotto [number] it will start an individual lottery just for him, but he has to pick a number, so if he for example picks a number 1, and the lottery will stop on 1 he will get the money. I would like to get it working, i got some ideas but I am really confused ... Please help me

Maybe some commands like
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new LottoNumbers;

    if(strcmp(cmdtext,"/lotto",true)==0) // then it pops a message " You have to type "/lotto [number]"
  {
  if (PlayerToPoint(3.0, playerid,1653.9108,-1655.2948,22.5156))
  {
    SetPlayerLottery ??? i don't know how to do it :((( So when player selects a number he wants, it starts a lottery with those 10 numbers, and then the lottery stops at some number, if it's the number that player have choosen he get's a money, if it is not, he gets nothing ...
    return 1;
    }
  }
}
Hope you can help me (
Reply


Messages In This Thread
Need help with random numbers... - by *BueNoOo* - 18.06.2009, 11:43
Re: Need help with random numbers... - by Vince - 18.06.2009, 12:01
Re: Need help with random numbers... - by *BueNoOo* - 18.06.2009, 12:08
Re: Need help with random numbers... - by Grim_ - 18.06.2009, 12:09
Re: Need help with random numbers... - by *BueNoOo* - 18.06.2009, 12:20
Re: Need help with random numbers... - by Grim_ - 18.06.2009, 12:22
Re: Need help with random numbers... - by *BueNoOo* - 18.06.2009, 12:30
Re: Need help with random numbers... - by Grim_ - 18.06.2009, 12:31
Re: Need help with random numbers... - by *BueNoOo* - 18.06.2009, 12:36
Re: Need help with random numbers... - by Vince - 18.06.2009, 13:10

Forum Jump:


Users browsing this thread: 1 Guest(s)