コード例 #1
0
ファイル: SARUCmds.cs プロジェクト: NachoMan12/Reallife-V
        public void CMD_heal(Client client, Client player)
        {
            if (!FraktionSystem.HasRank(client, 2))
            {
                client.SendNotification("~r~Du gehörst nicht zur SARU!");
                return;
            }

            if (!client.HasData("onduty"))
            {
                client.SendNotification("~r~Du befindest dich nicht im Dienst!");
                return;
            }

            if (client.Name == player.Name)
            {
                client.SendNotification("~r~Du kannst dich nicht selber angeben!");
                return;
            }

            if (client.Position.DistanceTo2D(player.Position) <= 3)
            {
                player.Health = 100;
                client.SendNotification("~g~Spieler erfolgreich geheilt!");
                player.SendNotification($"~g~Du wurdest von {client.Name} geheilt!");
            }
            else
            {
                client.SendNotification("Der Spieler befindet sich nicht in deiner Nähe!");
            }
        }
コード例 #2
0
        public void CMD_invite(Client client, string player)
        {
            //Spieler Statistiken
            PlayerInfo leaderInfo = PlayerHelper.GetPlayerStats(client);

            //Abfrage ob man ein Leader ist
            if (!LeaderSystem.IsLeader(client))
            {
                client.SendNotification("~r~Du bist kein Leader!");
                return;
            }

            /*if (client.Name == target.Name)
             * {
             *  client.SendNotification("~r~Du kannst dich nicht selber einladen!");
             *  return;
             * }*/

            if (FraktionSystem.SetRank(player, leaderInfo.fleader))
            {
                client.SendNotification($"[~r~Server~w~] Spieler {player} wurde in die Fraktion eingeladen.");
                PlayerData.Respawn(client);
                return;
            }
            else
            {
                client.SendNotification($"[~r~Server~w~] Spieler {player} konnte nicht in die Fraktion eingeladen werden!");
                return;
            }
        }
コード例 #3
0
        public void CMD_fduty(Client client)
        {
            PlayerInfo playerInfo = PlayerHelper.GetPlayerStats(client);

            if (client.Position.DistanceTo2D(new Vector3(1194.831, -1477.961, 34.85954)) <= 0.8)
            {
                if (FraktionSystem.HasRank(client, 2))
                {
                    if (client.HasData("fonduty") || client.HasData("onduty"))
                    {
                        PlayerData.OffDuty(client);
                    }
                    else
                    {
                        client.SetClothes(8, 129, 0);
                        client.SetClothes(11, 95, 0);
                        client.SetClothes(4, 13, 0);
                        client.SetClothes(6, 10, 0);
                        client.SetClothes(0, 124, 0);
                        client.SetClothes(5, 45, 0);

                        client.SendNotification("Vous êtes maintenant en service!");

                        client.SetData("fonduty", 1);
                    }
                }
                else
                {
                    client.SendNotification("~r~Vous n'appartenez pas à la SARU!");
                }
            } else
            {
                client.SendNotification("Vous n'êtes pas près d'un devoir!");
            }
        }
コード例 #4
0
        public void CMD_invite(Client client, string player)
        {
            //Spieler Statistiken
            PlayerInfo leaderInfo = PlayerHelper.GetPlayerStats(client);

            //Abfrage ob man ein Leader ist
            if (!LeaderSystem.IsLeader(client))
            {
                client.SendNotification("~r~Vous n'êtes pas un leader!");
                return;
            }

            /*if (client.Name == target.Name)
             * {
             *  client.SendNotification("~r~Du kannst dich nicht selber einladen!");
             *  return;
             * }*/

            if (FraktionSystem.SetRank(player, leaderInfo.fleader))
            {
                client.SendNotification($"[~r~Server~w~] {player} a été invité au groupe.");
                PlayerData.Respawn(client);
                return;
            }
            else
            {
                client.SendNotification($"[~r~Server~w~] {player} ne peut pas être invité au groupe!");
                return;
            }
        }
