[FilterScript] [FS] Zinglish's Lotto Draw (source only)
#8

HElp

new ValidNumber = 1;
new params[128];
dcmd(lotto,5,cmdtext);
dcmd_lotto(playerid, params[128])
{
if(sscanf(params,"i", chosenLottoNumber[playerid]))
{
SendClientMessage(playerid, COLOR_RED, "Usage: /lotto [number 1-50]");
SendClientMessage(playerid, COLOR_RED, "The lotto costs $200");
}
else if(chosenLottoNumber[playerid] < 1 || chosenLottoNumber[playerid] > 50)
{
SendClientMessage(playerid, COLOR_RED, "Number must be between 1 and 50");
}
else if(hasPlayedLotto[playerid] == 0)
{
if(GetPlayerMoney(playerid) < 200)
{
SendClientMessage(playerid, COLOR_RED, "You do not have the $200 to pay for the lotto ticket");
}
if(GetPlayerMoney(playerid) > 200)
{
for(new i; i < MAX_PLAYERS; i++)
{
if(pLottoNumber[playerid] == pLottoNumber[i] && pLottoNumber[playerid] != pLottoNumber[playerid])
{
ValidNumber = 0;
}
}
if(ValidNumber == 1)
{

format(string, sizeof(string), "You have played the lotto with number %i on you ticket", chosenLottoNumber[playerid]);
SendClientMessage(playerid, COLOR_YELLOW, string);
TakePlayerCash(playerid, 200);
hasPlayedLotto[playerid] = 1;
pLottoNumber[playerid] = chosenLottoNumber[playerid];
}
if(ValidNumber == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, "Number has already been chosen");
}
}
}
else if(hasPlayedLotto[playerid] == 1)
{
SendClientMessage(playerid, COLOR_YELLOW, "You have already played the lotto");
}
return 1;
}


what is wrong
C:\Documents and Settings\onecorp\Рабочий стол\Архив WinRAR\lost13.pwn(1551) : error 017: undefined symbol "dcmd_lotto"
C:\Documents and Settings\onecorp\Рабочий стол\Архив WinRAR\lost13.pwn(1552) : error 017: undefined symbol "dcmd_lotto"
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)