[FilterScript] Lottery System with ticket number system
#1

Lottery System with ticket number system
So this is a lottery system with ticket number system that means in this we pickup a lottery ticket number of our choice and if that number wins we get the prize

Features
-Easy Editing system for lottery settings
-A very short code
-Non - buggy
-Unlike other lottery system the winning will be dependent on the number we chose
-One number per player and we can re-choose number after every draw
-System by which player can donate to lottery
-In this admin do not have to start the lottery again after every draw the lottery keeps on going even if a player wins until admin stops it.
-The prize of lottery resets to a specific prize after a player wins a lottery
-The Lottery prize increases on every draw by a specified amount

Available Commands and its usage
/lottohelp------------------Shows a dialog box with all available lottery related commands.
/startlotto------------------Starts a lottery(Only for admins).
/stoplotto-------------------Stops a lottery(Only for admins).
/ticket [your number]-----Use to buy a ticket with specified number.
/lotto-------------------------Shows current lottery prize and the lucky number if selected.
/addlotto [amount]--------Use to donate the specific amount of money to lottery prize.

Editing Lottery Settings
The lottery settings can be edited by changing the values in define. The information about the valuse is provided in the comment in front of the define. The defines are --
pawn Код:
#define lottoadd 50000  //<------Specifies the amount from which the lottery begins when /startlotto
                        //or when a player wins and also the amount of money to add to lotto at every lotto
#define ticketprice 500  //<----Price of taking a ticket
#define numrange 150  //<-----For number range to specify the winning number should be between 0-numrange
#define lottogap 1   //<-----For the time gap between lottery [the value should be in minutes] [NO DECIMAL VALUE]
#define minlottoadd 100  //<----Specifies the minimum amount of money a player can add to lotto
Some screens of it

---------------------------------------------------------
Download
It can be found here - http://pastebin.com/iE8wrD8v

CREDITS
SAMP Team--------For Making SAMP
YSI------------------For sscanf2 and foreach
Zeex----------------For ZCMD
BroZeus------------For scipting

If any bugs found or you have any suggestion please post it here.
Reply
#2

Hmmmm , nice script that was my next idea to make but congratz!
Reply
#3

Great script but found a "minor" bug.

Its Donate not Doante xD

"You cannot Doante less then 100$"

"Use To Doante To The Lottery"

Either way, looks friggen awesome!
Btw Cool button is way better then the normal "ok" or "close"
Reply
#4

thanks both of u
@Aaron thats what we call imagination about the cool button and i will correct that donate thing
Reply
#5

Nice
Reply
#6

Quote:
Originally Posted by AdHaM612
Посмотреть сообщение
Nice
thanks
Reply
#7

It Got a Bug when i do /addlotto the money got added But my money in hand remain same .
Reply
#8

Quote:
Originally Posted by Uday
Посмотреть сообщение
It Got a Bug when i do /addlotto the money got added But my money in hand remain same .
EDIT : no bug found i think u have tried to modified it and modification is not well done
Reply
#9

Good Job, surely gonna use this
+repped
Reply
#10

E:\gta\filterscripts\lottory.pwn(62) : error 017: undefined symbol "foreach"
E:\gta\filterscripts\lottory.pwn(79) : error 017: undefined symbol "foreach"
E:\gta\filterscripts\lottory.pwn(157) : error 017: undefined symbol "foreach"


3 error.. Help me how to fix it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)