コード例 #5
0
ファイル: UserCmds.cs プロジェクト: NachoMan12/Reallife-V
 public void CMD_FraktionsBefehle(Client player)
 {
     if (FraktionSystem.HasRank(player, 0))
     {
         player.SendChatMessage("[~r~Server~w~] Du gehörst zu keiner Fraktion!");
     }
     else if (FraktionSystem.HasRank(player, 1))
     {
         NAPI.Chat.SendChatMessageToPlayer(player, "~y~╔════════════════════════════════════════════════════════════════╗");
         NAPI.Chat.SendChatMessageToPlayer(player, "~y~╠FraktionsBefehle: ~w~/duty - In oder aus dem Dienst gehen.");
         NAPI.Chat.SendChatMessageToPlayer(player, "~y~╠FraktionsBefehle: ~w~/lspdcar - Fahrzeug spawnen.");
         NAPI.Chat.SendChatMessageToPlayer(player, "~y~╠FraktionsBefehle: ~w~/mp [Nachricht]- Megaphone benutzen.");
         NAPI.Chat.SendChatMessageToPlayer(player, "~y~╠FraktionsBefehle: ~w~/setwanted [Spieler] [Anzahl] - Wanteds verteilen.");
         NAPI.Chat.SendChatMessageToPlayer(player, "~y~╠FraktionsBefehle: ~w~/delakte [Spieler]- Akte des Spielers löschen.");
         NAPI.Chat.SendChatMessageToPlayer(player, "~y~╠FraktionsBefehle: ~w~/lock - Fahrzeug Auf-/ Abschließen.");
         NAPI.Chat.SendChatMessageToPlayer(player, "~y~╠FraktionsBefehle: ~w~/motor - Motor starten/abschalten.");
         NAPI.Chat.SendChatMessageToPlayer(player, "~y~╚════════════════════════════════════════════════════════════════╝");
     }
     else if (FraktionSystem.HasRank(player, 2))
     {
         NAPI.Chat.SendChatMessageToPlayer(player, "~y~╔════════════════════════════════════════════════════════════════╗");
         NAPI.Chat.SendChatMessageToPlayer(player, "~y~╠FraktionsBefehle: ~w~/duty - In oder aus dem Dienst gehen.");
         NAPI.Chat.SendChatMessageToPlayer(player, "~y~╠FraktionsBefehle: ~w~/sarucar - Fahrzeug spawnen.");
         NAPI.Chat.SendChatMessageToPlayer(player, "~y~╠FraktionsBefehle: ~w~/heal [Spieler] - Spieler heilen.");
         NAPI.Chat.SendChatMessageToPlayer(player, "~y~╠FraktionsBefehle: ~w~/lock - Fahrzeug Auf-/ Abschließen.");
         NAPI.Chat.SendChatMessageToPlayer(player, "~y~╠FraktionsBefehle: ~w~/motor - Motor starten/abschalten.");
         NAPI.Chat.SendChatMessageToPlayer(player, "~y~╚════════════════════════════════════════════════════════════════╝");
     }
 }
コード例 #6
0
        public void CMD_TakeWeapons(Client client, Client player)
        {
            PlayerInfo clientInfo = PlayerHelper.GetPlayerStats(client);
            PlayerInfo playerInfo = PlayerHelper.GetPlayerStats(player);

            if (!FraktionSystem.HasRank(client, 1))
            {
                client.SendNotification("Vous n'avez aucune autorisation!");
                return;
            }

            if (!player.HasData("onduty"))
            {
                client.SendNotification("~r~Vous n'êtes pas en service!");
                return;
            }

            if (client.Position.DistanceTo2D(player.Position) < 5)
            {
                player.RemoveAllWeapons();
                client.SendNotification($"[~b~LSPD~w~]: Les armes de { player.Name} ont été enlevés!");
                player.SendNotification($"[~b~LSPD~w~]: Vos armes viennent d'etre {client.Name} supprimé!");
            }
            else
            {
                client.SendNotification("~r~Le joueur n'est pas à portée de main!");
            }
        }
コード例 #7
0
        public void CMD_heal(Client client, Client player)
        {
            if (!FraktionSystem.HasRank(client, 2))
            {
                client.SendNotification("~r~Vous n'appartenez pas à la SARU!");
                return;
            }

            if (!client.HasData("onduty"))
            {
                client.SendNotification("~r~Vous n'êtes pas en service!");
                return;
            }

            if (client.Name == player.Name)
            {
                client.SendNotification("~r~Vous ne pouvez pas vous spécifier!");
                return;
            }

            if (client.Position.DistanceTo2D(player.Position) <= 3)
            {
                player.Health = 100;
                client.SendNotification("~g~Joueur guéri avec succès!");
                player.SendNotification($"~g~Vous avez été guéri par  { client.Name} ");
            } else
            {
                client.SendNotification("Le joueur n'est pas dans votre région!");
            }
        }
コード例 #8
0
ファイル: LSPDCmds.cs プロジェクト: unrealgta/Reallife-V
        public void CMD_TakeWeapons(Client client, Client player)
        {
            PlayerInfo clientInfo = PlayerHelper.GetPlayerStats(client);
            PlayerInfo playerInfo = PlayerHelper.GetPlayerStats(player);

            if (!FraktionSystem.HasRank(client, 1))
            {
                client.SendNotification("Du hast dazu keine Berechtigung!");
                return;
            }

            if (!player.HasData("onduty"))
            {
                client.SendNotification("~r~Du bist nicht im Dienst!");
                return;
            }

            if (client.Position.DistanceTo2D(player.Position) < 5)
            {
                player.RemoveAllWeapons();
                client.SendNotification($"[~b~LSPD~w~]: Die Waffen von {player.Name} wurden entfernt!");
                player.SendNotification($"[~b~LSPD~w~]: Deine Waffen wurden von {client.Name} entfernt!");
            }
            else
            {
                client.SendNotification("Spieler ist nicht in Reichweite!");
            }
        }
