Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

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


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
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

Wyświetl pełny artykuł

Odnośnik do komentarza
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...