-- LUA Script - Created with LUA Pad 06/05/2020 13:05:58 -- precede every function and global member with lowercase name of script + _main state = {} function nwhud_init(e) state[e] = 0 scrx=GetDeviceWidth() scry=GetDeviceHeight() myHud = LoadImage("gamecore\\crosshairs\\crosshair11.png",1) imagewidth = GetImageWidth ( myHud ) -- get percentage width of image imageheight = GetImageHeight ( myHud ) -- get percentage height of image imgwpix = math.floor((imagewidth * scrx) / 100) imghpix = math.floor((imageheight * scry) / 100) imgcentx = (((scrx / 2) - (imgwpix / 2)) / scrx) * 100 imgcenty = (((scry / 2) - (imghpix / 2)) / scry) * 100 divepick = CreateSprite(myHud) SetSpritePosition(divepick,imgcentx,imgcenty) end function nwhud_main(e) end