Raised This Month: $51 Target: $400
 12% 

[CSS/CS:GO] Weapon Restrict


Post New Thread Reply   
 
Thread Tools Display Modes
SOL9NKA
New Member
Join Date: Apr 2016
Old 05-13-2016 , 10:50   Re: [CSS/CS:GO] Weapon Restrict
Reply With Quote #1851

Quote:
Originally Posted by Dr!fter View Post

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.

THANKS:
psychonic for answering all of my questions and convincing me to make cstrike extension better.
cpnichol for helping test
SpawnPoint for letting me test on their servers.
Snake60 for the awesome logo!

Cvars:

Example Weapon cvars (Will differ for CS:GO)
Spoiler


Warm up cvars
Spoiler


Other Cvars
Spoiler


Admin Commands
Spoiler


Dev Info (include file)
Spoiler

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


Change log:
Spoiler


3.0.5
  • Rewrote everything
  • Optimized everything
  • Added Natives
  • Reworked entire menu
  • Added group restrictions
  • Added translations for weapon names.
  • Added sm_restrict_knife_t and sm_restrict_knife_ct
  • Added check for weapon aliases
  • Improved method of checking buy/rebuy/autobuy (no longer removes and refunds)
  • Now doesnt remove the restricted weapon on pickup instead will not allow pickup
  • Change how sm_restrict and sm_unrestrict @all worked (now restricts knife aswell!)
  • Requires CS:S Weapon tools include for compiling (In the zip)
  • No longer uses gamedata
  • Added Forwards
  • Changed how restrict sound is set (now set via cvar sm_restricted_sound)
  • Added per player support for all weapons
  • Changed how per player worked (now has a default value and the last key found is set for the rest)
  • Added server command sm_perplayer_debug to help debug per player issues.
  • Added sm_allow_awp_pickup to block awp pickup even when allow restricted pickup is set to 1 (will block only if it will go above awp limit prevents the buy and drop and buy exploit on awps)
  • Added sm_perplayer_bots and sm_perplayer_specs to count bots/specs in per player counts
  • No longer requires downloading of sound file.
  • Adds support ammo cvars for grenades.

3.0.6
  • Fixed bug with classnames not being all lowercase.
  • Fixed invalid id error
  • Fixed Special rounds lasting 2 rounds rather than 1.

3.0.7
  • Fixed bug with unrestrict command when passing a team.
  • Fixed a bug when checking perplayer weapons.

3.0.8
  • Fixed bug setting special rounds for after warmup.

3.0.9
  • Fixed bug with weapon aliases.

3.1.0 -> 3.1.4
  • Added support for CS:GO
  • Added better ID checks
  • Fixed bug with restricting knife
  • A bunch of CS:GO bugs

3.1.5
  • Added support for workshop maps.
  • Removed deprecated functions.

3.1.6
  • Fixed taser warmup not working.
Note: all translations need to be updated to 3.0 translations


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!
В чём может быть проблема?
Когда делаю раунд на ножах, или на "диглах", у кого то всё равно остаются нормальные оружия.
What could be the problem?
When doing the round of the knife, or "Diklah", someone still normal weapons.
Перевести вGoogleBing
SOL9NKA is offline
Chaya_
BANNED
Join Date: Jul 2014
Location: Germany
Old 06-09-2016 , 17:51   Re: [CSS/CS:GO] Weapon Restrict
Reply With Quote #1852

Quote:
//// weapon_restrict.sp
//
// restrictinc/cvars.sp(120) : warning 234: symbol "FCVAR_PLUGIN" is marked as deprecated: No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk.
//
//
// restrictinc/adminmenu.sp(404) : error 157: 'int' is a reserved keyword
// restrictinc/adminmenu.sp(405) : error 029: invalid expression, assumed zero
// restrictinc/adminmenu.sp(405) : error 036: empty statement
// restrictinc/adminmenu.sp(413) : error 017: undefined symbol "weaponArray"
// restrictinc/adminmenu.sp(413) : warning 215: expression has no effect
// restrictinc/adminmenu.sp(413) : error 001: expected token: ";", but found "]"
// restrictinc/adminmenu.sp(413) : error 029: invalid expression, assumed zero
// restrictinc/adminmenu.sp(413) : fatal error 190: too many error messages on one line
Any Ideas ?
Chaya_ is offline
Send a message via ICQ to Chaya_ Send a message via Skype™ to Chaya_
Tank_in_Pink
Member
Join Date: Feb 2016
Old 06-14-2016 , 10:18   Re: [CSS/CS:GO] Weapon Restrict
Reply With Quote #1853

I want to make it possible to pick up (for example) the ak47 but i want to disable it in the buy menu. is that possible? If not thats a feature you could think off to add ;)

Last edited by Tank_in_Pink; 06-14-2016 at 10:19.
Tank_in_Pink is offline
[email protected]
Member
Join Date: Mar 2016
Old 06-16-2016 , 01:29   Re: [CSS/CS:GO] Weapon Restrict
Reply With Quote #1854

error > 2016.06.16 update after

