Raised This Month: $32 Target: $400
 8% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Nocky
Member
Join Date: Oct 2013
Location: Czech Republic
Plugin ID:
8285
Plugin Version:
1.0
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Old 11-12-2022 , 14:09   [ANY] Vouchers Core (1.0) [12-Nov-2022]
    Reply With Quote #1

    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
    Spoiler


    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
    __________________
    Taking paid private requests! Contact me on steam/discord!

    Steam | Discord: Nocky#0001 | Github
    Nocky is offline
    paulo_crash
    AlliedModders Donor
    Join Date: May 2016
    Location: Brazil
    Old 11-13-2022 , 08:23   Re: [ANY] Vouchers Core (1.0) [12-Nov-2022]
    Reply With Quote #2

    Liked, I'll be testing the plugin.
    paulo_crash is offline
    Nocky
    Member
    Join Date: Oct 2013
    Location: Czech Republic
    Old 11-13-2022 , 13:55   Re: [ANY] Vouchers Core (1.0) [12-Nov-2022]
    Reply With Quote #3

    Quote:
    Originally Posted by paulo_crash View Post
    Liked, I'll be testing the plugin.

    Thanks, i welcome any suggestions
    __________________
    Taking paid private requests! Contact me on steam/discord!

    Steam | Discord: Nocky#0001 | Github
    Nocky is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 01:06.


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