Lemme know if this compiles / works. Copied some code on my iPhone since I’m unable to get to pc for a few days
PHP Code:
#include <sourcemod>
public Plugin myinfo =
{
name = "Name Change kicker",
author = "dustin",
description = "",
version = "1.0",
url = "",
};
public OnPluginStart()
{
HookEvent("player_changename", Event_OnNameChange);
}
public Action:Event_OnNameChange(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
if (!IsClientInGame(client) || IsFakeClient(client)) return Plugin_Handled;
KickClient(client, “name changes aren’t allowed.”);
return Plugin_Handled;
}
Edit: the symbols after KickClient(client, - should be a quotation mark
No idea why it did that