AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to block buy shield? (https://forums.alliedmods.net/showthread.php?t=308782)

jonatat 07-03-2018 14:33

How to block buy shield?
 
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?

maqi 07-03-2018 14:36

Re: How to block buy shield?
 
My eyes, how does that block anything ?

CrazY. 07-03-2018 14:39

Re: How to block buy shield?
 
https://forums.alliedmods.net/showthread.php?t=240199

But this is for Amx Mod X 1.8.3

Ghosted 07-03-2018 15:37

Re: How to block buy shield?
 
Quote:

Originally Posted by maqi (Post 2600803)
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?

^SmileY 07-03-2018 16:10

Re: How to block buy shield?
 
Use default amxmodx weapon restriction plugin;

or just

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

jonatat 07-03-2018 16:21

Re: How to block buy shield?
 
Quote:

Originally Posted by ^SmileY (Post 2600823)
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

CrAzY MaN 07-04-2018 03:21

Re: How to block buy shield?
 
Why don't you use default Weapon Restriction?

Ghosted 07-04-2018 03:41

Re: How to block buy shield?
 
Quote:

Originally Posted by jonatat (Post 2600825)
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

OciXCrom 07-04-2018 08:05

Re: How to block buy shield?
 
Ever heard of amx_restmenu and amx_restrict? You have them in your server.


All times are GMT -4. The time now is 12:16.

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