コード例 #9
0
        public void CMD_Akte(Client client, Client player)
        {
            PlayerInfo clientInfo = PlayerHelper.GetPlayerStats(client);
            PlayerInfo playerInfo = PlayerHelper.GetPlayerStats(player);

            if (!FraktionSystem.HasRank(client, 1))
            {
                client.SendNotification("Vous avez été renvoyé du groupe!");
                return;
            }

            if (!client.HasData("onduty"))
            {
                client.SendNotification("~r~Vous êtes pas en service!");
                return;
            }

            double vermoegen = playerInfo.money + playerInfo.bank;

            if (client.Position.DistanceTo2D(new Vector3(442.9581, -975.1335, 30.68961)) <= 2)
            {
                client.SendNotification($"[~b~record~w~]: {player.Name}");
                client.SendNotification($"[~b~niveau de recherche~w~]: {playerInfo.wantedlevel}");
                client.SendNotification($"[~b~actif~w~]: {vermoegen}~g~$");
                client.SendNotification($"[~b~Faction~w~]: {PlayerInfo.WhichFrak(player)}");
            }
            else
            {
                client.SendNotification("Vous n'êtes pas près des fichiers.");
            }
        }
コード例 #10
0
        public void CMD_UnCuff(Client client, Client player)
        {
            PlayerInfo clientInfo = PlayerHelper.GetPlayerStats(client);
            PlayerInfo playerInfo = PlayerHelper.GetPlayerStats(player);

            if (!FraktionSystem.HasRank(client, 1))
            {
                client.SendNotification("Vous n'avez aucune autorisation!");
                return;
            }

            if (!player.HasData("onduty"))
            {
                client.SendNotification("~r~Vous n'êtes pas en service!");
                return;
            }

            if (!player.HasData("cuff"))
            {
                client.SendNotification("[~b~LSPD~w~]: Ce joueur n'a pas de menottes!");
                return;
            }

            if (player.Position.DistanceTo2D(client.Position) < 5)
            {
                NAPI.Player.StopPlayerAnimation(player);
                client.SendNotification("[~b~LSPD~w~]:Vous avez libéré: " + player.Name);
                LSPD.uncuff(player);
            }
            else
            {
                client.SendNotification("Le joueur n'est pas à portée de main!");
            }
        }
コード例 #11
0
ファイル: LSPDCmds.cs プロジェクト: unrealgta/Reallife-V
        public void CMD_UnCuff(Client client, Client player)
        {
            PlayerInfo clientInfo = PlayerHelper.GetPlayerStats(client);
            PlayerInfo playerInfo = PlayerHelper.GetPlayerStats(player);

            if (!FraktionSystem.HasRank(client, 1))
            {
                client.SendNotification("Du hast dazu keine Berechtigung!");
                return;
            }

            if (!player.HasData("onduty"))
            {
                client.SendNotification("~r~Du bist nicht im Dienst!");
                return;
            }

            if (!player.HasData("cuff"))
            {
                client.SendNotification("[~b~LSPD~w~]: Dieser Spieler besitzt keine Handschellen!");
                return;
            }

            if (player.Position.DistanceTo2D(client.Position) < 5)
            {
                NAPI.Player.StopPlayerAnimation(player);
                client.SendNotification("[~b~LSPD~w~]: Du hast diese Person freigelassen: " + player.Name);
                LSPD.uncuff(player);
            }
            else
            {
                client.SendNotification("Spieler ist nicht in Reichweite!");
            }
        }
コード例 #12
0
ファイル: LSPDCmds.cs プロジェクト: unrealgta/Reallife-V
        public void CMD_Akte(Client client, Client player)
        {
            PlayerInfo clientInfo = PlayerHelper.GetPlayerStats(client);
            PlayerInfo playerInfo = PlayerHelper.GetPlayerStats(player);

            if (!FraktionSystem.HasRank(client, 1))
            {
                client.SendNotification("Du hast dazu keine Berechtigung!");
                return;
            }

            if (!client.HasData("onduty"))
            {
                client.SendNotification("~r~Du bist nicht im Dienst!");
                return;
            }

            double vermoegen = playerInfo.money + playerInfo.bank;

            if (client.Position.DistanceTo2D(new Vector3(442.9581, -975.1335, 30.68961)) <= 2)
            {
                client.SendNotification($"[~b~Akte~w~]: {player.Name}");
                client.SendNotification($"[~b~WantedLevel~w~]: {playerInfo.wantedlevel}");
                client.SendNotification($"[~b~Vermögen~w~]: {vermoegen}~g~$");
                client.SendNotification($"[~b~Fraktion~w~]: {PlayerInfo.WhichFrak(player)}");
            }
            else
            {
                client.SendNotification("Du befindest dich nicht in der Nähe der Akten.");
            }
        }
