Prodvigat server

CSB Vote Rewards v1.0.0

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.
Установка
1. Install the AmxxEasyHttp module (https://github.com/Next21Team/AmxxEasyHttp/releases) into addons/amxmodx/modules/
2. Put csb_vote_rewards.amxx in addons/amxmodx/plugins/ and add it to plugins.ini
3. Make a key on your server's Votes tab on counter-strike-boost.com and add csb_vr_key "csbv_..." to amxx.cfg
4. Change map
Cvar-ы8
CVARDefaultDescription
csb_vr_keyYour server's vote codes key (starts with csbv_), from the Votes tab of your server page. Required.
csb_vr_max_age24Only codes from votes in the last N hours pay out. 0 accepts any code that was not used.
csb_vr_money3000Money given for a redeemed code, capped at 16000. 0 gives none.
csb_vr_commandServer command run on a redeemed code. %userid%, %steamid% and %name% are filled in.
csb_vr_announce1Tell everyone when a player gets a vote reward.
csb_vr_cooldown5Seconds a player waits between two /redeem attempts.
csb_vr_serverPublic ip:port shown by /vote. Empty uses the server's own address.
csb_vr_apihttps://api.counter-strike-boost.comAPI address. Leave as is.
Команды3
CommandAccessDescription
say /redeem <code>Redeem a vote code for a reward (also !redeem and say_team).
say /voteShow where to vote for this server.
csb_redeem <code>Redeem a code from the console.
Рейтинг
Оценок пока нет