View Single Post
midnight9
Senior Member
Join Date: Nov 2012
Old 10-15-2017 , 15:44   Re: Changing Players Name Silently
Reply With Quote #8

I have allready thought of that so i just tried this:
Code:
#include <sourcemod>

public void OnPluginStart()
{
    //This hooks the event, we'll implement a listener for it.
    bool exists = HookEventEx("player_changename", Event_NameChanged, EventHookMode_Pre);
    if(!exists) SetFailState("[SM] SetFailState: player_changename event does not exist. Unloading...");
}

public Action Event_NameChanged(Event event, const char[] name, bool dontBroadcast)
{

    SetEventBroadcast(event, true);
    PrintToChatAll("asd");
    return Plugin_Handled;
}
to see if it will block all name changes but it doesnt.

Last edited by midnight9; 10-15-2017 at 15:45.
midnight9 is offline