示例#1
0
        public static PlayerClothes GetPlayerClothes(Client client)
        {
            if (!client.HasData("ID"))
            {
                return(null);
            }

            int           pInfo    = client.GetData("ID");
            PlayerClothes pClothes = Database.GetById <PlayerClothes>(pInfo);

            return(pClothes);
        }
示例#2
0
        public static void FinishLogin(Client client)
        {
            int client_id = client.GetData("ID");

            PlayerInfo     playerInfo    = PlayerHelper.GetPlayerStats(client);
            PlayerClothes  playerClothes = PlayerHelper.GetPlayerClothes(client);
            PlayerVehicles pVeh          = PlayerHelper.GetpVehiclesStats(client);

            //Database.Update(playerInfo);
            playerInfo.Update();

            EventTriggers.Update_Money(client);
            EventTriggers.Update_Bank(client);
            EventTriggers.Update_Wanteds(client);

            NAPI.Player.SetPlayerName(client, playerInfo.vorname + "" + playerInfo.nachname);

            if (playerInfo.wantedlevel >= 1)
            {
                NAPI.Player.SetPlayerNametagColor(client, 249, 27, 27);
            }

            if (playerInfo.cuff == 1)
            {
                client.SendNotification("~r~Suite à l'évasion tentée, vous recevez 5 minutes de prison supplémentaires.");
                playerInfo.jailtime += 300000;
                playerInfo.cuff      = 0;
                playerInfo.jail      = 1;
                playerInfo.Update();
            }

            PlayerVehicles.GetLastCarPosition(client);
            //client.SendNotification("~g~Erfolgreich eingeloggt!");

            NAPI.ClientEvent.TriggerClientEvent(client, "LoginUnFreeze");
            NAPI.ClientEvent.TriggerClientEvent(client, "CameraDestroy");

            PlayerData.Respawn(client);
            return;
        }
示例#3
0
        public static void FinishLogin(Client client)
        {
            int client_id = client.GetData("ID");

            PlayerInfo     playerInfo    = PlayerHelper.GetPlayerStats(client);
            PlayerClothes  playerClothes = PlayerHelper.GetPlayerClothes(client);
            PlayerVehicles pVeh          = PlayerHelper.GetpVehiclesStats(client);

            //Database.Update(playerInfo);
            playerInfo.Update();

            EventTriggers.Update_Money(client);
            EventTriggers.Update_Bank(client);
            EventTriggers.Update_Wanteds(client);

            NAPI.Player.SetPlayerName(client, playerInfo.vorname + "" + playerInfo.nachname);

            if (playerInfo.wantedlevel >= 1)
            {
                NAPI.Player.SetPlayerNametagColor(client, 249, 27, 27);
            }

            if (playerInfo.cuff == 1)
            {
                client.SendNotification("~r~Du hast Offlineflucht begangen und sitzt nun 5 Minuten länger im Gefängnis!");
                playerInfo.jailtime += 300000;
                playerInfo.cuff      = 0;
                playerInfo.jail      = 1;
                playerInfo.Update();
            }

            PlayerVehicles.GetLastCarPosition(client);
            //client.SendNotification("~g~Erfolgreich eingeloggt!");

            NAPI.ClientEvent.TriggerClientEvent(client, "LoginUnFreeze");
            NAPI.ClientEvent.TriggerClientEvent(client, "CameraDestroy");

            PlayerData.Respawn(client);
            return;
        }