Promocionar servidor

CSB Vote Rewards pays your players for voting. Every vote for a server on Counter-Strike Boost, on the website or from our Discord bot, gives the voter a code like BXCM-GPWY. The player types /redeem BXCM-GPWY in chat, the plugin checks that it is a vote for your server and that it was not used before, and gives the reward. Each code pays out once, even if you run several servers with the same key.

It talks to the Vote codes API over HTTPS through the AmxxEasyHttp module, so the request never freezes the server while a code is checked.

Features

  • /redeem CODE (or !redeem) in chat; the code is hidden from other players.
  • /vote shows where to vote for this server.
  • Rewards in any combination: in-game money, a server command of your choice, or the csb_vote_redeemed forward for your own VIP or shop plugin.
  • Optional age limit, so only today's vote pays (24 hours by default).
  • Case, spaces and the dash do not matter when typing a code.
  • Clear messages for a used code, a code from another server, and a service that is down; the code is never spent when the reward could not be given.
  • Every reward is written to the AMX Mod X log with the player's SteamID and voting account.

Requirements

  • AMX Mod X 1.9 or newer.
  • The AmxxEasyHttp module (MIT licence, by Next21 Team).
  • A vote codes key for your server. Open your server's page on Counter-Strike Boost, go to the Votes tab and press Make API key. It is shown once.

Installation

  1. Download AmxxEasyHttp from its GitHub releases and put the module file for your system (.so for Linux, .dll for Windows) in addons/amxmodx/modules/.
  2. Download csb_vote_rewards.amxx here, put it in addons/amxmodx/plugins/ and add csb_vote_rewards.amxx to addons/amxmodx/configs/plugins.ini.
  3. Add your key to addons/amxmodx/configs/amxx.cfg: csb_vr_key "csbv_...".
  4. Change the map, vote for your own server and try /redeem with the code you get.

Giving your own reward

Set csb_vr_command to any server command; %userid%, %steamid% and %name% are filled in. For example csb_vr_command "amx_givepoints #%userid% 100". A plugin can also listen for public csb_vote_redeemed(id, const code[], const account[]). Set csb_vr_money 0 if you only want your own reward.

Troubleshooting

  • "Vote rewards are not set up on this server yet": csb_vr_key is empty.
  • "not set up correctly" and 401 in the AMX Mod X log: the key was replaced or deleted on the Votes tab. Make a new one and update amxx.cfg.
  • The plugin shows as bad load: the AmxxEasyHttp module is missing or did not load (amxx modules in the server console lists it).
  • /vote shows a local address: set csb_vr_server to your public ip:port.