Raised This Month: $ Target: $400
 0% 

How to block buy shield?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jonatat
Senior Member
Join Date: Dec 2017
Old 07-03-2018 , 14:33   How to block buy shield?
Reply With Quote #1

I have simple script to block shield:

PHP Code:
register_clcmd("shield""blockshield");
public 
blockshield(id)
{
client_printcolor(id"U can't buy shield at this time!");
return 
PLUGIN_HANDLED;

But i can still buy shield... Any info?
jonatat is offline
maqi
Senior Member
Join Date: Apr 2017
Location: Serbia
Old 07-03-2018 , 14:36   Re: How to block buy shield?
Reply With Quote #2

My eyes, how does that block anything ?
__________________
stuff
maqi is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 07-03-2018 , 15:37   Re: How to block buy shield?
Reply With Quote #3

Quote:
Originally Posted by maqi View Post
My eyes, how does that block anything ?
Why not? As CS Weapon Info (https://wiki.alliedmods.net/CS_Weapons_Information) says, shield is buyname of weapon_shield so you can block it through register_clcmd. But this guy posted code that must work in my case. I failed?
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM

Last edited by Ghosted; 07-03-2018 at 15:39.
Ghosted is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 07-03-2018 , 14:39   Re: How to block buy shield?
Reply With Quote #4

https://forums.alliedmods.net/showthread.php?t=240199

But this is for Amx Mod X 1.8.3
__________________








CrazY. is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 07-03-2018 , 16:10   Re: How to block buy shield?
Reply With Quote #5

Use default amxmodx weapon restriction plugin;

or just

https://forums.alliedmods.net/showthread.php?p=1308465
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
jonatat
Senior Member
Join Date: Dec 2017
Old 07-03-2018 , 16:21   Re: How to block buy shield?
Reply With Quote #6

Quote:
Originally Posted by ^SmileY View Post
Use default amxmodx weapon restriction plugin;

or just

https://forums.alliedmods.net/showthread.php?p=1308465
Thanks smiley for answers, with last one i getting error FATAL ERROR: Host_Error: no precache: models/w_shield.mdl
jonatat is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 07-04-2018 , 03:41   Re: How to block buy shield?
Reply With Quote #7

Quote:
Originally Posted by jonatat View Post
Thanks smiley for answers, with last one i getting error FATAL ERROR: Host_Error: no precache: models/w_shield.mdl
Cause there's shield is spawning somewhere and settings its model to w_shield
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM
Ghosted is offline
CrAzY MaN
Senior Member
Join Date: Mar 2017
Location: India
Old 07-04-2018 , 03:21   Re: How to block buy shield?
Reply With Quote #8

Why don't you use default Weapon Restriction?
__________________
CrAzY MaN is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-04-2018 , 08:05   Re: How to block buy shield?
Reply With Quote #9

Ever heard of amx_restmenu and amx_restrict? You have them in your server.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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 12:16.


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