Esempio n. 1
0
 public static void GivePlayerGangwarWeapons(GangwarPlayer player)
 {
     try
     {
         player.GiveWeapon(AltV.Net.Enums.WeaponModel.DoubleActionRevolver, 9999);
         player.GiveWeapon(AltV.Net.Enums.WeaponModel.HeavyRevolverMkII, 9999);
         player.GiveWeapon(AltV.Net.Enums.WeaponModel.Pistol50, 9999);
         player.GiveWeapon(AltV.Net.Enums.WeaponModel.MiniSMG, 9999);
         player.GiveWeapon(AltV.Net.Enums.WeaponModel.SMG, 9999);
         player.GiveWeapon(AltV.Net.Enums.WeaponModel.PumpShotgun, 9999);
         player.GiveWeapon(AltV.Net.Enums.WeaponModel.Musket, 9999);
         player.GiveWeapon(AltV.Net.Enums.WeaponModel.APPistol, 9999);
         player.GiveWeapon(AltV.Net.Enums.WeaponModel.CombatPDW, 9999);
         player.GiveWeapon(AltV.Net.Enums.WeaponModel.BullpupRifle, 9999);
         player.GiveWeapon(AltV.Net.Enums.WeaponModel.AdvancedRifle, 9999);
         player.GiveWeapon(AltV.Net.Enums.WeaponModel.GusenbergSweeper, 9999);
         player.GiveWeapon(AltV.Net.Enums.WeaponModel.AssaultRifle, 9999);
         player.GiveWeapon(AltV.Net.Enums.WeaponModel.SpecialCarbine, 9999);
         player.GiveWeapon(AltV.Net.Enums.WeaponModel.Switchblade, 9999);
         player.GiveWeapon(AltV.Net.Enums.WeaponModel.Nightstick, 9999);
         player.GiveWeapon(AltV.Net.Enums.WeaponModel.Machete, 9999);
         player.GiveWeapon(AltV.Net.Enums.WeaponModel.BaseballBat, 9999);
     }
     catch { }
 }
Esempio n. 2
0
        public static void GetHereTarget(GangwarPlayer player, string Username)
        {
            GangwarPlayer target = Functions.GetPlayerByName(Username);

            if (target is null || !target.Exists)
            {
                return;
            }
            target.SetPosition(player.Position);
        }
Esempio n. 3
0
 public static void LoadGangVehicleSpawnpoints(GangwarPlayer playerClass)
 {
     try
     {
         foreach (Vector3 vehClasses in VehicleSpawnpoints.Values)
         {
             playerClass.Emit("TextLabel:Create", "Press ~b~E ~w~to select a Vehicle.", vehClasses.X, vehClasses.Y, vehClasses.Z, 0, 255, 255, 255, 40);
         }
     }
     catch { }
 }
Esempio n. 4
0
        public static AccountModel GetAccountModelByPlayer(GangwarPlayer player)
        {
            foreach (AccountModel accClass in AccountList)
            {
                if (accClass.HardwareIdHash == player.HardwareIdHash.ToString() || accClass.SocialClubId == player.SocialClubId.ToString())
                {
                    return(accClass);
                }
            }

            return(null);
        }
