Aim with crosshairs

The crosshair is in the middle of the screen but how i can get my fired shots and my abilities attacks hit the position where my crosshair is? How i can change my crosshair (just dot) in another color when my target is in range?

Look into linetracing:

How i can change my crosshair (just
dot) in another color when my target
is in range?

That would depend on how you put that dot on the screen. Are you using the HUD class for this, maybe a widget?

When you linetrace, you obtain a lot of information about the target the trace hit; based on that info, you can calculate the distance to the target. If the distance is small enough, change the crosshair’s colour.

Ok, thank you, i will look into line tracing.