19.03.2014, 08:45
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 prizeFeatures
-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
---------------------------------------------------------
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.