private void OnSessionPreLoad([FromSource] CitizenFX.Core.Player player) { try { var session = new Session(player); if (Server.IsSteamRequired && session.SteamId64 == 0) { player.Drop("Steam is required to play on this server."); return; } _sessions.Add(session); Log.Info($"Player {session.Name} (net:{session.NetId}) has connected."); } catch (Exception ex) { Log.Error(ex); } }
private void OnSessionPreLoad([FromSource] CitizenFX.Core.Player player) { try { var session = new Session(player); Log.Info($"Player {player.Name} ({string.Join( ", ", player.Identifiers )}) is attempting to connect to the server."); if (Server.IsSteamRequired && session.SteamId64 == 0) { player.Drop("Steam is required to play on this server."); return; } _sessions.Add(session); BaseScript.TriggerEvent("Session.PreLoad", session.NetId); } catch (Exception ex) { Log.Error(ex); } }
public Task DropRequest([FromSource] CitizenFX.Core.Player source) { source.Drop("Afk"); return(Task.FromResult(0)); }
private static void ClientDisconnect([FromSource] Citizen citizen) { citizen.Drop("Disconnected"); }