Money update
#2

pawn Код:
CMD:dice1(playerid)
{
    new dice = 1 + random(2);
   
    switch (dice)
    {
        case 1:
    {
        SendClientMessage(playerid,-1,"A picat un numar impar.");
        SendClientMessage(playerid,-1,"Ai pierdut 1.000.000");
        GivePlayerMoney(playerid, -1000000);
    }
        case 2:
    {
        SendClientMessage(playerid,-1,"A picat un numar par.");
        SendClientMessage(playerid,-1,"Ai castigat 1.000.000");
        GivePlayerMoney(playerid, 1000000);
    }
    return 1;
}
Use switch, it's much faster. And that return 2; was useless.

In /stats command, creating a string with 500 cells is useless if you're showing only 3 variables.
Reply


Messages In This Thread
Money update - by Calinut200 - 26.10.2018, 21:29
Re: Money update - by KinderClans - 26.10.2018, 21:36
Re: Money update - by Calinut200 - 26.10.2018, 21:43
Re: Money update - by KinderClans - 26.10.2018, 21:49
Re: Money update - by Calinut200 - 26.10.2018, 21:55
Re: Money update - by KinderClans - 26.10.2018, 21:56
Re: Money update - by Calinut200 - 26.10.2018, 22:32
Re: Money update - by kristo - 27.10.2018, 00:49
Re: Money update - by KinderClans - 27.10.2018, 01:00
Re: Money update - by kristo - 27.10.2018, 01:38

Forum Jump:


Users browsing this thread: 1 Guest(s)