Originally Posted by
Urazfenix88
and about spawn lot gold bag? or money bag? there is a code script?
Code:
local pos = managers.player:player_unit():position()
function spawn_loot(type, _position, z_offset)
local position = mvector3.copy(_position)
if z_offset then mvector3.set_z(position, position.z + z_offset) end
if Network:is_client() then
managers.network:session():send_to_host( "server_drop_carry", type, managers.money:get_bag_value( type ), nil, nil, 0, position, Rotation( math.UP, math.random() * 360 ), Vector3( 0,0,0 ), 0 )
else
managers.player:server_drop_carry( type, managers.money:get_bag_value( type ), nil, nil, 0, position, Rotation( math.UP, math.random() * 360 ), Vector3( 0,0,0 ), 0 )
end
end
spawn_loot("gold", pos, 120)