Raised This Month: $51 Target: $400
 12% 

[HELP] Block client cmd command


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
extream87
Senior Member
Join Date: Aug 2011
Old 03-25-2014 , 16:57   [HELP] Block client cmd command
#1

I want block some command with word "STEAM_0:1:" in console.

If i write in console xxxx STEAM_0:1: or STEAM_0:1: xxxx the player is kicked from the server.
(xxxx is some command).

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #define PLUGIN "Block Cmd Word" #define VERSION "1.0" #define AUTHOR "extream87" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_clcmd("//cmd word// STEAM_0:1:", "cmdcommand"); } public cmdcommand(id) {     client_print(id,print_chat,"[AMXX] Command not allowed on this server!")     set_task(2.0, "getout", id) public getout(id) {     client_cmd(id, "quit") }

Last edited by extream87; 03-25-2014 at 17:01.
extream87 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 03-25-2014 , 16:59   Re: [HELP] Block client cmd command
#2

Specifically, what command?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
extream87
Senior Member
Join Date: Aug 2011
Old 03-25-2014 , 17:02   Re: [HELP] Block client cmd command
#3

Various commands.

Maybe if contain (STEAM_0:1: ) cmdcommand(id)

Last edited by extream87; 03-25-2014 at 17:02.
extream87 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 03-25-2014 , 17:03   Re: [HELP] Block client cmd command
#4

I don't believe there is a way. You might be able to with client_command, but I don't know exactly when that gets called
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
extream87
Senior Member
Join Date: Aug 2011
Old 03-25-2014 , 17:08   Re: [HELP] Block client cmd command
#5

But is possible make something like this?

Code:
register_clcmd("xxxx STEAM_0:1:", "cmdcommand");
xxxx (is some command) what i need is to check STEAM_0:1:
extream87 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 03-25-2014 , 17:17   Re: [HELP] Block client cmd command
#6

You would need to hook the command that you want to block and check the parameters passed
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
extream87
Senior Member
Join Date: Aug 2011
Old 03-25-2014 , 17:21   Re: [HELP] Block client cmd command
#7

Check if is good now plz.
Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #define PLUGIN "Block Cmd Word" #define VERSION "1.0" #define AUTHOR "extream87" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_clcmd( "", "ClientCommand" ); } //here public ClientCommand (id, const player) {     if ( ~get_user_flags( player ) & ADMIN_KICK )     {     return PLUGIN_CONTINUE;     }         static message[ 191 ];     read_argv( 1, message, charsmax( message ) );         if ( message[ 0 ] == '!' )     {     static const commandd     [] = "STEAM_0:1:";         if ( equal( message[ 1 ], commandd))     {             cmdcommand(id)     }     }     return PLUGIN_CONTINUE; } // here public cmdcommand(id) {     client_print(id,print_chat,"[AMXX] Command not allowed on this server!");     set_task(2.0, "getout", id); } public getout(id) {     client_cmd(id, "quit"); }

Last edited by extream87; 03-25-2014 at 17:22.
extream87 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 03-25-2014 , 17:23   Re: [HELP] Block client cmd command
#8

Did you even try it?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
extream87
Senior Member
Join Date: Aug 2011
Old 03-25-2014 , 17:26   Re: [HELP] Block client cmd command
#9

Now and not worked

Can you make some fix plz.
extream87 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 03-25-2014 , 17:28   Re: [HELP] Block client cmd command
#10

I told you what to do. Either try client_command or hook each command that you want to block
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Closed Thread



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 05:07.


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