random for robbery
#2

pawn Код:
new rand = random(10); // How many cases


                switch(rand)
                {
                    case 0, 3, 5, 7: //Case number = a chance
                    {
                        SendClientMessage(playerid, W, "You robbed the bank!" );
                    }
                    case 1, 4, 6, 8: // The more the case numbers the bigger the chance.
                    {
                                  SendClientMessage(playerid, W, "You have been caught!" );
That might do the trick.

EDIT: Changes some of the // to make it more useful.
Reply


Messages In This Thread
random for robbery - by Admigo - 05.05.2011, 19:48
Re: random for robbery - by Vero - 05.05.2011, 19:55
Re: random for robbery - by Admigo - 05.05.2011, 19:58
Re: random for robbery - by Vero - 05.05.2011, 20:04
Re: random for robbery - by Admigo - 05.05.2011, 20:07
Re: random for robbery - by Vero - 05.05.2011, 20:07
Re: random for robbery - by Admigo - 05.05.2011, 20:13
Re: random for robbery - by Vero - 05.05.2011, 20:14

Forum Jump:


Users browsing this thread: 1 Guest(s)