AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   I need help in how to block a command from a client (https://forums.alliedmods.net/showthread.php?t=13274)

Lazarus Long 05-10-2005 07:44

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,

Lazarus Long 05-12-2005 20:08

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,

sambro 05-12-2005 20:17

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?

Lazarus Long 05-13-2005 10:05

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,

sambro 05-13-2005 11:23

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.

excsniper 08-22-2007 23:24

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.