Posts: 180
Threads: 14
Joined: Apr 2008
Reputation:
0
Hey I like your script, but i have a problem
When i put /lotto a number, it says "Number has already been chosen"
That's all the other part works fine.
Posts: 790
Threads: 7
Joined: Mar 2008
Reputation:
0
How can all other parts work if you can't choose a number ...
Posts: 180
Threads: 14
Joined: Apr 2008
Reputation:
0
i mean the admin command to run the lotto works perfect but no the /lotto command to buy a number that's all.
Sorry I didn't express my self in good meaner.
Posts: 180
Threads: 14
Joined: Apr 2008
Reputation:
0
Thanks I will try it out
Edit: Works Perfect on my gm thanks again Zinglish
Posts: 35
Threads: 6
Joined: Jan 2010
Reputation:
0
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"
Posts: 2,938
Threads: 162
Joined: May 2010
how do i make it auto start lotto and auto drawlotto
Posts: 1,157
Threads: 176
Joined: Jun 2009
Reputation:
0
Great system! Thank you very much!