Lotto help
#1

Hello guys,i've this code to select a lotto number for the draw,but there is a problem.

If i type /lotto - The script will choose automatically the number 0.

How to fix this and show the error message "Use: /lotto 1-30"...?

Here is the code:

pawn Код:
if(!strlen(params))
    {
        SendClientMessage(playerid, 0x62FF32FF, "***Lotto information***");
        SendClientMessage(playerid, 0x62FF32FF, "Pick a number between 1 and 30 with /lotto [1-30]");
        new str[75];
        format(str, sizeof(str), "Current Jackpot is $%d!!", Jackpot);
        SendClientMessage(playerid, 0x62FF32FF, str);
    }
Reply
#2

Код:
if(!strlen(params))
    {
        SendClientMessage(playerid, 0x62FF32FF, "***Lotto information***");
        SendClientMessage(playerid, 0x62FF32FF, "Pick a number between 1 and 30 with /lotto [1-30]");
        new str[75];
        format(str, sizeof(str), "Current Jackpot is $%d!!", Jackpot);
        SendClientMessage(playerid, 0x62FF32FF, str);
        return 1;
    }
:d
Reply
#3

Thanks xD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)