Skip to content

Weapons & ZMarket

The weapon module can be used to restict weapons or scale knockback.

Weapon Attributes

Weapon attributes are stored by default in:

addons/sourcemod/configs/zr/weapons.txt

Custom file may be specified in the console variable "zr_config_path_weapons". If used in per map configuration files it must be in a pre configuration file.

These are the allowed attributes:

Weapon Attributes
Attribute: Type: Limits/Requirements:
weaponentity text Name of a valid weapon entity

Name of the weapon entity. See Weapon List (3.8.2) for a list of valid weapon names.

weapontype text Separate items with ", "

The weapon type and a optional list of custom weapon groups.

Pre-defined options:

  • All
  • Pistol
  • Shotgun
  • SMG
  • Rifle
  • Sniper
  • Machine Gun
  • Melee
  • Projectile
  • Equipment
weaponslot number 0 - 3

The slot index the weapon resides in. It's just here to avoid hard coding indexes. Don't change this in the default configuration!

Options:

0Primary weapon slot
1Secondary weapon slot
2Knife slot
3Equipment slot
restrictdefault text "yes" or "no"

The default restricted status of the weapon on map start.

Options:

"yes"Enable
"no"Disable
toggleable text "yes" or "no"

Enable weapon to have restrictions toggled mid-game.

Options:

"yes"Enable
"no"Disable
ammotype text -

Ammo entity that belongs to weapons. Don't change this!

Options:

ammo_50aedeagle
ammo_762mmscout, ak47, g3sg1, aug
ammo_556mm_boxm249
ammo_556mmgalil, sg552, famas, m4a1, sg550
ammo_338magawp
ammo_9mmmp5navy, tmp, glock, elite
ammo_buckshotm3, xm1014
ammo_45acpump45, mac10, usp
ammo_357sigP228
ammo_57mmp90, fiveseven
ammoprice number -

Price of ammo for this weapon.

knockback decimal -

The knock back multiplier for the weapon. 1.0 is no change, 0.5 give half knock back, and 2.0 gives double knock back.

zmarketprice number -

The price of the weapon in ZMarket. Default in configuration file is CS:S buymenu price.

zmarketpurchasemax number -

The max number of purchases allowed per spawn for the weapon.

The file structure is Valve's key/value format where the root section is named "weapons" and a sub section for each weapon using short names from the list below.

Weapon List

Weapon List
Weapon name: Type: Full name:
Glock Pistol Glock 18 Select Fire (9X19mm Sidearm)
USP Pistol .45 USP (K&M .45 Tactical)
P228 Pistol 228 Compact
Deagle Pistol Desert Eagle .50C (Night Hawk .50C)
Elite Pistol .40 Dual Elites
Fiveseven Pistol ES Five-Seven
M3 Shotgun Benelli M3 (Leone 12 Gauge Super)
XM1014 Shotgun Benelli XM1014 (Leone YG1265 Auto Shotgun)
Mac10 SMG Ingram MAC-10
TMP SMG Steyr TMP (Schmidt Machine Pistol)
MP5Navy SMG HK MP5 Navy (KM Sub-Machine Gun)
UMP45 SMG K&M UMP45
P90 SMG FN P90 (ES C90)
Galil Rifle IMI Galil (IDF Defender)
Famas Rifle Giat FAMAS (Clarion 5.56)
AK47 Rifle AK-47 (CV-47)
M4A1 Rifle M4A1 Carbine (Maverick M4A1 Carbine)
SG552 Rifle SIG SG552 (Krieg 552 Commando)
AUG Rifle Steyr AUG (Bullpup)
M249 Machine gun FN M249 (ES M249 Para)
Scout Sniper Steyr Scout (Schmidt Scout)
SG550 Sniper SIG SG550 (Krieg 550 Commando)
G3SG1 Sniper G3/SG-1 (D3/AU-1)
AWP Sniper Arctic Warfare Magnum (Magnum Sniper Rifle)
hegrenade Projectile High explosive grenade
flashbang Projectile Flash bang
smokegrenade Projectile Smoke grenade
NVGs Equipment Night vision goggles
knife Melee Knife

Weapon Commands

Available commands for managing weapon restrictions. These can be used in the main configuration file, or on a per-map basis with map configuration files.

Weapon Commands
Syntax:
zr_restrict <weapon|weapon type> [weapon|weapontype] ...

Restricts one or more weapons or weapon types (group).

Parameters:

weaponThe weapon name.
weapon typeThe weapon type group.
zr_unrestrict <weapon|weapon type> [weapon|weapontype] ...

Unrestricts one or more weapons or weapon types (group).

Parameters:

weaponThe weapon name.
weapon typeThe weapon type group.
zmarket
Displays the ZMarket weapon menu.

Weapon Console Variables

Available console variables for managing weapon functions.

Weapon Console Variables
Console variable: Default:
zr_weapons 1

Enable weapons module, disabling this will disable any weapons-related features.(weapon restrictions, weapon knockback multipliers, etc)

Options:
0 or 1

zr_weapons_restrict 1

Enable weapon restriction module, disabling this will disable weapon restriction commands.

Options:
0 or 1

zr_weapons_restrict_endequip 1

Attacker receives amount of cash equivalent to the damage that was inflicted. If this one is enabled, the zr_account_cashfill and zr_account_cashfill_value console variables is ignored.

Options:
0 or 1

zr_weapons_infect_removeknife 1

If this one is enabled, the infected client will get a new knife entitie. That can fixes the knife displayed position (depending the player model..)

Options:
0 or 1

ZMarket Console Variables

Available console varialbes for managing ZMarket module.

ZMarket Console Variables
Console variable: Default:
zr_weapons_zmarket 1

Allow player to buy from a list of weapons in the weapons config.

Options:
0 or 1

zr_weapons_zmarket_buyzone 1

Requires player to be inside a buyzone to use ZMarket. [Dependency: zr_weapons_zmarket]

Options:
0 or 1

zr_weapons_zmarket_norefill 1

Dont allow users to rebuy weapons to refill their clip. [Dependency: zr_weapons_zmarket]

Options:
0 or 1

zr_weapons_zmarket_rebuy 1

44444444444

Options:
0 or 1

zr_weapons_zmarket_rebuy_auto 1

Automatically equip default or loadout weapons. [Dependency: zr_weapons_zmarket & zr_weapons_zmarket_rebuy]

Options:
0 or 1

zr_weapons_zmarket_rebuy_primary P90

Default primary weapon. [Dependency: zr_weapons_zmarket&zr_weapons_zmarket_rebuy]

Options:
See Weapon List

zr_weapons_zmarket_rebuy_secondary Elite

Default secondary weapon. [Dependency: zr_weapons_zmarket&zr_weapons_zmarket_rebuy]

Options:
See Weapon List

zr_weapons_zmarket_freespawn 1

Purchases are free before the first zombie spawns. [Dependency: zr_weapons_zmarket]

Options:
0 or 1