SA-MP Forums Archive
[FilterScript] [FS] Zinglish's Lotto Draw (source only) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] [FS] Zinglish's Lotto Draw (source only) (/showthread.php?tid=106528)



[FS] Zinglish's Lotto Draw (source only) - iron_war_lord - 03.11.2009

[FS] Zinglish's Lotto Draw (source only)
My new name is Zinglish btw
Source: Pastebin
What is it: A filterscript for RPG scripts (Also RPF scripts, like the one I'm working on). Creates a lotto draw, the numbers are randomly generated, and so is the cash prize
How do I use it: Open it up in pawno, and edit it to your liking.

Give credit where credit is needed if you're using this, and if you have edited it.

Features: Known bugs:
cashStocks: When the player receives cash, the cash draw does not disappear, but still changes.


Re: [FS] Zinglish's Lotto Draw (source only) - caribe88 - 04.11.2009

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.


Re: [FS] Zinglish's Lotto Draw (source only) - FUNExtreme - 04.11.2009

How can all other parts work if you can't choose a number ...


Re: [FS] Zinglish's Lotto Draw (source only) - caribe88 - 04.11.2009

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.



Re: [FS] Zinglish's Lotto Draw (source only) - iron_war_lord - 04.11.2009

Sorry guys, when I wrote it, I wrote it then tested it, then added more code, then released it, checked now...There is a bug, working on it now...

EDIT: Fixed the bug (Just had to add one more check, didn't even have to add another line of code lol)


Re: [FS] Zinglish's Lotto Draw (source only) - caribe88 - 04.11.2009

Thanks I will try it out

Edit: Works Perfect on my gm thanks again Zinglish


Re: [FS] Zinglish's Lotto Draw (source only) - DiddyBop - 07.11.2009

niiice


Re: [FS] Zinglish's Lotto Draw (source only) - [1corp]vlad - 21.03.2010

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"


Re: [FS] Zinglish's Lotto Draw (source only) - Kar - 18.06.2010

how do i make it auto start lotto and auto drawlotto


Re: [FS] Zinglish's Lotto Draw (source only) - nuriel8833 - 06.07.2010

Great system! Thank you very much!


Re: [FS] Zinglish's Lotto Draw (source only) - Kerlan - 07.10.2011

This looks bugged? lol