[ANY] Roll Giveaway (v1.1 | 01-10-2014)
Picture on left: roll_show "0". Picture on right: roll_show "1".
Why did I make this plugin?
Roll Giveaway was originally created as a private plugin requested by an AlliedMods user. After finishing the plugin I was considering the usefulness of it on my own servers and thought I'd share it with the rest of the community.
What does this plugin do?
- Roll Giveaway allows admins to start dice roll giveaways meaning everyone can roll a dice and whoever gets the highest number wins! The winner is shown in chat for everyone to see.
- This plugin can also be used for many other reasons, not just giveaways, so don't feel restricted to using it only for giveaways due to the title.
Features:
- Ability to start and stop dice roll giveaways.
- Winner is announced in chat.
- Chat colour support using multicolors.inc
- Configurable translations file.
- Configurable dice roll conditions.
- If multiple players get the highest number then a random player out of them will win.
Commands:
sm_startroll - Starts a roll giveaway.
sm_rolldice - Rolls a dice to generate a random number.
sm_stoproll - Stops a roll giveaway.
Cvars:
roll_giveaway_version - Roll Giveaway plugin version.
roll_min - The minimum number a player can roll.
roll_max - The maximum number a player can roll.
roll_show - Should players rolls be shown to everyone?
roll_playeralive - Should only alive players be able to roll a dice?
Installation (roll_giveaway.zip):
- Download roll_giveaway.zip
- Extract the contents to a location you will remember.
- Drag and drop the addons folder into the root directory of your server.
- Done.
Credits:
- Thanks to the people that made the multicolors.inc file, you can download it from their GitHub page
here.
- Thanks to
Meitis for assisting me when testing the plugin as well as helping fix a few minor bugs.
- Thanks to
Ownkruid for requesting the plugin and allowing me to release it publicly.
Changelog:
Code:
20-11-2014 (v1.1)
- "sm_roll" changed to "sm_rolldice" to fix conflicts with roll the dice plugins
01-10-2014 (v1.0)
- Initial release
Notes:
- multicolors.inc is required to compile the roll_giveaway.sp (multicolors.inc is included in the zip file if you want to compile the plugin yourself).