コード例 #13
0
ファイル: LSPDCmds.cs プロジェクト: unrealgta/Reallife-V
        public void CMD_Entlassen(Client client, Client player)
        {
            PlayerInfo clientInfo = PlayerHelper.GetPlayerStats(client);
            PlayerInfo playerInfo = PlayerHelper.GetPlayerStats(player);

            if (!FraktionSystem.HasRank(client, 1))
            {
                client.SendNotification("Du hast dazu keine Berechtigung!");
                return;
            }

            if (!client.HasData("onduty"))
            {
                client.SendNotification("~r~Du bist nicht im Dienst!");
                return;
            }

            if (client.Position.DistanceTo2D(new Vector3(461.9194, -989.1077, 24.91486)) <= 3)
            {
                playerInfo.jail          = 0;
                playerInfo.jailtime      = 0;
                playerInfo.temp_location = null;
                playerInfo.Update();

                PlayerData.Respawn(player);
                client.SendNotification($"[~b~LSPD~w~]: Du hast ~y~{player.Name}~w~ aus dem Gefägnis gelassen!");
                player.SendNotification($"[~b~LSPD~w~]: {client.Name}~w~ hat dich aus dem Gefägnis gelassen!");
            }
            else
            {
                client.SendNotification("Du kannst die Person hier nicht entlassen!");
            }
        }
コード例 #14
0
        public void CMD_Entlassen(Client client, Client player)
        {
            PlayerInfo clientInfo = PlayerHelper.GetPlayerStats(client);
            PlayerInfo playerInfo = PlayerHelper.GetPlayerStats(player);

            if (!FraktionSystem.HasRank(client, 1))
            {
                client.SendNotification("Vous n'avez aucune autorisation!");
                return;
            }

            if (!client.HasData("onduty"))
            {
                client.SendNotification("~r~Vous n'êtes pas en service!");
                return;
            }

            if (client.Position.DistanceTo2D(new Vector3(461.9194, -989.1077, 24.91486)) <= 3)
            {
                playerInfo.jail          = 0;
                playerInfo.jailtime      = 0;
                playerInfo.temp_location = null;
                playerInfo.Update();

                PlayerData.Respawn(player);
                client.SendNotification($"[~b~LSPD~w~]: ~y~{player.Name}~w~ta sortis de prison");
                player.SendNotification($"[~b~LSPD~w~]: {client.Name}~w~ vous a laissé en dehors de la prison!");
            }
            else
            {
                client.SendNotification("Vous ne pouvez pas renvoyer la personne ici!");
            }
        }
コード例 #15
0
ファイル: LSPDCmds.cs プロジェクト: unrealgta/Reallife-V
        public void CMD_Einsperren(Client client, Client player)
        {
            PlayerInfo clientInfo = PlayerHelper.GetPlayerStats(client);
            PlayerInfo playerInfo = PlayerHelper.GetPlayerStats(player);

            if (!FraktionSystem.HasRank(client, 1))
            {
                client.SendNotification("Du hast dazu keine Berechtigung!");
                return;
            }

            if (!client.HasData("onduty"))
            {
                client.SendNotification("~r~Du bist nicht im Dienst!");
                return;
            }

            if (!player.HasData("cuff") == true)
            {
                client.SendNotification("Spieler ist nicht in Handschellen!");
                return;
            }

            if (playerInfo.wantedlevel == 0)
            {
                client.SendNotification("Dieser Spieler wird nicht gesucht!");
                return;
            }

            if (client.Position.DistanceTo2D(new Vector3(461.9194, -989.1077, 24.91486)) <= 3)
            {
                if (client.Position.DistanceTo2D(player.Position) <= 5)
                {
                    playerInfo.jail = 1;
                    playerInfo.cuff = 0;

                    playerInfo.Update();

                    PlayerData.Respawn(player);

                    client.SendNotification($"[~b~LSPD~w~]: Du hast ~y~{player.Name}~w~ in das Gefägnis gesteckt!");
                    player.SendNotification($"[~b~LSPD~w~]: {client.Name}~w~ hat dich in das Gefängnis gesteckt!");
                }
                else
                {
                    client.SendNotification("Dieser Spieler befindet sich nicht in deiner Nähe!");
                }
            }
            else
            {
                client.SendNotification("Du kannst die Person hier nicht einsperren!");
            }
        }
