CMD:lotto(playerid, params[]);
{
new rand = random(sizeof(LN));
new number;
if(sscanf(params,"i", number)) return SendClientMessage(playerid, 0xFF0000AA, "/snw [1-10]");
else if ( number > 10 || number < 1) return SendClientMessage(playerid, 0xFF0000AA, "choose a number From 1-10");
else if (number <> LN [rand][rand]) return SendClientMessage(playerid, 0xFF0000AA, "You Lost");
else if (number == LN [rand][rand]) return SendClientMessage(playerid, 0x33AA33AA, "You won it!!");
GivePlayerMoney(playerid, 1000000);
return 1;
}
#include <a_samp>
#include <zcmd>
#include <sscanf2>
CMD:lotto(playerid, params[]);
{
new rand = random(sizeof(LN));
new number;
if(sscanf(params,"i", number)) return SendClientMessage(playerid, 0xFF0000AA, "/snw [1-10]");
else if ( number > 10 || number < 1) return SendClientMessage(playerid, 0xFF0000AA, "choose a number From 1-10");
else if (number <> LN [rand][rand]) return SendClientMessage(playerid, 0xFF0000AA, "You Lost");
else if (number == LN [rand][rand]) return SendClientMessage(playerid, 0x33AA33AA, "You won it!!");
GivePlayerMoney(playerid, 1000000);
return 1;
}
CMD:lotto(playerid, params[])//You dont need a semicolon here
{
new rand = random(sizeof(LN));
new number;
if(sscanf(params,"i", number)) return SendClientMessage(playerid, 0xFF0000AA, "/snw [1-10]");
else if ( number > 10 || number < 1) return SendClientMessage(playerid, 0xFF0000AA, "choose a number From 1-10");
else if (number <> LN [rand][rand]) return SendClientMessage(playerid, 0xFF0000AA, "You Lost");
else if (number == LN [rand][rand]) return SendClientMessage(playerid, 0x33AA33AA, "You won it!!");
GivePlayerMoney(playerid, 1000000);
return 1;
}
CMD:lotto(playerid, params[])
{
new rand = random(sizeof(LN));
new number;
if(sscanf(params,"i", number)) return SendClientMessage(playerid, 0xFF0000AA, "/snw [1-10]");
else if ( number > 10 || number < 1) return SendClientMessage(playerid, 0xFF0000AA, "choose a number From 1-10");
else if (number <> LN [rand][rand]) return SendClientMessage(playerid, 0xFF0000AA, "You Lost");
else if (number == LN [rand][rand])
{
SendClientMessage(playerid, 0x33AA33AA, "You won it!!");
GivePlayerMoney(playerid, 1000000);
}
return 1;
}
pawn Код:
Reply if it works or doesn't. OR try this pawn Код:
|