public void OnPlayerLoginAttempt(Client client, string username, string password) { Players players = Database.GetData <Players>("username", username); PlayerVehicles pVeh = PlayerHelper.GetpVehiclesStats(client); if (players == null) { client.SendChatMessage("~r~Données introuvables !"); client.TriggerEvent("LoginResult"); return; } if (!players.CheckPassword(password)) { client.SendChatMessage("~r~Les données n'ont pas été trouvés!"); client.TriggerEvent("LoginResult", 0); return; } if (client.HasData("ID")) { client.SendChatMessage("Vous êtes connecté !"); return; } client.SetData("ID", players._id); //LOGIN ENDE PlayerInfo pInfo = PlayerHelper.GetPlayerStats(client); Players playerInfo = PlayerHelper.GetPlayer(client); client.SetData("AdminRank", pInfo.adminrank); if (playerInfo.ban == 0) { Handler.FinishLogin(client); client.TriggerEvent("LoginResult", 1); for (int i = 0; i < 99; i++) { client.SendChatMessage("~w~"); } //GUIDE START if (pInfo.vorname == "None") { client.SendChatMessage("~r~SERVEUR: ~ w ~ Veuillez choisir un nom/prénom."); NAPI.ClientEvent.TriggerClientEvent(client, "StartCharBrowser"); return; } else { client.SendChatMessage($"Bienvenue, {pInfo.vorname} {pInfo.nachname} sur ~g~Continental Five"); client.SendChatMessage("~r~SERVEUR: Ceci est une version développeur de Continental Five"); client.SendNotification($"~g~En tant que : {pInfo.vorname} {pInfo.nachname}"); return; } } else { client.SendChatMessage("Ce compte à été suspendu"); client.TriggerEvent("LoginResult", 0); return; } }
public void OnPlayerLoginAttempt(Client client, string username, string password) { Players players = Database.GetData <Players>("username", username); PlayerVehicles pVeh = PlayerHelper.GetpVehiclesStats(client); if (players == null) { client.SendChatMessage("~r~Daten wurden nicht gefunden!"); client.TriggerEvent("LoginResult"); return; } if (!players.CheckPassword(password)) { client.SendChatMessage("~r~Die angegebenen Daten sind korrekt!"); client.TriggerEvent("LoginResult", 0); return; } if (client.HasData("ID")) { client.SendChatMessage("Du bist schon eingeloggt!"); return; } client.SetData("ID", players._id); //LOGIN ENDE PlayerInfo pInfo = PlayerHelper.GetPlayerStats(client); Players playerInfo = PlayerHelper.GetPlayer(client); client.SetData("AdminRank", pInfo.adminrank); if (playerInfo.ban == 0) { Handler.FinishLogin(client); client.TriggerEvent("LoginResult", 1); for (int i = 0; i < 99; i++) { client.SendChatMessage("~w~"); } //GUIDE START if (pInfo.vorname == "None") { client.SendChatMessage("~r~SERVER: ~w~Bitte wähle einen Vor/nachname!"); NAPI.ClientEvent.TriggerClientEvent(client, "StartCharBrowser"); return; } else { client.SendChatMessage($"Willkommen, {pInfo.vorname} {pInfo.nachname} auf ~b~Reallife-V"); client.SendChatMessage("~r~SERVER: ~w~Dies ist eine Entwickler Version von ~b~Reallife-V!"); client.SendChatMessage("~r~SERVER: ~w~Also sind Bug`s keine Seltenheit!"); client.SendNotification($"~b~Name: {pInfo.vorname} {pInfo.nachname}"); return; } } else { client.SendChatMessage("Dieser Account wurde gesperrt"); client.TriggerEvent("LoginResult", 0); return; } }