AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hiding clcmd "say /blah" (https://forums.alliedmods.net/showthread.php?t=21929)

Anarchist 12-14-2005 01:06

Hiding clcmd "say /blah"
 
Alright, as seen here,
Code:
register_clcmd("say /lo3", "cmd_live", ADMIN_KICK,"- Custom Second To None Cal-Open Plugin Command")
When this command is used, how can I make it not show the user's message
to everyone (shows the command)(seen below)
'Anarch!st: /lo3'

XxAvalanchexX 12-14-2005 01:16

return PLUGIN_HANDLED instead of PLUGIN_CONTINUE or nothing.

Anarchist 12-14-2005 08:34

Well, I didnt get what you were saying.. Example please?

Code:
#include <amxmodx>   #include <amxmisc> public plugin_init() {       register_plugin("StnCALMod","1.0","Anarch!st")       register_clcmd("say /pregame", "cmd_pg", ADMIN_KICK,"- Custom Second To None Cal-Open Plugin Command")       register_clcmd("say /prelo3", "cmd_prelive", ADMIN_KICK,"- Custom Second To None Cal-Open Plugin Command")       register_clcmd("say /lo3", "cmd_live", ADMIN_KICK,"- Custom Second To None Cal-Open Plugin Command")       register_clcmd("say /halftime", "cmd_half", ADMIN_KICK,"- Custom Second To None Cal-Open Plugin Command")       register_clcmd("say /stop","cmd_endall", ADMIN_KICK,"- Custom Second To None Cal-Open Plugin Command")   }   public cmd_pg(id,level,cid) {       if (!cmd_access(id ,level, cid , 2)) return PLUGIN_CONTINUE       client_print(0,print_chat,"-[A]narch!st CAL- Config Plugin-")       server_cmd("exec pregame.cfg")     return PLUGIN_CONTINUE }   public cmd_prelive(id,level,cid) {       if (!cmd_access(id ,level, cid , 2)) return PLUGIN_CONTINUE       client_print(0,print_chat,"CAL-Open Config has been Started")       client_print(0,print_chat, "Type ready in chat to start the match!")       client_print(0,print_chat,"Match will not start until both teams confirm they are ready")       return PLUGIN_CONTINUE   }   public cmd_half(id , level , cid) {       if (!cmd_access(id ,level, cid , 2)) return PLUGIN_CONTINUE       client_print(0, print_chat, "Good Half Everyone")       server_cmd("sv_restartround 1")       return PLUGIN_CONTINUE   }   public cmd_endall(id,level,cid) {       if (!cmd_access(id ,level, cid , 2)) return PLUGIN_CONTINUE       client_print(0,print_chat, "This Match Has Been Stopped, Thanks for Playing")       server_cmd("sv_restartround 1")       server_cmd("exec server.cfg")       return PLUGIN_CONTINUE   }   public cmd_live(id,level,cid) {       if (!cmd_access(id ,level, cid , 2)) return PLUGIN_CONTINUE           server_cmd("exec lo3.cfg")       client_print(0,print_chat," Good Luck, Have Fun, and Please Talk in Teamsay, The match is starting!")

Janet Jackson 12-14-2005 08:51

Code:
public cmd_live(id,level,cid) {       if (!cmd_access(id ,level, cid , 2)) {         return PLUGIN_HANDLED     }     server_cmd("exec lo3.cfg")       client_print(0,print_chat," Good Luck, Have Fun, and Please Talk in Teamsay, The match is starting!")     return PLUGIN_HANDELD }

Anarchist 12-14-2005 19:57

Quote:

Originally Posted by Janet Jackson
Code:
public cmd_live(id,level,cid) {       if (!cmd_access(id ,level, cid , 2)) {         return PLUGIN_HANDLED     }     server_cmd("exec lo3.cfg")       client_print(0,print_chat," Good Luck, Have Fun, and Please Talk in Teamsay, The match is starting!")     return PLUGIN_HANDELD }

Code:
public cmd_live(id,level,cid) {     if (!cmd_access(id ,level, cid , 2)) {         return PLUGIN_HANDLED     }     server_cmd("exec lo3.cfg")       client_print(0,print_chat," Good Luck, Have Fun, and Please Talk in Teamsay, The match is starting!")     return PLUGIN_CONTINUE }

It still shows the command, and doesnt execute my commands after that.

Xanimos 12-14-2005 21:59

Quote:

Originally Posted by Anarchist
Quote:

Originally Posted by Janet Jackson
Code:
public cmd_live(id,level,cid) {       if (!cmd_access(id ,level, cid , 2)) {         return PLUGIN_HANDLED     }     server_cmd("exec lo3.cfg")       client_print(0,print_chat," Good Luck, Have Fun, and Please Talk in Teamsay, The match is starting!")     return PLUGIN_HANDELD }

Code:
public cmd_live(id,level,cid) {     if (!cmd_access(id ,level, cid , 2)) {         return PLUGIN_HANDLED     }     server_cmd("exec lo3.cfg")       client_print(0,print_chat," Good Luck, Have Fun, and Please Talk in Teamsay, The match is starting!")     return PLUGIN_CONTINUE }

It still shows the command, and doesnt execute my commands after that.

Notice the difference between PLUGIN_HANDLED and PLUGIN_HANDELD

Dizzy 12-14-2005 21:59

In my plugin when the user says something it doesn't appear as said

mine looks like this

Code:
register_clcmd("say lagsux","lag")

Code:
public lag(id) {     if (SaysUses[id] < 1)     {         client_print (id, print_center, "[Type Sounds]: Sorry, 0 Sounds Left, Wait Until Next Round!")         return PLUGIN_HANDLED     }     if (SaysUses[id] == 1)     {         client_cmd(0, "spk misc/lagsux")         SaysUses[id]--         client_print (id, print_center, "[Type Sounds]: 0 Sounds Left!")     }     if (SaysUses[id] == 2)     {         client_cmd(0,"spk misc/lagsux")         SaysUses[id]--         client_print (id, print_center, "[Type Sounds]: 1 Sound Left!")     }     if (SaysUses[id] == 3)     {         client_cmd(0, "spk misc/lagsux")         SaysUses[id]--         client_print (id, print_center, "[Type Sounds]: 2 Sound Left!")     }     return PLUGIN_HANDLED }

I think Avalance is right,

Just try ending it with PLUGIN_HANDLED again

it should work..

or completely strip my code and enter your things to make sure it works =D.

Hope I was of some help.

Anarchist 12-15-2005 00:03

Quote:

Originally Posted by Suicid3
Quote:

Originally Posted by Anarchist
Quote:

Originally Posted by Janet Jackson
Code:
public cmd_live(id,level,cid) {       if (!cmd_access(id ,level, cid , 2)) {         return PLUGIN_HANDLED     }     server_cmd("exec lo3.cfg")       client_print(0,print_chat," Good Luck, Have Fun, and Please Talk in Teamsay, The match is starting!")     return PLUGIN_HANDELD }

Code:
public cmd_live(id,level,cid) {     if (!cmd_access(id ,level, cid , 2)) {         return PLUGIN_HANDLED     }     server_cmd("exec lo3.cfg")       client_print(0,print_chat," Good Luck, Have Fun, and Please Talk in Teamsay, The match is starting!")     return PLUGIN_CONTINUE }

It still shows the command, and doesnt execute my commands after that.

Notice the difference between PLUGIN_HANDLED and PLUGIN_HANDELD

Is Handeled Purposely Spelled that way?

Janet Jackson 12-15-2005 04:19

No, I made a typo. It's PLUGIN_HANDLED.


All times are GMT -4. The time now is 16:07.

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