.I wanna know, how can i spawn the item, when using a trigger or whatever, with ammo 30|0(<-as example) on the map?
for example:

Thank you
Maps/Editor
Ammoin/Ammo
Ammoin/Ammo
.
setammo can do this. The only problem is to obtain the dropped item id.
Seekay:
thanks, ok yu ppro ok
Talented Doge: maybe there is a way to change it by trigger_if?
setammo alongside with dropped weapon.
Talented Doge: oh, okay, it's shit mi aer scared .
Trigger_Use
Name:
Trigger: item,lua
Env_item
Name: item
Trigger:
Item ID: 32 - M4A1
Trigger_if
Name: lua
Trigger:
Condition: (function() for _,id in pairs(item(0,"table")) do if item(id,"x")==11 and item(id,"y")==5 then parse("setammo "..id.." 0 30 0") end end return false end)() 
(function()
for _, id in pairs(item(0,"table")) do
if item(id, "x") == 11 and item(id, "y") == 5 then
parse("setammo " .. id .. " 0 30 0")
end
end
return false
end)()
_oops: i didn't said i wanna drop them or make it for every weapon, i've check it, but it's not a solution! Thank you for trying.
Apache uwu: wtf man, thank you very much
(nohomo) you are best :dfunction hello()
parse("echo hello")
end
function()
parse("setammo "..etc)
end
Apache uwu: o-oh, i understand now, thank you for explain this
(1==1) msg("Hello world!")
_oops: Thank you too, m8
setammo apply to all of them?
VADemon: On the ground.. and in the specific tile is not the same.
Apache uwu: is work only for the tile you set, for example x=3 y=10. any other spawned/nonspanwed weapons have default ammo.
setammo ID parameter takes a dropped item's ID which is unique for any dropped weapon on the map.
Apache uwu's code works for all weapons on that specific tile. The weapon type doesn't matter.function ()
	for _, id in pairs(item(0,"table")) do
		if item(id, "x") == TILE_X and item(id, "y") == TILE_Y then
			parse("setammo " .. id .. " 0 30 0")
			
			--return false	-- Uncomment this line if you want only ONE weapon's ammo on that tile to be changed
		end
	end
	return false
end
if item(id, "x") == TILE_X and item(id, "y") == TILE_Y then
if item(id, "x") == TILE_X and item(id, "y") == TILE_Y and item(id, "dropped") == false and item(id, "type") == ITEM_TYPE then
Alistaire: You could probably get away with just !item(id, "dropped") and the position of the item.