Quote:
L 06/16/2016 - 13:28:21: [CSTRIKE] Invalid detour address passed - Disabling detour to prevent crashes
L 06/16/2016 - 13:28:21: [CSTRIKE] HandleCommand_Buy_Internal detour could not be initialized - Disabled OnBuyCommand forward
L 06/16/2016 - 13:28:21: [CSTRIKE] Invalid detour address passed - Disabling detour to prevent crashes
L 06/16/2016 - 13:28:21: [CSTRIKE] HandleCommand_Buy_Internal detour could not be initialized - Disabled OnBuyCommand forward
L 06/16/2016 - 13:28:21: [CSTRIKE] Invalid detour address passed - Disabling detour to prevent crashes
L 06/16/2016 - 13:28:21: [CSTRIKE] HandleCommand_Buy_Internal detour could not be initialized - Disabled OnBuyCommand forward
L 06/16/2016 - 13:28:21: [CSTRIKE] Invalid detour address passed - Disabling detour to prevent crashes
L 06/16/2016 - 13:28:21: [CSTRIKE] HandleCommand_Buy_Internal detour could not be initialized - Disabled OnBuyCommand forward
L 06/16/2016 - 13:28:21: [CSTRIKE] Invalid detour address passed - Disabling detour to prevent crashes
L 06/16/2016 - 13:28:21: [CSTRIKE] HandleCommand_Buy_Internal detour could not be initialized - Disabled OnBuyCommand forward
L 06/16/2016 - 13:28:21: [CSTRIKE] Invalid detour address passed - Disabling detour to prevent crashes
L 06/16/2016 - 13:28:21: [CSTRIKE] HandleCommand_Buy_Internal detour could not be initialized - Disabled OnBuyCommand forward
L 06/16/2016 - 13:28:21: [CSTRIKE] Invalid detour address passed - Disabling detour to prevent crashes
L 06/16/2016 - 13:28:21: [CSTRIKE] HandleCommand_Buy_Internal detour could not be initialized - Disabled OnBuyCommand forward
L 06/16/2016 - 13:28:21: [CSTRIKE] Invalid detour address passed - Disabling detour to prevent crashes
L 06/16/2016 - 13:28:21: [CSTRIKE] HandleCommand_Buy_Internal detour could not be initialized - Disabled OnBuyCommand forward
L 06/16/2016 - 13:28:21: [CSTRIKE] Invalid detour address passed - Disabling detour to prevent crashes
L 06/16/2016 - 13:28:21: [CSTRIKE] HandleCommand_Buy_Internal detour could not be initialized - Disabled OnBuyCommand forward

Last edited by [email protected]; 06-16-2016 at 01:32.
water19753@gmail.com is offline
DoomHammer69
Senior Member
Join Date: Aug 2013
Old 06-16-2016 , 13:49   Re: [CSS/CS:GO] Weapon Restrict
Reply With Quote #1855

Someone can fix please?
__________________


DoomHammer69 is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 06-17-2016 , 19:56   Re: [CSS/CS:GO] Weapon Restrict
Reply With Quote #1856

Quote:
Originally Posted by [email protected] View Post
error > 2016.06.16 update after
Quote:
Originally Posted by DoomHammer69 View Post
Someone can fix please?
this should already be fixed in sourcemods gamedata.

Last edited by Dr!fter; 06-17-2016 at 19:56.
Dr!fter is offline
AbraCadabra
Member
Join Date: Aug 2013
Old 06-20-2016 , 13:06   Re: [CSS/CS:GO] Weapon Restrict
Reply With Quote #1857

I have a problem with sm 1.8: i can buy prohibited weapon ( it must be: is currently restricted to {1} for T/CT and cannot be bought).
After i bought it dropped to the ground and (is currently restricted to {1} for T/CT and cannot be picked up.)

Everything was fine until i update to SM version 1.8.0.5912
AbraCadabra is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 06-21-2016 , 08:23   Re: [CSS/CS:GO] Weapon Restrict
Reply With Quote #1858

Quote:
Originally Posted by AbraCadabra View Post
I have a problem with sm 1.8: i can buy prohibited weapon ( it must be: is currently restricted to {1} for T/CT and cannot be bought).
After i bought it dropped to the ground and (is currently restricted to {1} for T/CT and cannot be picked up.)

Everything was fine until i update to SM version 1.8.0.5912
any errors in logs?
Dr!fter is offline
AbraCadabra
Member
Join Date: Aug 2013
Old 06-21-2016 , 17:22   Re: [CSS/CS:GO] Weapon Restrict
Reply With Quote #1859

No errors in logs but when i try compile i've got this:
Attached Images
File Type: jpg deprecated.jpg (58.3 KB, 319 views)

Last edited by AbraCadabra; 06-21-2016 at 17:23.
AbraCadabra is offline
[email protected]
Member
Join Date: Mar 2016
Old 06-21-2016 , 18:32   Re: [CSS/CS:GO] Weapon Restrict
Reply With Quote #1860

Quote:
Originally Posted by Dr!fter View Post
this should already be fixed in sourcemods gamedata.
Thank you~
water19753@gmail.com 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 16:44.


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