Пример #1
0
 private static void GiveWeapon(string weapon, short ammo = 0, bool equip = false, PedInventory inventory = null)
 {
     if (inventory is null)
     {
         inventory = Game.LocalPlayer.Character.Inventory;
     }
     inventory.GiveNewWeapon(new WeaponAsset(weapon), ammo, equip);
 }
Пример #2
0
 public static WeaponDescriptor GiveNewWeapon(this PedInventory inventory, EWeaponHash weaponHash, short ammoCount, bool equipNow)
 {
     return(inventory.GiveNewWeapon((uint)weaponHash, ammoCount, equipNow));
 }