PHP Code:
#include <sourcemod>
public void OnClientPostAdminCheck(int client)
{
if (!IsFakeClient(client)) // skip bots
{
CreateTimer(5.0, Timer_ConnectMessage, GetClientUserId(client), TIMER_FLAG_NO_MAPCHANGE);
}
}
public Action Timer_ConnectMessage(Handle timer, any data)
{
int client = GetClientOfUserId(view_as<int>(data));
if (client)
{
char authid[65];
if (GetClientAuthId(client, AuthId_Steam2, authid, sizeof(authid))) // if has valid steam id
{
PrintToChatAll("\x01[SM] \x04%N\x01 (\x05%s\x01) has joined.", client, authid);
}
else
{
// maybe show the message wihout his steamid ???
}
}
}
__________________