Esempio n. 5
0
        public static void LoadGangAreas(GangwarPlayer playerClass)
        {
            try
            {
                foreach (var ZonePosition in PlayerSpawnpoints)
                {
                    switch (ZonePosition.Key)
                    {
                    case (int)Teams.LSPD:
                        playerClass.Emit("Zone:Create", ZonePosition.Key, ZonePosition.Value.X, ZonePosition.Value.Y, ZonePosition.Value.Z, 100, 3, 0);
                        break;

                    case (int)Teams.LCN:
                        playerClass.Emit("Zone:Create", ZonePosition.Key, ZonePosition.Value.X, ZonePosition.Value.Y, ZonePosition.Value.Z, 100, 55, 0);
                        break;

                    case (int)Teams.YAKUZA:
                        playerClass.Emit("Zone:Create", ZonePosition.Key, ZonePosition.Value.X, ZonePosition.Value.Y, ZonePosition.Value.Z, 100, 1, 0);
                        break;

                    case (int)Teams.FIB:
                        playerClass.Emit("Zone:Create", ZonePosition.Key, ZonePosition.Value.X, ZonePosition.Value.Y, ZonePosition.Value.Z, 100, 63, 0);
                        break;

                    case (int)Teams.NARCOS:
                        playerClass.Emit("Zone:Create", ZonePosition.Key, ZonePosition.Value.X, ZonePosition.Value.Y, ZonePosition.Value.Z, 100, 45, 0);
                        break;

                    case (int)Teams.USARMY:
                        playerClass.Emit("Zone:Create", ZonePosition.Key, ZonePosition.Value.X, ZonePosition.Value.Y, ZonePosition.Value.Z, 100, 69, 0);
                        break;

                    case (int)Teams.SAMCRO:
                        playerClass.Emit("Zone:Create", ZonePosition.Key, ZonePosition.Value.X, ZonePosition.Value.Y, ZonePosition.Value.Z, 100, 56, 0);
                        break;

                    case (int)Teams.ROLLINHEIGHTS:
                        playerClass.Emit("Zone:Create", ZonePosition.Key, ZonePosition.Value.X, ZonePosition.Value.Y, ZonePosition.Value.Z, 100, 27, 0);
                        break;
                    }
                }
            }
            catch { }
        }
Esempio n. 6
0
 public static void LoginPlayer(GangwarPlayer player)
 {
     try
     {
         AccountModel accClass = Init.GetAccountModelByPlayer(player);
         if (accClass is null)
         {
             return;
         }
         player.UID        = accClass.UID;
         player.Username   = accClass.Username;
         player.Deaths     = accClass.Deaths;
         player.AdminLevel = accClass.AdminLevel;
         player.Kills      = accClass.Kills;
         player.Playtime   = accClass.Playtime;
         player.TriggerClientEvent("Selection:Show");
     }
     catch (Exception ex) { Core.Debug.CatchException(ex); }
 }
Esempio n. 7
0
        public static void RegisterPlayer(GangwarPlayer player, string Username)
        {
            AccountModel accClass = Init.GetAccountModelByPlayer(player);

            if (accClass is not null)
            {
                return;
            }
            AccountModel newAccClass = new AccountModel
            {
                UID            = (Init.AccountList.Count + 1),
                Username       = Username,
                AdminLevel     = 0,
                Deaths         = 0,
                Kills          = 0,
                Playtime       = 0,
                SocialClubId   = player.SocialClubId.ToString(),
                HardwareIdHash = player.HardwareIdHash.ToString()
            };

            Init.AccountList.Add(newAccClass);
            Database.Database.RegisterAccount(Username, player.SocialClubId.ToString(), player.HardwareIdHash.ToString());
        }
Esempio n. 8
0
        public static void BanTarget(GangwarPlayer player, string Username, string Reason)
        {
            GangwarPlayer target = Functions.GetPlayerByName(Username);

            if (target is null || !target.Exists)
            {
            }
            foreach (AccountModel account in Account.Init.AccountList)
            {
                if (account.Username == Username)
                {
                    BanModel newBanEntry = new BanModel
                    {
                        UID        = account.UID,
                        HardwareId = account.HardwareIdHash,
                        SCID       = account.SocialClubId,
                        Reason     = Reason
                    };
                    Database.Database.CreateNewBanEntry(newBanEntry);
                    Admin.Init.AccountBans.Add(newBanEntry);
                    Functions.SendChatMessageToAll(Functions.GetHexColorcode(200, 0, 0) + Username + " got banned! Reason: " + Reason);
                }
            }
        }
Esempio n. 9
0
 public static void SelectPlayerTeam(GangwarPlayer player, int id)
 {
     player.SetTeam(id);
 }
Esempio n. 10
0
 public static void OnPlayerLogin(GangwarPlayer player, string Username)
 {
 }
