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

Request one name


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Emanuel
Member
Join Date: Feb 2014
Old 01-09-2015 , 14:54   Request one name
Reply With Quote #1

Hi guys i want a plugin : when you enter in server you cant chenge name and say Sorry but for you chenge name leave server and change .

Last edited by Emanuel; 01-09-2015 at 14:54.
Emanuel is offline
Send a message via Skype™ to Emanuel
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 01-09-2015 , 15:16   Re: Request one name
Reply With Quote #2

Quote:
Originally Posted by Emanuel View Post
Hi guys i want a plugin : when you enter in server you cant chenge name and say Sorry but for you chenge name leave server and change .
and why do you want to enforce everyone to always use 1 name?
__________________
WildCard65 is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 01-09-2015 , 15:37   Re: Request one name
Reply With Quote #3

PHP Code:
#include <amxmodx>
#include <fakemeta>

#define VERSION "0.1.0"

public plugin_init()
{
    
register_plugin("One Name"VERSION"ConnorMcLeod")
    
register_forward(FM_ClientUserInfoChanged"ClientUserInfoChanged")
}

public 
ClientUserInfoChanged(id)
{
    static const 
name[] = "name"
    
static szOldName[32], szNewName[32]
    
pev(idpev_netnameszOldNamecharsmax(szOldName))
    if( 
szOldName[0] )
    {
        
get_user_info(idnameszNewNamecharsmax(szNewName))
        if( !
equal(szOldNameszNewName) )
        {
            
set_user_info(idnameszOldName)
            
client_print(idprint_chat" Put your message here" )
            return 
FMRES_HANDLED
        
}
    }
    return 
FMRES_IGNORED 

__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-09-2015 , 18:07   Re: Request one name
Reply With Quote #4

Quote:
Originally Posted by WildCard65 View Post
and why do you want to enforce everyone to always use 1 name?
That's not unusual. The server that I play on has that rule so that it doesn't become a habit to simply change name to evade being detected for breaking server rules. However, it is only lenforced it verbally.
__________________
fysiks is offline
choloo
Senior Member
Join Date: Nov 2014
Location: Groznyj, Chechnya
Old 01-10-2015 , 10:10   Re: Request one name
Reply With Quote #5

BlockChangeName (Allow players to change their names 3 times + message)
PHP Code:
#include <amxmodx>
#include <fakemeta> 

new contor[32]

public 
plugin_init() 
{
   
register_plugin("Block change name","0.2.0","ConnorMcLeod"); // real name is "One Name"
   
register_forward(FM_ClientUserInfoChanged"ClientUserInfoChanged");
}

public 
ClientUserInfoChanged(id

    static const 
name[] = "name" 
    
static szOldName[32], szNewName[32
    
pev(idpev_netnameszOldNamecharsmax(szOldName)) 
    if( 
szOldName[0] ) 
    { 
        
get_user_info(idnameszNewNamecharsmax(szNewName)) 
        if( !
equal(szOldNameszNewName) ) 
        { 
            if(
contor[id] < 3)
            {
             ++
contor[id];
            }
            else
            { 
              
client_print(idprint_chat ,"[NICK] You can change your nick for only 3 times!");
              
set_user_info(idnameszOldName
              return 
FMRES_HANDLED
            
}
        } 
    } 
    return 
FMRES_IGNORED 

BlockNickChanger (Players can't change their names + message in console)
PHP Code:
/*
by ZeniX aka lucylucy
*/

#include < amxmodx >

#define PLUGIN "No Name Change"
#define VERSION "0.1"
#define AUTHOR "ZeniX aka lucylucy"

public plugin_init ( ) {
   
   
register_pluginPLUGINVERSIONAUTHOR )
   
   
register_message(get_user_msgid("SayText"), "MessageZeniX");
   
}

public 
client_infochanged id ) {
   
   if (
is_user_connected(id )) {
      
      new 
newname 32 ], oldname 32 ]
      
get_user_infoid"name"newname31 )
      
get_user_nameidoldname31 )
      
      if (!
equal(oldname,newname)) {
         
client_print(idprint_console"*******************************************************")
         
client_print(idprint_console"********************* BLOCK NICK CHANGER **************")
         
client_print(idprint_console"******** You're not allowed to change the nick ********")
         
client_print(idprint_console"*******************************************************")
         
client_print(idprint_console"********************* BLOCK NICK CHANGER **************")
         
color_chat(id"^1[^4BLOCK^1-^4NICK-CHANGER^1]^4 You're not allowed to change the nick on this server. ^1[^4Your_Server_here^1]")
         
         
set_user_info(id,"name",oldname)
         
      }
   }
   
   return 
PLUGIN_CONTINUE
}

public 
MessageZeniX msgiddestreceiver ) {
   
   static 
info 64 ];
   
