Raised This Month: $ Target: $400
 0% 

I need help in how to block a command from a client


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Lazarus Long
Senior Member
Join Date: Oct 2004
Old 05-10-2005 , 07:44   I need help in how to block a command from a client
Reply With Quote #1

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,
__________________
Lazarus Long is offline
Lazarus Long
Senior Member
Join Date: Oct 2004
Old 05-12-2005 , 20:08  
Reply With Quote #2

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,
__________________
Lazarus Long is offline
sambro
Member
Join Date: May 2005
Old 05-12-2005 , 20:17  
Reply With Quote #3

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?
sambro is offline
Send a message via MSN to sambro
Lazarus Long
Senior Member
Join Date: Oct 2004
Old 05-13-2005 , 10:05  
Reply With Quote #4

Hello, sambro:

Quote:
Originally Posted by sambro
I thought the podbot commands were only accessible from the server console?
No, they are available from any console.

Quote:
Originally Posted by sambro
Are you sre there isn't a way to fix your problem from the podbot config?
I'm so stupid I make myself sick. This led me to have a second look at the "pb help" command and I found out this gem "pb password", so I got my problem solved.

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,
__________________
Lazarus Long is offline
sambro
Member
Join Date: May 2005
Old 05-13-2005 , 11:23  
Reply With Quote #5

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 . Much easier than fooling with FakeMeta I'd imagine.
sambro is offline
Send a message via MSN to sambro
excsniper
New Member
Join Date: Aug 2007
Old 08-22-2007 , 23:24   Re: I need help in how to block a command from a client
Reply With Quote #6

there's a way!!
1) use client_command to hook the command
2) return a plugin_handled

that will work
__________________
Aim For The Head ->
--Sniper
excsniper 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:45.


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