コード例 #16
0
        public void CMD_Einsperren(Client client, Client player)
        {
            PlayerInfo clientInfo = PlayerHelper.GetPlayerStats(client);
            PlayerInfo playerInfo = PlayerHelper.GetPlayerStats(player);

            if (!FraktionSystem.HasRank(client, 1))
            {
                client.SendNotification("Vous n'avez aucune autorisation!");
                return;
            }

            if (!client.HasData("onduty"))
            {
                client.SendNotification("~r~Vous n'êtes pas en service!");
                return;
            }

            if (!player.HasData("cuff") == true)
            {
                client.SendNotification("Le joueur n'est pas menotté!");
                return;
            }

            if (playerInfo.wantedlevel == 0)
            {
                client.SendNotification("Ce joueur n'est pas recherché!");
                return;
            }

            if (client.Position.DistanceTo2D(new Vector3(461.9194, -989.1077, 24.91486)) <= 3)
            {
                if (client.Position.DistanceTo2D(player.Position) <= 5)
                {
                    playerInfo.jail = 1;
                    playerInfo.cuff = 0;

                    playerInfo.Update();

                    PlayerData.Respawn(player);

                    client.SendNotification($"[~b~LSPD~w~]: Vous avez enfermé ~y~{player.Name}~w~ dans la prion !");
                    player.SendNotification($"[~b~LSPD~w~]: {client.Name}~w~ Vous venez d'etre mis en prison");
                }
                else
                {
                    client.SendNotification("Ce joueur n'est pas dans votre région!");
                }
            }
            else
            {
                client.SendNotification("Vous ne pouvez pas enfermer la personne ici!");
            }
        }
コード例 #17
0
ファイル: FraktionCmds.cs プロジェクト: unrealgta/Reallife-V
        public void CMD_duty(Client client)
        {
            PlayerInfo playerInfo = PlayerHelper.GetPlayerStats(client);

            if (playerInfo.wantedlevel > 0)
            {
                client.SendNotification("~r~Du kannst nicht in den Dienst gehen wenn du gesucht wirst!");
                return;
            }

            if (client.Position.DistanceTo2D(new Vector3(452.2726, -980.15, 30.68961)) <= 0.8)
            {
                if (FraktionSystem.HasRank(client, 1))
                {
                    if (client.HasData("onduty"))
                    {
                        PlayerData.OffDuty(client);
                    }
                    else
                    {
                        PlayerData.LSPDDuty(client);
                    }
                }
                else
                {
                    client.SendNotification("~r~Du gehörst nicht zur LSPD!");
                }
            }
            else if (client.Position.DistanceTo2D(new Vector3(1207.794, -1487.555, 34.84264)) <= 0.8)
            {
                if (FraktionSystem.HasRank(client, 2))
                {
                    if (client.HasData("onduty") || client.HasData("fonduty"))
                    {
                        PlayerData.OffDuty(client);
                    }
                    else
                    {
                        PlayerData.SARUDuty(client);
                    }
                }
                else
                {
                    client.SendNotification("~r~Du gehörst nicht zur SARU!");
                }
            }
            else
            {
                client.SendNotification("Du bist nicht in der nähe von einem duty!");
            }
        }
コード例 #18
0
        public void CMD_duty(Client client)
        {
            PlayerInfo playerInfo = PlayerHelper.GetPlayerStats(client);

            if (playerInfo.wantedlevel > 0)
            {
                client.SendNotification("~r~Vous ne pouvez pas etre en service si vous êtes recherché!");
                return;
            }

            if (client.Position.DistanceTo2D(new Vector3(452.2726, -980.15, 30.68961)) <= 0.8)
            {
                if (FraktionSystem.HasRank(client, 1))
                {
                    if (client.HasData("onduty"))
                    {
                        PlayerData.OffDuty(client);
                    }
                    else
                    {
                        PlayerData.LSPDDuty(client);
                    }
                }
                else
                {
                    client.SendNotification("~r~Vous n'appartenez pas à la LSPD!");
                }
            }
            else if (client.Position.DistanceTo2D(new Vector3(1207.794, -1487.555, 34.84264)) <= 0.8)
            {
                if (FraktionSystem.HasRank(client, 2))
                {
                    if (client.HasData("onduty") || client.HasData("fonduty"))
                    {
                        PlayerData.OffDuty(client);
                    }
                    else
                    {
                        PlayerData.SARUDuty(client);
                    }
                }
                else
                {
                    client.SendNotification("~r~Vous n'appartenez pas à la SARU!");
                }
            }
            else
            {
                client.SendNotification("Vous n'êtes pas près d'un devoir!");
            }
        }
コード例 #19
0
        public void OnPlayerEnterSARUVehicle(Client client, Vehicle vehicle, sbyte seatID)
        {
            PlayerInfo playerInfo = PlayerHelper.GetPlayerStats(client);

            uint ambulance = NAPI.Util.GetHashKey("ambulance");
            uint firetruk  = NAPI.Util.GetHashKey("firetruk");

            if (vehicle.Model == ambulance || vehicle.Model == firetruk)
            {
                if (client.VehicleSeat == -1)
                {
                    if (!FraktionSystem.HasRank(client, 2))
                    {
                        client.SendNotification("~r~Vous n'êtes pas autorisé à le faire!");
                        client.WarpOutOfVehicle();
                    }
                }
            }
        }
