If ammo magazine_size = 10, I want insert used ammo (1~9/10)
I used two types code
Code: Select all
local inv = entity.get_inventory(1)
game.players[player_index].insert({name = inv[1].prototype.name, count = inv[1].count})
game.players[player_index].insert(inv[1])
Is there a solution for this?