get_msg_arg_string(2infosizeof(info) - 1);
   
   if( !
equali(info"#Cstrike_Name_Change") ) return PLUGIN_CONTINUE;
   
   return 
PLUGIN_HANDLED;
   
}

stock color_chat(const id, const input[], any:...)
{
   new 
count 1players[32]
   static 
msg[191]
   
vformat(msg190input3)
   
   
replace_all(msg190".v""^4")
   
replace_all(msg190".g""^1")
   
replace_all(msg190".e""^3")
   
   if (
idplayers[0] = id; else get_players(playerscount"ch")
   {
   for (new 
0counti++)
   {
      if (
is_user_connected(players[i]))
      {
         
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i])
         
write_byte(players[i]);
         
write_string(msg);
         
message_end();
      }
   }
}


Last edited by choloo; 01-10-2015 at 10:11.
choloo is offline
plazma
Senior Member
Join Date: Oct 2013
Old 01-10-2015 , 11:08   Re: Request one name
Reply With Quote #6

Can make anyone this for me when player change name on 3 time get kicked from server ?

PHP Code:
public ClientUserInfoChanged(id

    static const 
name[] = "name" 
    
static szOldName[32], szNewName[32
    
pev(idpev_netnameszOldNamecharsmax(szOldName)) 
    if( 
szOldName[0] ) 
    { 
        
get_user_info(idnameszNewNamecharsmax(szNewName)) 
        if( !
equal(szOldNameszNewName) ) 
        { 
            if(
contor[id] < 3)
            {
             ++
contor[id];
            }
            else
            { 
              
client_print(idprint_chat ,"[NICK] You can change your nick for only 3 times!");
              
set_user_info(idnameszOldName
              return 
FMRES_HANDLED
            
}
        } 
    } 
    return 
FMRES_IGNORED 

__________________
Free Palestine ♥
plazma is offline
choloo
Senior Member
Join Date: Nov 2014
Location: Groznyj, Chechnya
Old 01-10-2015 , 11:18   Re: Request one name
Reply With Quote #7

Why you want to kick players? They are not allowed to change nick anymore, they don't disturb the server after 3 changes
choloo is offline
plazma
Senior Member
Join Date: Oct 2013
Old 01-10-2015 , 11:21   Re: Request one name
Reply With Quote #8

Quote:
Originally Posted by choloo View Post
Why you want to kick players? They are not allowed to change nick anymore, they don't disturb the server after 3 changes
I need it for me, when he change name on 3 time get kick, can u make this? thank you !
__________________
Free Palestine ♥
plazma is offline
ghost95v
Senior Member
Join Date: Apr 2014
Location: somewhere in universe
Old 01-10-2015 , 11:39   Re: Request one name
Reply With Quote #9

PHP Code:
public ClientUserInfoChanged(id

    static const 
name[] = "name" 
    
static szOldName[32], szNewName[32]
    new 
userid get_user_useridid );    
    
pev(idpev_netnameszOldNamecharsmax(szOldName)) 
    if( 
szOldName[0] ) 
    { 
        
get_user_info(idnameszNewNamecharsmax(szNewName)) 
        if( !
equal(szOldNameszNewName) ) 
        { 
            if(
contor[id] < 3)
            {
             ++
contor[id];
            }
            else
            { 
              
client_print(idprint_chat ,"[NICK] You can change your nick for only 3 times!");
              
server_cmd"kick #%d ^"Stop Changing the name!^""userid );
              return 
FMRES_HANDLED
            
}
        } 
    } 
    return 
FMRES_IGNORED 

__________________
ghost95v is offline
Send a message via Skype™ to ghost95v
plazma
Senior Member
Join Date: Oct 2013
Old 01-10-2015 , 12:51   Re: Request one name
Reply With Quote #10

Solved!

PHP Code:
public ClientUserInfoChanged(id

    static const 
name[] = "name" 
    
static szOldName[32], szNewName[32
    
pev(idpev_netnameszOldNamecharsmax(szOldName)) 
    if( 
szOldName[0] ) 
    { 
        
get_user_info(idnameszNewNamecharsmax(szNewName)) 
        if( !
equal(szOldNameszNewName) ) 
        { 
            if(
contor[id] < 3)
            {
             ++
contor[id];
            }
            else
            { 
              
client_print(idprint_chat ,"[NICK] You can change your nick for only 3 times!");
              
server_cmd"kick #%d ^"You can change your nick for only 3 times!^""get_user_userid(id));
              
set_user_info(idnameszOldName
              return 
FMRES_HANDLED
            
}
        } 
    } 
    return 
FMRES_IGNORED 

__________________
Free Palestine ♥

Last edited by plazma; 01-10-2015 at 12:51.
plazma 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 07:58.


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