コード例 #20
0
        public void CMD_DelAkte(Client client, Client player)
        {
            PlayerInfo pInfo = PlayerHelper.GetPlayerStats(player);

            if (!FraktionSystem.HasRank(client, 1))
            {
                client.SendNotification("~r~Vous n'appartenez pas à la LSPD!");
                return;
            }

            if (!client.HasData("onduty"))
            {
                client.SendNotification("~r~Vous n'êtes pas de service!");
                return;
            }

            if (player == null)
            {
                client.SendNotification("Le joueur n'a pas été trouvé!");
                return;
            }

            if (client.Name == player.Name)
            {
                client.SendNotification("~r~Vous ne pouvez pas vous spécifier!");
                return;
            }

            if (pInfo.wantedlevel > 4)
            {
                client.SendNotification("Ce joueur a trop de souhaits!");
                return;
            }

            pInfo.wantedlevel = 0;
            client.SendNotification($"[~b~LSPD~w~]: Vous avez supprimé le dossier de { player.Name} ~r~~w~!");
            player.SendChatMessage($"[~b~LSPD~w~]: ~b~{client.Name}~w~ à supprimer ton dossier ~r~~w~!");
            pInfo.Update();
            EventTriggers.Update_Wanteds(player);
        }
コード例 #21
0
        public void CMD_SetWanted(Client client, Client player, int wanteds)
        {
            PlayerInfo pInfo = PlayerHelper.GetPlayerStats(player);

            if (!FraktionSystem.HasRank(client, 1))
            {
                client.SendNotification("~r~Vous n'appartenez pas à la LSPD!");
                return;
            }

            if (!client.HasData("onduty"))
            {
                client.SendNotification("~r~Vous n'êtes pas en service!");
                return;
            }

            if (player == null)
            {
                client.SendNotification("Le joueur n'a pas été trouvé!");
                return;
            }

            if (client.Name == player.Name)
            {
                client.SendNotification("~r~Vous ne pouvez pas vous spécifier!");
                return;
            }

            if (wanteds > 6)
            {
                client.SendChatMessage("Vous ne pouvez pas distribuer plus de 6 Wanted!");
                return;
            }

            pInfo.wantedlevel += wanteds;
            client.SendNotification($"[~b~LSPD~w~]: Le joueur ~r~{player.Name}~w~ vous à donné  ~r~{wanteds} recherche~w~ !");
            player.SendChatMessage($"[~b~LSPD~w~]: ~b~{client.Name}~w~ est recherché ~r~{wanteds} ~w~ !");
            pInfo.Update();
            EventTriggers.Update_Wanteds(player);
        }
コード例 #22
0
        public void CMD_RemoveWanted(Client client, Client player, int wanteds)
        {
            PlayerInfo pInfo = PlayerHelper.GetPlayerStats(player);

            if (!FraktionSystem.HasRank(client, 1))
            {
                client.SendNotification("~r~Vous n'appartenez pas à la LSPD!");
                return;
            }

            if (!client.HasData("onduty"))
            {
                client.SendNotification("~r~Vous n'êtes pas en service!");
                return;
            }

            if (player == null)
            {
                client.SendNotification("Le joueur n'a pas été trouvé!");
                return;
            }

            if (client.Name == player.Name)
            {
                client.SendNotification("~r~Vous ne pouvez pas vous spécifier!");
                return;
            }

            if (pInfo.wantedlevel - wanteds <= 0)
            {
                client.SendChatMessage("Vous ne pouvez pas donner au joueur pas moins de 0 Wanted!");
                return;
            }

            pInfo.wantedlevel -= wanteds;
            client.SendNotification($"[~b~LSPD~w~]: Vous avez enlevé un recherche à ~r~{player.Name}~w~ il à ~r~{wanteds} recherche~w~!");
            player.SendChatMessage($"[~b~LSPD~w~]: ~b~{client.Name}~w~ a vous ~r~{wanteds} recherche~w~ abgezogen!");
            pInfo.Update();
            EventTriggers.Update_Wanteds(player);
        }
