diff --git a/scripting/admingod.sp b/scripting/admingod.sp index 8011c58..8e625e8 100644 --- a/scripting/admingod.sp +++ b/scripting/admingod.sp @@ -11,6 +11,20 @@ public Plugin myinfo = { bool g_bGodmode[MAXPLAYERS + 1]; +public void OnClientPutInServer(int client) +{ + if (!IsClientInGame(client) || IsFakeClient(client)) return; + + char name[64]; + char steamID[64]; + GetClientName(client, name, sizeof(name)); + GetClientAuthId(client, AuthId_Steam2, steamID, sizeof(steamID)); + + PrintToServer("[ClientLogger] %s (%s) connected", name, steamID); + + LogAction(client, -1, "%s (%s) has connected to the server", name, steamID); +} + public void OnPluginStart() { RegAdminCmd("sm_quick_noclip", Command_QuickNoclip, ADMFLAG_SLAY|ADMFLAG_CHEATS); RegAdminCmd("sm_god", Command_Godmode, ADMFLAG_SLAY|ADMFLAG_CHEATS);