Exemple #1
0
        private void WeaponInfo(int source, List <object> args, string raw)
        {
            xPlayer xPlayer = ESX.GetPlayerFromId(source);

            if (args.Count > 0)
            {
                Weapon weapon = xPlayer.GetWeapon(args[0].ToString());
                xPlayer.ShowNotification($"Found weapon: {weapon.name} Tint: {weapon.Raw.tintIndex} Loadoutnum: {xPlayer.GetWeaponLoadoutNum(weapon.name)}");

                if (weapon.components.Count > 0)
                {
                    foreach (string i in weapon.components)
                    {
                        xPlayer.ShowNotification(i);
                    }
                }
                else
                {
                    xPlayer.ShowNotification("This weapon have 0 components");
                }
            }
            else
            {
                xPlayer.ShowNotification("Usage: !WeaponInfo weaponName");
            }
        }
Exemple #2
0
        private void DelWeapon(int source, List <object> args, string raw)
        {
            xPlayer xPlayer = ESX.GetPlayerFromId(source);

            xPlayer.RemoveWeapon(args[0].ToString());
            xPlayer.ShowNotification($"Deleted {args[0]}");
        }
Exemple #3
0
        private void AddWeapon(int source, List <object> args, string raw)
        {
            xPlayer xPlayer = ESX.GetPlayerFromId(source);

            xPlayer.AddWeapon(args[0].ToString(), Convert.ToInt32(args[1]));
            xPlayer.ShowNotification($"You have got {args[0]}");
        }
Exemple #4
0
        private void GetAccounts(int source, List <object> args, string raw)
        {
            xPlayer xPlayer = ESX.GetPlayerFromId(source);

            foreach (Account i in xPlayer.GetAccounts(false))
            {
                xPlayer.ShowNotification($"Account: {i.name} Label: {i.label} Money: {i.money}");
            }
        }
Exemple #5
0
        private void LoadoutInfo(int source, List <object> args, string raw)
        {
            xPlayer       xPlayer = ESX.GetPlayerFromId(source);
            List <Weapon> loadout = xPlayer.GetLoadout(false);

            foreach (Weapon i in loadout)
            {
                xPlayer.ShowNotification($"Weapon: {i.name} Ammo: {i.ammo}");
            }
        }