コード例 #23
0
ファイル: LSPDCmds.cs プロジェクト: unrealgta/Reallife-V
        public void CMD_Cuff(Client client, Client player)
        {
            PlayerInfo clientInfo = PlayerHelper.GetPlayerStats(client);
            PlayerInfo playerInfo = PlayerHelper.GetPlayerStats(player);

            if (!FraktionSystem.HasRank(client, 1))
            {
                client.SendNotification("Du hast dazu keine Berechtigung!");
                return;
            }

            if (!client.HasData("onduty"))
            {
                client.SendNotification("~r~Du bist nicht im Dienst!");
                return;
            }

            if (player.HasData("cuff"))
            {
                client.SendNotification("Dieser Spieler besitzt bereits Handschellen!");
                return;
            }

            if (playerInfo.jail == 1)
            {
                client.SendNotification("Dieser Spieler kann im Gefängnis keine Handschellen tragen!");
                return;
            }

            if (player.Position.DistanceTo2D(client.Position) < 5)
            {
                NAPI.Player.PlayPlayerAnimation(player, (int)(AnimationFlags.Loop | AnimationFlags.OnlyAnimateUpperBody | AnimationFlags.AllowPlayerControl), "mp_arresting", "idle");
                client.SendNotification("[~b~LSPD~w~]:~w~ Du hast diese Person festgenommen: " + player.Name);
                LSPD.cuff(player);
            }
            else
            {
                client.SendNotification("Spieler ist nicht in Reichweite!");
            }
        }
コード例 #24
0
ファイル: LSPDCmds.cs プロジェクト: unrealgta/Reallife-V
        public void CMD_DelAkte(Client client, Client player)
        {
            PlayerInfo pInfo = PlayerHelper.GetPlayerStats(player);

            if (!FraktionSystem.HasRank(client, 1))
            {
                client.SendNotification("~r~Du gehörst nicht zur LSPD!");
                return;
            }

            if (!client.HasData("onduty"))
            {
                client.SendNotification("~r~Du befindest dich nicht im Dienst!");
                return;
            }

            if (player == null)
            {
                client.SendNotification("Spieler wurde nicht gefunden!");
                return;
            }

            if (client.Name == player.Name)
            {
                client.SendNotification("~r~Du kannst dich nicht selber angeben!");
                return;
            }

            if (pInfo.wantedlevel > 4)
            {
                client.SendNotification("Dieser Spieler hat zu viele Wanteds!");
                return;
            }

            pInfo.wantedlevel = 0;
            client.SendNotification($"[~b~LSPD~w~]: Du hast die Akte von {player.Name} ~r~gelöscht~w~!");
            player.SendChatMessage($"[~b~LSPD~w~]: ~b~{client.Name}~w~ hat deine Akte ~r~gelöscht~w~!");
            pInfo.Update();
            EventTriggers.Update_Wanteds(player);
        }
コード例 #25
0
ファイル: LSPDCmds.cs プロジェクト: unrealgta/Reallife-V
        public void CMD_SetWanted(Client client, Client player, int wanteds)
        {
            PlayerInfo pInfo = PlayerHelper.GetPlayerStats(player);

            if (!FraktionSystem.HasRank(client, 1))
            {
                client.SendNotification("~r~Du gehörst nicht zur LSPD!");
                return;
            }

            if (!client.HasData("onduty"))
            {
                client.SendNotification("~r~Du befindest dich nicht im Dienst!");
                return;
            }

            if (player == null)
            {
                client.SendNotification("Spieler wurde nicht gefunden!");
                return;
            }

            if (client.Name == player.Name)
            {
                client.SendNotification("~r~Du kannst dich nicht selber angeben!");
                return;
            }

            if (wanteds > 6)
            {
                client.SendChatMessage("Du kannst nicht mehr als 6 Wanteds verteilen!");
                return;
            }

            pInfo.wantedlevel += wanteds;
            client.SendNotification($"[~b~LSPD~w~]: Du hast ~r~{player.Name}~w~ erfolgreich ~r~{wanteds} Wanteds~w~ gegeben!");
            player.SendChatMessage($"[~b~LSPD~w~]: ~b~{client.Name}~w~ hat dir ~r~{wanteds} Wanteds~w~ gegeben!");
            pInfo.Update();
            EventTriggers.Update_Wanteds(player);
        }
コード例 #26
0
        public void CMD_Cuff(Client client, Client player)
        {
            PlayerInfo clientInfo = PlayerHelper.GetPlayerStats(client);
            PlayerInfo playerInfo = PlayerHelper.GetPlayerStats(player);

            if (!FraktionSystem.HasRank(client, 1))
            {
                client.SendNotification("Vous n'avez aucune autorisation!");
                return;
            }

            if (!client.HasData("onduty"))
            {
                client.SendNotification("~r~Vous n'êtes pas en service!");
                return;
            }

            if (player.HasData("cuff"))
            {
                client.SendNotification("Ce joueur a déjà des menottes!");
                return;
            }

            if (playerInfo.jail == 1)
            {
                client.SendNotification("Ce joueur ne peut pas être menotté en prison!");
                return;
            }

            if (player.Position.DistanceTo2D(client.Position) < 5)
            {
                NAPI.Player.PlayPlayerAnimation(player, (int)(AnimationFlags.Loop | AnimationFlags.OnlyAnimateUpperBody | AnimationFlags.AllowPlayerControl), "mp_arresting", "idle");
                client.SendNotification("[~b~LSPD~w~]:~w~ Vous avez arrêté : " + player.Name);
                LSPD.cuff(player);
            }
            else
            {
                client.SendNotification("Le joueur n'est pas à portée de main!");
            }
        }
