Skip to content

Settings

K4ryuu edited this page Apr 16, 2024 · 3 revisions

Plugin Configuration Guide

This page describes the configuration options available in the K4Arenas plugin for CounterStrikeSharp. Each setting is outlined with its expected values and usage.

Database Settings

  • Host: The hostname of the database server.
    • Default: "localhost"
  • Username: The username used to access the database.
    • Default: "root"
  • Database: The name of the database to use.
    • Default: "database"
  • Password: The password for accessing the database.
    • Default: "password"
  • Port: The port number on which the database server is running.
    • Default: 3306
  • Sslmode: The SSL mode to use when connecting to the database.
    • Default: "none"
  • Table Prefix: Prefix to be applied to all database tables used by the plugin.
    • Default: ""
  • Table Purge Days: Number of days to keep data before purging.
    • Default: 30

Command Settings

  • Gun Preference Commands: Commands related to setting or viewing preferred guns.
    • Examples: "guns", "gunpref", "weaponpref"
  • Round Preference Commands: Commands related to setting or viewing preferred round types.
    • Examples: "rounds", "roundpref"
  • Queue Commands: Command to view the queue.
    • Examples: "queue"
  • AFK Commands: Command to mark/unmark oneself as AFK.
    • Examples: "afk"
  • Challenge Commands: Commands to initiate challenges.
    • Examples: "challenge", "duel"
  • Challenge Accept Commands: Commands to accept challenges.
    • Examples: "caccept", "capprove"
  • Challenge Decline Commands: Commands to decline challenges.
    • Examples: "cdecline", "cdeny"

Default Weapon Settings

  • Default Rifle: Default rifle weapon. (classname)
    • Default: null
  • Default Sniper: Default sniper weapon. (classname)
    • Default: null
  • Default SMG: Default submachine gun. (classname)
    • Default: null
  • Default LMG: Default light machine gun. (classname)
    • Default: null
  • Default Shotgun: Default shotgun. (classname)
    • Default: null
  • Default Pistol: Default pistol. (classname)
    • Default: null

Compatibility Settings

  • Metamod Skinchanger Compatibility: Enable compatibility with metamod skinchangers.
    • Default: false
  • Force Arena Clantags: Force display of arena-specific clantags.
    • Default: false

Round Settings

Each setting defines a specific type of round within the game, including weapon preferences, team sizes, and equipment.

Properties

TranslationName

  • Type: string
  • Required: Yes
  • Description: The localization key or the display name for this round type. This is used to fetch the translated name for display purposes. If you don't want to add translation to the K4-Arenas lang folder, then its gonna be used as it is.

TeamSize

  • Type: int
  • Default: 1
  • Description: Specifies the number of players per team for this round. It is set to 1 by default, indicating individual play unless specified otherwise.

PrimaryWeapon

  • Type: string?
  • Default: null
  • Description: The specific primary weapon to be used during the round. If null, the round does not enforce a specific primary weapon. (classname)

SecondaryWeapon

  • Type: string?
  • Default: null
  • Description: The specific secondary weapon to be used during the round. If null, the round does not enforce a specific secondary weapon. (classname)

UsePreferredPrimary

  • Type: bool
  • Default: false
  • Description: Indicates whether players should use their preferred primary weapon if no specific primary weapon is defined for the round.

PrimaryPreference

  • Type: WeaponType? (bottom of the page)
  • Default: null
  • Description: Specifies the preferred type of primary weapon if UsePreferredPrimary is set to true. It determines the weapon type preference (e.g., Rifle, Sniper) for the round.

UsePreferredSecondary

  • Type: bool
  • Default: false
  • Description: Indicates whether players should use their preferred secondary weapon if no specific secondary weapon is defined for the round.

Armor

  • Type: bool
  • Default: true
  • Description: Specifies whether players are equipped with armor during the round.

Helmet

  • Type: bool
  • Default: true
  • Description: Specifies whether players are equipped with helmets during the round.

EnabledByDefault

  • Type: bool
  • Default: true
  • Description: Determines whether this round type is enabled by default in player preferences.

Example Configuration

{
  "TranslationName": "k4.rounds.rifle",
  "TeamSize": 1,
  "PrimaryWeapon": "weapon_ak47",
  "SecondaryWeapon": "weapon_p250",
  "UsePreferredPrimary": false,
  "PrimaryPreference": null,
  "UsePreferredSecondary": false,
  "Armor": true,
  "Helmet": true,
  "EnabledByDefault": true
}

 Possible WeaponType values:
 	Rifle - 0
	Sniper - 1
	SMG - 2
	LMG - 3
	Shotgun - 4
	Pistol - 5
	Both Random - 6 (if this set, everything is ignored, and player gets random pistol and primary)