I need help in how to block a command from a client
Hello, everybody:
I'm having trouble in securing a Metamod plugin and I'm trying to do it using a AMX Mod X plugin I'm writing myself. The situation involves PODBot mm running on a Linux based dedicated server, and the problem is that any user can add, kill or remove bots at will. What I'm trying to do is restrict this only to admins and also for commands run on the server console itself. The commands are "pb" and "podbotmenu" (this one is a client only command I think). I was able to trap both commands either using client_command() and client_PreThink() (both work). The problem is that I'm unable to avoid the commands to pass to the PODBot mm plugin. For instance if I use return PLUGIN_HANDLED_MAIN inside client_command() the command still passes to the other plugin. I set up the Metamod plugins.ini to load AMX Mod X before the PODBot mm as recomended in another post, but I'm unable to achieve what I need. Can anyone please help me out, by explaining how to block a command intended for another plugin if a certain condition is met? If requested I can post the code I already have, but it is a direct implementation of the examples for the two above mentioned functions. Thank you very much, best regards, |
Hello, everybody:
Will anybody be so kind to put me out of my misery? I'm settling for a simple "Give up man, it can't be done". Thank you very much, regards, |
I thought the podbot commands were only accessible from the server console?
Are you sre there isn't a way to fix your problem from the podbot config? |
Hello, sambro:
Quote:
Quote:
Thank you sambro for making me stop and think (I don't do the later so often as I should). I appologize for taking your time. Anyhow, just for my personal satisfaction, can anybody tell me if what I wanted to do is possible at all using AMX Mod X scripting? Regards, |
There may be a way, but I doubt it somewhat, because AMXX and Metamod work at different levels of abstraction.As far as I know, returning PLUGIN_HANDLED only stops other plugins, not other metamod modules.
There IS the FakeMeta module though. I haven't used it but I know that it lets you use ANY half life engine call. So there may be a way to do it from there? Anyways, pb password sounds nice :wink: . Much easier than fooling with FakeMeta I'd imagine. |
Re: I need help in how to block a command from a client
there's a way!!
1) use client_command to hook the command 2) return a plugin_handled that will work :D |
| All times are GMT -4. The time now is 16:45. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.