コード例 #27
0
ファイル: LSPDCmds.cs プロジェクト: NachoMan12/Reallife-V
        public void CMD_RemoveWanted(Client client, Client player, int wanteds)
        {
            PlayerInfo pInfo = PlayerHelper.GetPlayerStats(player);

            if (!FraktionSystem.HasRank(client, 1))
            {
                client.SendNotification("~r~Du gehörst nicht zur LSPD!");
                return;
            }

            if (!client.HasData("onduty"))
            {
                client.SendNotification("~r~Du befindest dich nicht im Dienst!");
                return;
            }

            if (player == null)
            {
                client.SendNotification("Spieler wurde nicht gefunden!");
                return;
            }

            if (client.Name == player.Name)
            {
                client.SendNotification("~r~Du kannst dich nicht selber angeben!");
                return;
            }

            if (pInfo.wantedlevel - wanteds <= 0)
            {
                client.SendChatMessage("Du kannst dem Spieler nicht weniger als 0 Wanteds geben!");
                return;
            }

            pInfo.wantedlevel -= wanteds;
            client.SendNotification($"~g~[POLICE]:~w~ Du hast ~r~{player.Name}~w~ erfolgreich ~r~{wanteds} Wanteds~w~ abgezogen!");
            player.SendChatMessage($"~g~[POLICE]: ~b~{client.Name}~w~ hat dir ~r~{wanteds} Wanteds~w~ abgezogen!");
            pInfo.Update();
            EventTriggers.Update_Wanteds(player);
        }
コード例 #28
0
        public void CMD_MegaPhone(Client client, string message)
        {
            PlayerInfo playerInfo = PlayerHelper.GetPlayerStats(client);

            if (!FraktionSystem.HasRank(client, 1))
            {
                client.SendNotification("Vous n'avez pas accès à cette commande!");
                return;
            }

            //Überprüfen ob ein Spieler innerhalb der Reichweite (25) ist.
            Client[] clients = NAPI.Pools.GetAllPlayers().FindAll(x => x.Position.DistanceTo2D(client.Position) <= 25).ToArray();

            for (int i = 0; i < clients.Length; i++)
            {
                if (!clients[i].Exists)
                {
                    continue;
                }

                clients[i].SendChatMessage($"[~b~Megaphone~w~] {client.Name}: {message}");
            }
        }
コード例 #29
0
ファイル: LSPD.cs プロジェクト: NachoMan12/Reallife-V
        public void OnPlayerEnterLSPDVehicle(Client client, Vehicle vehicle, sbyte seatID)
        {
            PlayerInfo playerInfo = PlayerHelper.GetPlayerStats(client);

            uint police = NAPI.Util.GetHashKey("police");

            /*if (!FraktionSystem.HasRank(client, 1))
            {
                client.SendNotification("~r~Du bist dazu nicht befugt!");
                client.WarpOutOfVehicle();
            }*/

            if (vehicle.Model == police)
            {
                if (client.VehicleSeat == -1)
                {
                    if (!FraktionSystem.HasRank(client, 1))
                    {
                        client.SendNotification("~r~Du bist dazu nicht befugt!");
                        client.WarpOutOfVehicle();
                    }
                } 
            }
        }
コード例 #30
0
ファイル: SARUCmds.cs プロジェクト: NachoMan12/Reallife-V
        public void CMD_fduty(Client client)
        {
            PlayerInfo playerInfo = PlayerHelper.GetPlayerStats(client);

            if (client.Position.DistanceTo2D(new Vector3(1194.831, -1477.961, 34.85954)) <= 0.8)
            {
                if (FraktionSystem.HasRank(client, 2))
                {
                    if (client.HasData("fonduty") || client.HasData("onduty"))
                    {
                        PlayerData.OffDuty(client);
                    }
                    else
                    {
                        client.SetClothes(8, 129, 0);
                        client.SetClothes(11, 95, 0);
                        client.SetClothes(4, 13, 0);
                        client.SetClothes(6, 10, 0);
                        client.SetClothes(0, 124, 0);
                        client.SetClothes(5, 45, 0);

                        client.SendNotification("Du bist nun im Dienst!");

                        client.SetData("fonduty", 1);
                    }
                }
                else
                {
                    client.SendNotification("~r~Du gehörst nicht zur SARU!");
                }
            }
            else
            {
                client.SendNotification("Du bist nicht in der nähe von einem duty!");
            }
        }