This is a weapon restrict plugin for CS:S it allows per player restrictions, ability to change the restrict sound and also comes with a warm up system! As of 3.0 it comes with a massive set of natives/forwards to be used by other plugins.
Cvars:
Example Weapon cvars (Will differ for CS:GO)
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:ak47
// -
// Default: "-1"
sm_restrict_ak47_ct "-1"
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:ak47
// –
// Default: “-1”
sm_restrict_ak47_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:aug
// –
// Default: “-1”
sm_restrict_aug_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:aug
// –
// Default: “-1”
sm_restrict_aug_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:awp
// –
// Default: “-1”
sm_restrict_awp_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:awp
// –
// Default: “-1”
sm_restrict_awp_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:c4
// –
// Default: “-1”
sm_restrict_c4 “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:deagle
// –
// Default: “-1”
sm_restrict_deagle_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:deagle
// –
// Default: “-1”
sm_restrict_deagle_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:defuser
// –
// Default: “-1”
sm_restrict_defuser “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:elite
// –
// Default: “-1”
sm_restrict_elite_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:elite
// –
// Default: “-1”
sm_restrict_elite_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:famas
// –
// Default: “-1”
sm_restrict_famas_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:famas
// –
// Default: “-1”
sm_restrict_famas_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:fiveseven
// –
// Default: “-1”
sm_restrict_fiveseven_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:fiveseven
// –
// Default: “-1”
sm_restrict_fiveseven_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:flashbang
// –
// Default: “-1”
sm_restrict_flashbang_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:flashbang
// –
// Default: “-1”
sm_restrict_flashbang_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:g3sg1
// –
// Default: “-1”
sm_restrict_g3sg1_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:g3sg1
// –
// Default: “-1”
sm_restrict_g3sg1_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:galil
// –
// Default: “-1”
sm_restrict_galil_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:galil
// –
// Default: “-1”
sm_restrict_galil_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:glock
// –
// Default: “-1”
sm_restrict_glock_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:glock
// –
// Default: “-1”
sm_restrict_glock_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:hegrenade
// –
// Default: “-1”
sm_restrict_hegrenade_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:hegrenade
// –
// Default: “-1”
sm_restrict_hegrenade_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:knife
// –
// Default: “-1”
sm_restrict_knife_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:knife
// –
// Default: “-1”
sm_restrict_knife_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:m249
// –
// Default: “-1”
sm_restrict_m249_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:m249
// –
// Default: “-1”
sm_restrict_m249_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:m3
// –
// Default: “-1”
sm_restrict_m3_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:m3
// –
// Default: “-1”
sm_restrict_m3_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:m4a1
// –
// Default: “-1”
sm_restrict_m4a1_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:m4a1
// –
// Default: “-1”
sm_restrict_m4a1_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:mac10
// –
// Default: “-1”
sm_restrict_mac10_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:mac10
// –
// Default: “-1”
sm_restrict_mac10_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:mp5navy
// –
// Default: “-1”
sm_restrict_mp5navy_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:mp5navy
// –
// Default: “-1”
sm_restrict_mp5navy_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:nvgs
// –
// Default: “-1”
sm_restrict_nvgs_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:nvgs
// –
// Default: “-1”
sm_restrict_nvgs_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:p228
// –
// Default: “-1”
sm_restrict_p228_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:p228
// –
// Default: “-1”
sm_restrict_p228_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:p90
// –
// Default: “-1”
sm_restrict_p90_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:p90
// –
// Default: “-1”
sm_restrict_p90_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:scout
// –
// Default: “-1”
sm_restrict_scout_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:scout
// –
// Default: “-1”
sm_restrict_scout_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:sg550
// –
// Default: “-1”
sm_restrict_sg550_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:sg550
// –
// Default: “-1”
sm_restrict_sg550_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:sg552
// –
// Default: “-1”
sm_restrict_sg552_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:sg552
// –
// Default: “-1”
sm_restrict_sg552_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:smokegrenade
// –
// Default: “-1”
sm_restrict_smokegrenade_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:smokegrenade
// –
// Default: “-1”
sm_restrict_smokegrenade_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:tmp
// –
// Default: “-1”
sm_restrict_tmp_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:tmp
// –
// Default: “-1”
sm_restrict_tmp_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:ump45
// –
// Default: “-1”
sm_restrict_ump45_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:ump45
// –
// Default: “-1”
sm_restrict_ump45_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:usp
// –
// Default: “-1”
sm_restrict_usp_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:usp
// –
// Default: “-1”
sm_restrict_usp_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:vest
// –
// Default: “-1”
sm_restrict_vest_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:vest
// –
// Default: “-1”
sm_restrict_vest_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon:vesthelm
// –
// Default: “-1”
sm_restrict_vesthelm_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon:vesthelm
// –
// Default: “-1”
sm_restrict_vesthelm_t “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Counter-Terrorists. Weapon: xm1014
// –
// Default: “-1”
sm_restrict_xm1014_ct “-1”
// -1 = unrestricted, 0 = restricted, positive numbers = number allowed for Terrorists . Weapon: xm1014
// –
// Default: “-1”
sm_restrict_xm1014_t “-1”
Warm up cvars
// If 1 disables ff during warmup. If 0 leaves ff enabled
// -
// Default: "1"
sm_warmup_disable_ff "1"
// Enable warmup.
// –
// Default: “1”
sm_warmup_enable “1”
// Weather or not give infinite grenades if warmup weapon is grenades
// –
// Default: “1”
sm_warmup_infinite “1”
// Respawn players during warmup
// –
// Default: “1”
sm_warmup_respawn “1”
// Time after death before respawning player
// –
// Default: “0.5”
sm_warmup_respawn_time “0.5”
// How long in seconds warmup lasts
// –
// Default: “45”
sm_warmup_time “45”
Other cvars
// Set to 0 to allow awp pickup ONLY if it is under the max allowed. Set to 1 to use sm_allow_restricted_pickup method.
// -
// Default: "1"
sm_allow_awp_pickup "1"
// Set to 0 to ONLY allow pickup if under the max allowed. Set to 1 to allow restricted weapon pickup
// –
// Default: “0”
sm_allow_restricted_pickup “0”
// If enabled will count bots in per player restricts
// –
// Default: “1”
sm_perplayer_bots “1”
// If enabled will restrict awp per player count
// –
// Default: “0”
sm_perplayer_restrict “0”
// If enabled will count specs in per player restricts
// –
// Default: “1”
sm_perplayer_specs “1”
// Enables admin immunity so admins can buy restricted weapons Default flag is reserved flag. Override sm_restrict_immunity_level to change.
// –
// Default: “0”
sm_weapon_restrict_immunity “0”
// Sound to play when a weapon is restricted (leave blank to disable)
// –
// Default: “sound/buttons/weapon_cant_buy.wav”
sm_restricted_sound “sound/buttons/weapon_cant_buy.wav”
Admin commands
//Restricts weapon
//Usage sm_restrict <weapon|all|group> <both|ct|t>
//Examples
//
// sm_restrict deagle 0
// sm_restrict @all 1 ct
// sm_restrict pistols 0 t
//
//Flag: ConVar
//
sm_restrict
//Unrestricts weapon
//Usage sm_unrestrict <weapon|all|group> <both|ct|t>
//Examples
//
// sm_unrestrict deagle
// sm_unrestrict @all ct
// sm_unrestrict pistols t
//
//Flag: ConVar
//
sm_unrestrict
//Sets next round as knife round
//Flag: ConVar
//
sm_knives
//Sets next round as pistol round
//Flag: ConVar
//
sm_pistols
//Forces the bomb to be dropped
//Flag: Ban
//
sm_dropc4
//Reloads restrictions
//Flag: ConVar
//
sm_reload_restrictions
//Removes players restricted weapons
//Flag: ConVar
//
sm_remove_restricted
Install:
Note 3.0 and up requires SDKHooks 2.1+ and SourceMod 1.5+
Download the zip and extract the folder. Place the files in the server according to the path in the extracted folder.
To install per map configs or per prefix configs they go in addons/sourcemod/configs/restrict
mapname.cfg will be for maps and blah_.cfg for prefix it MUST have _ after the prefix (examples in the zip for test map and test prefix).
Upgrading to 3.0:
Upgrading from 2.3.X to 3.0 is mostly straight forward.
Make sure to update weapon_restrict.cfg (in the cstrike/cfg/sourcemod folder) since there are new cvars.
If you use a custom sound you now set it via cvar rather than the sound.txt file
Per player has changed dramatically to allow all weapons rather than awp only. Overwrite the file and read the next post on how to set up per player.
Requires SourceMod 1.4 and SDKHooks 2.1 or greater
Changes for 3.1.0 and up
The config is now generated on start (it always was) but I wont include it in the zip anymore as guns differ from cs:s to cs:go. Install everything, start the server make sure weapon restrict loaded (sm plugins list). go to your <moddir>/cfg/sourcemod and edit weapon_restrict.cfg
Requires SM 1.5!
SM 1.9+ VERSION
https://github.com/Drifter321/csgo-c…ct/tree/SM-1.9
Make sure to update translations