Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sourcemod>
- #include <sdktools>
- #pragma semicolon 1
- #pragma newdecls required
- public Plugin myinfo =
- {
- name = "Dbk ssie mi jaja",
- author = "Cha Tfu W.",
- description = "",
- version = "1.0",
- url = ""
- };
- public void OnPluginStart()
- {
- HookEvent("player_changename", OnPlayerNameChange, EventHookMode_Pre);
- }
- public void OnClientPostAdminCheck(int client)
- {
- if(IsValidClient(client))
- CreateTimer(0.1, NickChecker, client);
- }
- public Action OnPlayerNameChange(Handle event, const char[] name, bool dontBroadcast)
- {
- int client = GetClientOfUserId(GetEventInt(event, "userid"));
- if(IsValidClient(client))
- CreateTimer(0.1, NickChecker, client);
- }
- public Action NickChecker(Handle timer, int client) //Just in case of some CS:GO FUCKING BUGS AS I EXPECT.
- {
- if(IsClientBluu(client))
- return Plugin_Handled;
- char sName[MAX_NAME_LENGTH];
- if(GetClientName(client, sName, sizeof(sName)))
- if(StrContains(sName, "sebix", false) > -1)
- KickClient(client, "Zmień nick - Regulamin Only Mirage § 4");
- return Plugin_Handled;
- }
- stock bool IsClientBluu(int client)
- {
- char SteamID[64];
- if(GetClientAuthId(client, AuthId_SteamID64, SteamID, sizeof(SteamID)))
- {
- if(StrEqual(SteamID, "76561198337276022", true))
- return true;
- else
- return false;
- }
- return false;
- }
- stock bool IsValidClient(int client)
- {
- if(client <= 0 || client > MaxClients || !IsClientInGame(client))
- return false;
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement