You need to work on your logic, sorry I didn't see if before..

You're saying if its to the left..... or if it's to the right... show the NO PISTOL icon. You need to use Ands/Nested IFs to do what you want, ex.
Code:
if (cx > (player.left - 600)) and (cx < (player.left + player.width + 600)) then
    if (cy > (player.top - 600)) and (cy < (player.top + player.height + 600) then
        '// Now do your stuff.
    endif
endif