Raised This Month: $ Target: $400
 0% 

Not display msg of change name


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
L//
Senior Member
Join Date: Aug 2008
Location: Not found
Old 12-20-2008 , 12:21   Not display msg of change name
Reply With Quote #1

There is any way to not display the message of change name?
L// is offline
Send a message via MSN to L//
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 12-20-2008 , 12:55   Re: Not display msg of change name
Reply With Quote #2

Is not the best way, but try it...you can block the text message
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

public client_infochanged(id)
{
    new 
newname[32],oldname[32];
    
get_user_info(id,"name",newnamesizeof newname 1);
    
get_user_name(id,oldname,sizeof oldname 1);
    
    if(!
equal(newname,oldname))
    {
        
set_user_infoid"name",newname );
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_CONTINUE;

__________________

anakin_cstrike is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 12-20-2008 , 13:32   Re: Not display msg of change name
Reply With Quote #3

Code:
public plugin_init() {     register_message(get_user_msgid("SayText"), "MessageNameChange"); } public MessageNameChange(msgid, dest, receiver) {     static info[64];     get_msg_arg_string(2, info, sizeof(info) - 1);         if( !equali(info, "#Cstrike_Name_Change") ) return PLUGIN_CONTINUE;         // If you want to block any message being shown (not player specific):     return PLUGIN_HANDLED;         // If you want to block the message when a specific player changes name     static client;         for( new i = 3; i < 5; i++ )     {         get_msg_arg_string(i, info, sizeof(info) - 1);         client = get_user_index(info);                 if( is_user_connected(client) ) break;                 client = 0;     }         return (client && /* block name change for 'client' */) ? PLUGIN_HANDLED : PLUGIN_CONTINUE; }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Starsailor
horrible hahah
Join Date: Aug 2008
Location: Buenos Aires
Old 12-20-2008 , 14:04   Re: Not display msg of change name
Reply With Quote #4

exolent you are very inteligent
__________________
Find my plugins here..

Ex - Spanish Moderator.
Starsailor is offline
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 12-20-2008 , 14:47   Re: Not display msg of change name
Reply With Quote #5

Quote:
Originally Posted by Exolent[jNr] View Post
Code:
public plugin_init() { register_message(get_user_msgid("SayText"), "MessageNameChange"); } public MessageNameChange(msgid, dest, receiver) { static info[64]; get_msg_arg_string(2, info, sizeof(info) - 1); if( !equali(info, "#Cstrike_Name_Change") ) return PLUGIN_CONTINUE; // If you want to block any message being shown (not player specific): return PLUGIN_HANDLED; // If you want to block the message when a specific player changes name static client; for( new i = 3; i < 5; i++ ) { get_msg_arg_string(i, info, sizeof(info) - 1); client = get_user_index(info); if( is_user_connected(client) ) break; client = 0; } return (client && /* block name change for 'client' */) ? PLUGIN_HANDLED : PLUGIN_CONTINUE; }
I thought so but i didn't know the "#Cstrike_Name_Change" part
__________________

anakin_cstrike is offline
SchlumPF*
Veteran Member
Join Date: Mar 2007
Old 12-20-2008 , 14:49   Re: Not display msg of change name
Reply With Quote #6

i tested saytext too but cuz of some mysterious reasons saytext is fired on my listenserver without string2+string3 like the wiki says. string1 holds the formated string :/
__________________
SchlumPF* is offline
Send a message via ICQ to SchlumPF*
L//
Senior Member
Join Date: Aug 2008
Location: Not found
Old 12-20-2008 , 18:01   Re: Not display msg of change name
Reply With Quote #7

thank Exolent. +k
L// is offline
Send a message via MSN to L//
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 09:10.


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