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

Hide commands from others


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NightWalk3r
Junior Member
Join Date: May 2014
Old 05-20-2014 , 11:28   Hide commands from others
Reply With Quote #1

Hi, I am searching for one plugin which I already saw some server using it but I cant find it myself to apply on mine. I need a plugin which hides users commands for "/hp" "/me" "/rs" "/top15" from others to see on the chat, so basically(an example) when I want to restart my score I dont want others to see on chat "NickXX:/rs...thx in advance

Last edited by NightWalk3r; 05-20-2014 at 11:29.
NightWalk3r is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 05-20-2014 , 11:46   Re: Hide commands from others
Reply With Quote #2

The easiest way is to modify the plugin that handles those commands and make them return PLUGIN_HANDLED
__________________
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
NightWalk3r
Junior Member
Join Date: May 2014
Old 05-20-2014 , 16:35   Re: Hide commands from others
Reply With Quote #3

I'm not sure how could I really do that, so if u know how to do it is it a problem to make it for me and upload it, thx in advance.
NightWalk3r is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 05-20-2014 , 16:53   Re: Hide commands from others
Reply With Quote #4

Well, we have no idea what plugins you are using to grant those commands
__________________
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
GinNNy
Senior Member
Join Date: Mar 2014
Old 05-20-2014 , 17:10   Re: Hide commands from others
Reply With Quote #5

you will find the plugins like reset score "client_print(0, print_chat, "%s reset his score", name)


change 0 with id
GinNNy is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 05-20-2014 , 17:43   Re: Hide commands from others
Reply With Quote #6

Quote:
Originally Posted by GinNNy View Post
you will find the plugins like reset score "client_print(0, print_chat, "%s reset his score", name)


change 0 with id
Not what he wanted...
__________________
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
NightWalk3r
Junior Member
Join Date: May 2014
Old 05-20-2014 , 17:45   Re: Hide commands from others
Reply With Quote #7

I have this restart score plugin, I cant manage to work as u said, can u check it out and see?
Attached Files
File Type: sma Get Plugin or Get Source (reset_score.sma - 470 views - 3.3 KB)
NightWalk3r is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 05-20-2014 , 17:54   Re: Hide commands from others
Reply With Quote #8

Try this
Attached Files
File Type: sma Get Plugin or Get Source (reset_score.sma - 517 views - 3.3 KB)
__________________
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
NightWalk3r
Junior Member
Join Date: May 2014
Old 05-20-2014 , 18:17   Re: Hide commands from others
Reply With Quote #9

Omg its working!! thx men

p.s. Is it a problem for u to make this same for /hp /me /rank /top15, which are in statscfg plugin?
Attached Files
File Type: amxx statscfg.amxx (13.5 KB, 67 views)

Last edited by NightWalk3r; 05-21-2014 at 08:29.
NightWalk3r is offline
connoisseur
Senior Member
Join Date: Jan 2012
Old 05-21-2014 , 03:17   Re: Hide commands from others
Reply With Quote #10

You know it would be easier to learn it and modify yourself and save yourself some time waiting for someone else to do it.

I'll show you how to do it.

Say, you wanna hide the /hp command.
Open the plugin in any editor you like.

Look for something like this:
Code:
public plugin_init() {      //some code ..      register_clcmd("say /hp", "<function-name>")  // <-- This is what you're looking for      //some code .. }
Now, you gotta find that function name, which would be something like this:
Code:
public <function-name> {      //some code...      //some code...      return PLUGIN_CONTINUE   // <-- You need to replace this with PLUGIN_HANDLED }
And done.
You can compile the sma after this.
You can use the Web Compiler if you like.
__________________

Last edited by connoisseur; 05-21-2014 at 03:21.
connoisseur 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 08:55.


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