AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   client_infochange message bugged (https://forums.alliedmods.net/showthread.php?t=61374)

MPNumB 09-28-2007 13:37

client_infochange message bugged
 
1 Attachment(s)
Hi, I have some questions obout client_infochanged().

1. Why when admin changes hes name i see no message?
2. How to block thet message? (I tryed set_user_info(id, "name" oldname), retrun PLUGIN_HANDLED, event return PLUGIN_HANDLED_MAIN, but _MAIN works absolutly opesed way - it dosn't disables thet message, but it disables client_infochanged in all other plugins that gows in plugins.ini after thet in wich it is used.)

Saying message I mean - "* lol changed name to lol2"
Why I need to block it? - here is my little plugin that realy needs it. =P

Plz, help. :)

Styles 09-28-2007 13:57

Re: client_infochange message bugged
 
I really don't get what your saying.

Do you mean that client_infochanged is bugged because when an admin changes his name that call is not being affected?

If so your wrong there is nothing that SHOULD be blocking it. Mabye somethings wrong with your plugin.

2) Are you trying to block the message Styles changed his name to "Sprayer" type of thing?

MPNumB 09-28-2007 14:14

Re: client_infochange message bugged
 
1. No, I just want that when admin changes hes name - message will be displayed.
2. I wanna block that message for my gag plugin, so it won't be displayed (like when admin changes hes name now).

message = "* oldname changed name to newname"

Sylwester 09-28-2007 15:01

Re: client_infochange message bugged
 
Quote:

Originally Posted by lantz69 (Post 423913)
Yay I got it to work :)
Thx for all the tips and code.

I changed it to this
Code:
#include <amxmodx> #include <engine>   #define PLUGIN "Test" #define VERSION "1.0" #define AUTHOR "Jim"   public plugin_init() {         register_plugin(PLUGIN, VERSION, AUTHOR)         register_message(get_user_msgid("SayText"), "block_changename") }   public block_changename(msgid, msgdest, msgent) {         new sz[80]         get_msg_arg_string(2, sz, 79)         if(containi(sz, "#Cstrike_Name_Change") != -1)                 return PLUGIN_HANDLED           return PLUGIN_CONTINUE }

Got this from message plugin that helped me
http://forums.alliedmods.net/showthr...essage+logging
Code:

L 01/05/2007 - 15:34:13: MessageBegin (SayText "76") (Destination "Broadcast<0>") (Args "4") (Entity "<NULL>") (Classname "<NULL>") (Netname "<NULL>") (Origin "0.000000 0.000000 0.000000")
 L 01/05/2007 - 15:34:13: Arg 1 (Byte "9")
 L 01/05/2007 - 15:34:13: Arg 2 (String "#Cstrike_Name_Change")
 L 01/05/2007 - 15:34:13: Arg 3 (String "palla")
 L 01/05/2007 - 15:34:13: Arg 4 (String "lantz")
 L 01/05/2007 - 15:34:13: MessageEnd (SayText "76")

That is when I chanaged name from palla to lantz


MPNumB 09-28-2007 16:12

Re: client_infochange message bugged
 
Thx. Finaly i can gag players the way they have to be gagged. :) Now just left to do: when admin changes hes name - message is writed (amxx somewhy, somehow block it if player is writed in users.ini). :P


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

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