you can use
function map(value, low1, high1, low2, high2)
return low2 + (high2 - low2) * (value - low1) / (high1 - low1)
end
local x, y = map(player_x, 0, world_w, 0, map_w), map(player_y, 0, world_h, 0, map_h)
replace world_w and world_h with gta 3d world size and replace map_w and map_h with your 2d map x and player_x and player_y is player position