ID:2476859
 
Code:
Redraw()
for(var/obj/Blip/o in src.screen)
del o //Delete all previous blips
var/mob/M = src.mob
var/is = "" //icon_state of the blip
var/l = 5000 //layer of the blip. In case you want player to appear above everything or something
is = "you" // Make icon_state "you"
l = 5025 // Make this blip above everything else.
if(is) // If an icon_state was given...
var/obj/Blip/o = new // Make a new blip
o.icon = 'Radar Blips.dmi'
o.icon_state = is // Make the icon_state is.
o.dir = dir // Make the direction d.
o.layer = l // Make the l ayer the l.

var/mgetx = round(M.x/4)
var/mgety = round(M.y/4)
if(mgetx<1)mgetx=1
if(mgety<1)mgety=1

world<<"Test: [mgetx]/[mgety]"

var/mgethalf = round(148 / 2)
var/mgethalf2 = round(116 / 2)


world<<"Test: [mgetx]/[mgety]"
world<<"Test2: [mgethalf]/[mgethalf2]"

var/pos
var/pos2
if(mgetx<mgethalf)pos = -(round(mgethalf-mgetx))
else pos = round(mgethalf-mgetx)

if(mgety<mgethalf2)pos2 = -(round(mgethalf2-mgety))
else pos2 = round(mgethalf2-mgety)


pos = ((mgetx)) // Make the blip in the right position on the radar (may need to edit this for different size radars)
pos2 =((mgety))

world<<"TEST3: [pos]/[pos2]"

o.pixel_x = pos // Make the blip in the right position on the radar (may need to edit this for different size radars)
o.pixel_y = pos2
o.screen_loc = "minimap:2:[o.pixel_x],2:[o.pixel_y]" // Make it appear on the radar map
src.screen+=o // Add it to the radar


Problem description: im horrible with math so im not being to put it in the correct position the map is Width: 592
Height: 464 / Minimap Width: 148
Height: 116