AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] Vouchers Core (1.0) [12-Nov-2022] (https://forums.alliedmods.net/showthread.php?t=340348)

Nocky 11-12-2022 14:09

[ANY] Vouchers Core (1.0) [12-Nov-2022]
 
Description
Create the vouchers/codes/keys that allow players to get vip, credits, various bonuses and privileges by using them.
After using a voucher, the server executes the commands listed in the voucher.

Features
  • Create a random or specific vouchers/codes
  • Vouchers can send multiple server commands
  • Variables can be used for commands (steamid32, steamid64, userid, username)
  • Ability to create vouchers with a specified lifetime, after which the voucher will be deleted
  • Ability to create vouchers with a given number of uses of one voucher (there is protection against reuse of the voucher by one player)
  • If the player writes the voucher/code wrong several times (vouchers_attempts), he will be blocked for specific time (vouchers_block_time)
  • Logging block/unblock/deletion/voucher usage in sourcemod/logs/vouchers_core.txt

Screenshots


Video preview


Commands
Code:

sm_voucher (alias: vouchers;code;codes) - Opens menu with selections
sm_voucher <code> - Voucher usage
sm_voucher_gen "<translation_message>" <voucher_use_count> <voucher_lifetime> - Generate random voucher with parameters
sm_voucher_add <code> "<translation_message>" <voucher_use_count> <voucher_lifetime> - Create specific voucher with parameters
sm_voucher_cmds <code> "<commands>" - Add commands to voucher usage
sm_voucher_del <code> - Delete voucher
sm_voucher_unblock "<steamid>" - Unblocking the player from using the voucher command

Creating vouchers tutorials

Parameters
  • code - voucher/code
  • translation_message - message from translation file (vouchers_messages.phrases.txt), this message will be sent after player uses the voucher (none - disable)
  • voucher_use_count - number of voucher uses (0 - unlimited)
  • voucher_lifetime - voucher lifetime (in minutes | 0 - forever)
  • commands - commands that the server sends after player uses the voucher (commands must be separated with ; Example: sm_slap userid;sm_blind @t;sm_beacon @ct)
  • steamid - player's steamid

Available variables
After player uses the voucher so server send specific commands,
commands can contain these variables:
  • steamid32
  • steamid64
  • userid
  • username
Example usage: sm_voucher_cmds TESTVOUCHER "sm_beacon username"
and if player with name "Nocky" uses the voucher: TESTVOUCHER so server send command: sm_beacon Nocky

Convars
cfg/sourcemod/Vouchers.cfg
Code:

vouchers_attempts - Number of attempts to enter a voucher before obtaining a block (0 - Disabled)
vouchers_block_time - How many minutes will the player be blocked if they enter incorrect vouchers

Installation
  1. Download files
  2. Upload Vouchers.smx, vouchers.phrases.txt and vouchers_messages.phrases.txt
  3. Add and configure custom messages in vouchers_messages.phrases.txt
  4. To addons/sourcemod/configs/databases.cfg you need to add:
    PHP Code:

    "Vouchers"
    {
        
    "driver"        "mysql"
        "host"            "host"
        "database"        "db"
        "user"            "user"
        "pass"            "pass"


  5. Restart server or change map
  6. Configure cvars generated in the new file at cfg/sourcemod/vouchers.cfg

Download
Main repository
Direct download

paulo_crash 11-13-2022 08:23

Re: [ANY] Vouchers Core (1.0) [12-Nov-2022]
 
Liked, I'll be testing the plugin. :bacon!:

Nocky 11-13-2022 13:55

Re: [ANY] Vouchers Core (1.0) [12-Nov-2022]
 
Quote:

Originally Posted by paulo_crash (Post 2792724)
Liked, I'll be testing the plugin. :bacon!:


Thanks, i welcome any suggestions


All times are GMT -4. The time now is 00:50.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.