[CSGO] Blocking Left knife
1 Attachment(s)
Description:
Hello Everyone, This plugin basically blocks all the left clicks of your knife. Could be useful for 35hp knife servers if you only want to have right click... Install:
Credits:
Quote:
|
Useful!
Thanks for the plugin! Easy install and works great, got it working right away, plug'n'play! :)
|
Re: [CSGO] Blocking Left knife
You can replace all your if statements with one if:
Code:
if(StrContains(sWeapon, "knife") != -1 || StrEqual(sWeapon, "weapon_bayonet")) |
Re: [CSGO] Blocking Left knife
Quote:
Code:
if(StrContains(sWeapon, "knife", false) != -1 || StrContains(sWeapon, "bayonet", false) != -1) |
Re: [CSGO] Blocking Left knife
Quote:
|
Re: [CSGO] Blocking Left knife
Quote:
|
Re: [CSGO] Blocking Left knife
Quote:
|
Re: [CSGO] Blocking Left knife
I understand what you guys mean but i'll keep it this for now since it's not really a big deal
|
Re: [CSGO] Blocking Left knife
Quote:
Baras example just needs a maximum of two checks. Where IIRC StrContains is less expensive than StrEqual. And when valve adds a new knife the probability is high they will call it somethig like knife (or bayonet), so there will be no need to edit your plugin for a valve update. But the main reason why I decided to post here is: With your method to block the attack players can easily lag the server and make it unplayable. Instead of block the attack on OnPlayerRunCmd I recommend this method: PHP Code:
|
Re: [CSGO] Blocking Left knife
The better way is to get the item definition (m_iItemDefinitionIndex or whatever...) convert it to an id with https://sm.alliedmods.net/new-api/cs...emDefIndexToID and comparing that it is within the range of https://github.com/alliedmodders/sou....inc#L144-L159 or one of the 3 other knifes.
|
All times are GMT -4. The time now is 22:06. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.