Esempio n. 11
0
        public static void LoadGangSkin(GangwarPlayer playerClass, int Gang)
        {
            try
            {
                playerClass.Model = Alt.Hash("mp_m_freemode_01");
                playerClass.SetClothes(0, 0, 0);
                playerClass.SetClothes(1, 0, 0);
                playerClass.SetClothes(2, 0, 0);
                playerClass.SetClothes(3, 0, 0);
                playerClass.SetClothes(4, 0, 0);
                playerClass.SetClothes(5, 0, 0);
                playerClass.SetClothes(6, 0, 0);
                playerClass.SetClothes(7, 0, 0);
                playerClass.SetClothes(8, 0, 0);
                playerClass.SetClothes(9, 0, 0);
                playerClass.SetClothes(10, 0, 0);
                playerClass.SetClothes(11, 0, 0);
                GiveRandomHair(playerClass);
                switch (Gang)
                {
                case (int)Teams.LSPD:
                    playerClass.SetClothes(0, 0, 0);
                    playerClass.SetClothes(1, 0, 0);
                    playerClass.SetClothes(2, -1, -1);
                    playerClass.SetClothes(3, 0, 0);
                    playerClass.SetClothes(4, 35, 0);
                    playerClass.SetClothes(5, 0, 0);
                    playerClass.SetClothes(6, 25, 0);
                    playerClass.SetClothes(7, 0, 0);
                    playerClass.SetClothes(8, 58, 0);
                    playerClass.SetClothes(9, 0, 0);
                    playerClass.SetClothes(10, 0, 0);
                    playerClass.SetClothes(11, 55, 0);
                    break;

                case (int)Teams.LCN:
                    playerClass.SetClothes(0, 0, 0);
                    playerClass.SetClothes(1, 0, 0);
                    playerClass.SetClothes(2, -1, -1);
                    playerClass.SetClothes(3, 4, 0);
                    playerClass.SetClothes(4, 28, 0);
                    playerClass.SetClothes(5, 0, 0);
                    playerClass.SetClothes(6, 21, 0);
                    playerClass.SetClothes(7, 0, 0);
                    playerClass.SetClothes(8, 33, 0);
                    playerClass.SetClothes(9, 0, 0);
                    playerClass.SetClothes(10, 0, 0);
                    playerClass.SetClothes(11, 29, 0);
                    break;

                case (int)Teams.YAKUZA:
                    playerClass.SetClothes(2, -1, -1);
                    playerClass.SetClothes(5, 0, 0);
                    playerClass.SetClothes(7, 0, 0);
                    playerClass.SetClothes(8, 15, 0);
                    playerClass.SetClothes(9, 0, 0);
                    playerClass.SetClothes(10, 0, 0);
                    playerClass.SetClothes(0, 0, 0);
                    playerClass.SetClothes(1, -1, 0);
                    playerClass.SetClothes(11, 107, 2);
                    playerClass.SetClothes(3, 33, 0);
                    playerClass.SetClothes(4, 33, 0);
                    playerClass.SetClothes(6, 81, 0);
                    break;

                case (int)Teams.FIB:
                    playerClass.SetClothes(0, -1, -1);
                    playerClass.SetClothes(1, 0, 0);
                    playerClass.SetClothes(2, -1, -1);
                    playerClass.SetClothes(3, 11, 0);
                    playerClass.SetClothes(4, 10, 0);
                    playerClass.SetClothes(5, -1, -1);
                    playerClass.SetClothes(6, 10, 0);
                    playerClass.SetClothes(7, 12, 2);
                    playerClass.SetClothes(8, 15, 0);
                    playerClass.SetClothes(9, 0, 0);
                    playerClass.SetClothes(10, -1, 0);
                    playerClass.SetClothes(11, 13, 0);
                    break;

                case (int)Teams.NARCOS:
                    playerClass.SetClothes(0, 8, -1);
                    playerClass.SetClothes(1, 0, 0);
                    playerClass.SetClothes(2, -1, -1);
                    playerClass.SetClothes(3, 11, 0);
                    playerClass.SetClothes(4, 22, 0);
                    playerClass.SetClothes(5, 0, -1);
                    playerClass.SetClothes(6, 21, 5);
                    playerClass.SetClothes(7, 0, 0);
                    playerClass.SetClothes(8, 15, 0);
                    playerClass.SetClothes(9, 0, 0);
                    playerClass.SetClothes(10, 0, 0);
                    playerClass.SetClothes(11, 13, 1);
                    break;

                case (int)Teams.USARMY:
                    playerClass.SetClothes(4, 86, 8);
                    playerClass.SetClothes(11, 220, 8);
                    playerClass.SetClothes(8, 130, 0);
                    playerClass.SetClothes(6, 24, 0);
                    playerClass.SetClothes(2, 2, 4);
                    playerClass.SetProp(0, 107, 8);
                    break;

                case (int)Teams.SAMCRO:
                    playerClass.SetClothes(0, -1, -1);
                    playerClass.SetClothes(1, 0, 0);
                    playerClass.SetClothes(2, -1, -1);
                    playerClass.SetClothes(3, 2, 0);
                    playerClass.SetClothes(4, 76, 1);
                    playerClass.SetClothes(5, -1, -1);
                    playerClass.SetClothes(6, 25, 0);
                    playerClass.SetClothes(7, 0, 0);
                    playerClass.SetClothes(8, 14, 0);
                    playerClass.SetClothes(9, 0, 0);
                    playerClass.SetClothes(10, -1, 0);
                    playerClass.SetClothes(11, 175, 3);
                    break;

                case (int)Teams.ROLLINHEIGHTS:
                    playerClass.SetClothes(11, 306, 9);
                    playerClass.SetClothes(8, 15, 0);
                    playerClass.SetClothes(6, 26, 0);
                    playerClass.SetClothes(4, 31, 0);
                    playerClass.SetClothes(1, 111, 2);
                    playerClass.SetClothes(3, 4, 0);
                    break;

                case (int)Teams.COMPTONFAMILYS:
                    playerClass.SetClothes(1, 111, 0);
                    playerClass.SetClothes(3, 4, 0);
                    playerClass.SetClothes(4, 31, 0);
                    playerClass.SetClothes(6, 7, 0);
                    playerClass.SetClothes(11, 143, 0);
                    playerClass.SetClothes(8, 15, 0);
                    break;
                }
            }
            catch { }
        }
