need help
#2

Код:
CMD:game(playerid, params[])
{
    new number, number2, price, msg[125];
    if(sscanf(params, "ddd", number, number2, price)) return SendClientMessage(playerid, COLOR_ORANGE, "USAGE:/game [num1] [num2] [price]");
    SendClientMessage(playerid, COLOR_YELLOW, "Remember that the price is automaticly multiplied with 10");
    new dice = random(6)+1; // 0-5 +1 = 1-6
    if(dice == number || dice == number2)
    {
        format(msg, sizeof(msg), "You won $%d, you can come again in 2 hours to play again this game.", price*10);
        SendClientMessage(playerid, COLOR_GREEN, msg);
        GivePlayerMoney(playerid, price*10);
    }
    else
    {
        format(msg, sizeof(msg), "You have lose $%d Have a nice day. Come back in 2 hours.", price);
        SendClientMessage(playerid, COLOR_RED, msg);
        GivePlayerMoney(playerid, - price); 
    }
    return 1;
}
The best thing about the game is that you can play it non-stop!(even when you have cash on negative side). Odds to guess correct are like 1/3... If you play 10 game on the same bet, one win is enough to win all the cash back..
Reply


Messages In This Thread
need help - by Rafa - 25.08.2011, 11:43
Re: need help - by iMonk3y - 25.08.2011, 12:06
Re: need help - by Rafa - 25.08.2011, 12:18
Re: need help - by Dragony92 - 25.08.2011, 12:23
Re: need help - by Rafa - 25.08.2011, 12:36
Re: need help - by Pinguinn - 25.08.2011, 12:47
Re: need help - by iMonk3y - 25.08.2011, 12:51
Re: need help - by Rafa - 25.08.2011, 13:11
Re: need help - by =WoR=Varth - 27.08.2011, 03:10

Forum Jump:


Users browsing this thread: 1 Guest(s)