Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma semicolon 1
- #include <sourcemod>
- #include <sdktools>
- #include <sdkhooks>
- new const String:g_sSteamID[][] =
- {
- "STEAM_0:1:91",
- "STEAM_2",
- "STEAM_3"
- };
- new const String:g_sNickname[][] =
- {
- "777",
- "Ник для STEAM_2",
- "Ник для STEAM_3"
- };
- public Plugin:myinfo =
- {
- name = "Enter/Change permanent nickname",
- author = "AlmazON, T@HK",
- version = "2.1",
- description = "Enter permanent nickname in server,change old nickname",
- url = "https://hlmod.ru/threads/plagin-zapreta-smeny-nika.12846/page-4"
- };
- public OnClientAuthorized(client, const String:auth[])
- {
- new String:f_sAuthID[64];
- GetClientAuthId(client, AuthId_Steam2, f_sAuthID, sizeof(f_sAuthID), false);
- new String:f_sPlayer_Name[65];
- GetClientName(client, f_sPlayer_Name, sizeof(f_sPlayer_Name));
- for (new i; i < sizeof(g_sSteamID); ++i)
- {
- if (strcmp(g_sSteamID[i], auth) == 0)
- {
- decl String:Name[MAX_NAME_LENGTH];
- GetClientName(client, Name, sizeof(Name));
- if (strcmp(g_sNickname[i], Name)) SetClientInfo(client, "Name", g_sNickname[i]);
- return;
- }
- }
- PrintToServer("[ValidateNickSteam] %N %s %s", client, f_sPlayer_Name, f_sAuthID);
- LogMessage("OnClientAuthorized fired for %L with SteamID %s", client, auth);
- }
Advertisement
Add Comment
Please, Sign In to add comment