View Single Post
Author Message
StrikeR14
AlliedModders Donor
Join Date: Apr 2016
Location: Behind my PC
Old 03-31-2020 , 18:25   [TF2] Giveaway System
Reply With Quote #1

[TF2] Giveaway System


Hi !
This is the first plugin that I'm posting here. I hope I'm not breaking any rules and I hope you enjoy this plugin.



Description:

This plugin gives you a system that allows admins to host giveaways and randomize winners.
Players can only win if they enter the giveaway by picking a number with the /ga command.
At the end of the giveaway event, the random winner's name is displayed via a hud, and he receives a redeem code in order to confirm that he's the real winner in front of the host of the giveaway.
The plugin only works for TF2 since many TF2 particles and sounds apply to players during the giveaway event.

NOTE: Multiple giveaways at once are not supported.

ConVars:
  • sm_giveaway_time - Duration of the giveaway event in seconds (default: 20)

Commands:
  • sm_sga <redeem code> <prize> - Command for admins to start the giveaway event (default flag: RCON).
  • sm_startgiveaway <redeem code> <prize> - Same as above.
  • sm_aga - Command for admins to stop the running giveaway (default flag: RCON).
  • sm_abortgiveaway - Same as above.
  • sm_ga <1-100> - Command for players to pick a number in the range 1-100, in order for them to enter the running giveaway.
  • sm_giveaway <1-100> - Same as above.

Screenshots:





Installation:
  1. Make sure you have MoreColors.inc installed on your server.
  2. Place the .smx file in addons/sourcemod/plugins
  3. Reload the map and enjoy!

Changelog:

Code:
1.0 - Initial Release
Attached Files
File Type: sp Get Plugin or Get Source ([TF2] Giveaway.sp - 184 views - 8.4 KB)
File Type: smx [TF2] Giveaway.smx (15.8 KB, 217 views)
__________________
Currently taking TF2/CSGO paid private requests!

My Plugins | My Discord Account

Last edited by StrikeR14; 04-01-2020 at 04:58. Reason: I replaced a reply message in the code
StrikeR14 is offline