03.04.2010, 22:43
$$Advanced Lottery System$$
This is my version of a lottery script. There are probably tons of out there but I like mine. This is also my first script ever released on the sa-mp forums, though I am not a new scripter. My lottery script contains these wonderful features:
-Realistic Jackpots
The jackpots are realistic because the jackpot determines on how much the ticket cost and how many people purchase tickets. If you set a ticket to $100 and 5 people buy the tickets the initial jackpot would be $500. Although, you can always make it higher, by using a setting that I have put in. You can use JACKPOT_MULTIPLYER, which will multiply the initial jackpot to the number you set it to, so if you use:Код:
#define JACKPOT_MULTIPLYER 2
-Fully Dynamic
All settings you put into the script can be used ingame to change by an admin aslong as:Код:
new EnableAdminCommands=1;
You also have a bunch of other commands and settings you can use to modify the script.
Settings
Код:
//Settings-------------------- #define COLOR 0x06BD12FF //the color of lottery text #define LOTTERY_INTERVAL 1800000 //interval of lottery being drawn; 1800000 = 30 minutes #define JACKPOT_MULTIPLYER 0 //leave blank if you dont want it to multiply the jackpot ammount by the number you put in new LOTTERY_PRICE=100; // the price of a ticket new TICKETS_BUYABLE=2; //ammounts of lottery tickets one person can buy new EnableAdminCommands=1; //0 = no, 1 = yes; allows rcon admins to be able to change settings ingame new EnableLotteryText=1; //0 = no, 1 = yes; shows a textdraw on how much money is in the jackpot //----------------------------
Commands
Text in red is for rcon admins only./buylottery (Buys a lottery ticket)
/lottodraw (Starts a lottery draw instantly)
/lottoprice [amount] (Sets the lottery ticket price to the amount you put in)
/lottotickets [amount] (Sets the amount of tickets one person can buy)
/lottotext (Enables/disables the lottery jackpot textdraw)
Credits:
-lolumadd
-dracoblue (dini)
NOTE: This requires dini by dracoblue
Have fun and remember to reply!