Esempio n. 12
0
        public static void GiveRandomHair(GangwarPlayer playerClass)
        {
            try
            {
                Random random   = new Random();
                int    randomid = random.Next(0, 18);
                switch (randomid)
                {
                case 0:
                    playerClass.SetClothes(2, 6, 4);
                    break;

                case 1:
                    playerClass.SetClothes(2, 7, 4);
                    break;

                case 2:
                    playerClass.SetClothes(2, 2, 3);
                    break;

                case 3:
                    playerClass.SetClothes(2, 2, 4);
                    break;

                case 4:
                    playerClass.SetClothes(2, 14, 4);
                    break;

                case 5:
                    playerClass.SetClothes(2, 25, 3);
                    break;

                case 7:
                    playerClass.SetClothes(2, 38, 4);
                    break;

                case 8:
                    playerClass.SetClothes(2, 57, 3);
                    break;

                case 9:
                    playerClass.SetClothes(2, 57, 4);
                    break;

                case 10:
                    playerClass.SetClothes(2, 72, 3);
                    break;

                case 11:
                    playerClass.SetClothes(2, 72, 4);
                    break;

                case 12:
                    playerClass.SetClothes(2, 74, 3);
                    break;

                case 13:
                    playerClass.SetClothes(2, 54, 4);
                    break;

                case 14:
                    playerClass.SetClothes(2, 32, 4);
                    break;

                case 15:
                    playerClass.SetClothes(2, 32, 3);
                    break;

                case 16:
                    playerClass.SetClothes(2, 8, 4);
                    break;

                case 17:
                    playerClass.SetClothes(2, 8, 2);
                    break;

                case 18:
                    playerClass.SetClothes(2, 8, 2);
                    break;
                }
            }
            catch (Exception ex) { Core.Debug.CatchException(ex); }
        }
Esempio n. 13
0
 public void OnVPNConnect(GangwarPlayer player, string IP, string CountryCode, string CountryName, string Asn, string Isp)
 {
     player?.Kick("Bro... VPN isn't allowed on our Server!");
 }
Esempio n. 14
0
 public void OnPlayerSyncDamage(GangwarPlayer player, GangwarPlayer killer, float Damage = 0)
 {
     player?.SendChatMessage("Oh... you got hitted by " + killer?.Name);
     killer?.SendChatMessage("Damn boi... You hitted " + player?.Name);
 }
Esempio n. 15
0
 public void PlayerConnect(GangwarPlayer player)
 {
     // ShowYourLoginWindow or something else...
 }