View Single Post
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 09-15-2018 , 13:28   Re: Name change kicker
Reply With Quote #3

PHP Code:
#include <sourcemod>

public OnPluginStart()
{
    
HookEvent("player_changename"OnNameChanged);
}

public 
void OnNameChanged(Event event, const char[] namebool dontBroadcast)
{
    
int client GetClientOfUserId(event.GetInt("userid"));
    
    if (
client)
    {
        
KickClient(client"Name changes are not allowed");
    }


Last edited by Ilusion9; 09-15-2018 at 13:28.
Ilusion9 is offline