Jump to content

Perm Crosshair


jaenster
 Share

Recommended Posts

#cs 
  * ---------------------------------------------------------------------------- 
  * "THE BEER-WARE LICENSE" (Revision 42): 
  * <mail@jaenster.net> wrote this file. As long as you retain this notice you 
  * can do whatever you want with this stuff. If we meet some day, and you think 
  * this stuff is worth it, you can buy me a beer in return. Jan "jaenster"
  * ---------------------------------------------------------------------------- 
 #ce 
 hotkeyset("!{f1}","set_on") 
 hotkeyset("!{f2}","set_off") 
 global $crosshair_on 
 set_off() 
 $x = @DesktopWidth/2 
 $y = @Desktopheight/2 
 While 1 
    pict($x,$y) 
    sleep(2) 
 WEnd 
 func set_on() 
    $crosshair_on = 1 
 endfunc 
 func set_off() 
    $crosshair_on = 0 
    while $crosshair_on = 0 
       sleep(100) 
    wend 
 endfunc 
 Func drawpix($dc,$x,$y,$color) 
    DllCall ("gdi32.dll", "long", "SetPixel", "long", $dc[0], "long", $x, "long", $y, "long", $color) 
 EndFunc 
 Func pict($x,$y) 
    $dc= DllCall ("user32.dll", "int", "GetDC", "hwnd", "") 
    drawpix($dc,$x-4+1,$y-4+1,0x000000FF) 
    drawpix($dc,$x-4+1,$y-4+2,0x000000FF) 
    drawpix($dc,$x-4+1,$y-4+6,0x000000FF) 
    drawpix($dc,$x-4+1,$y-4+7,0x000000FF) 
    drawpix($dc,$x-4+2,$y-4+1,0x000000FF) 
    drawpix($dc,$x-4+2,$y-4+7,0x000000FF) 
    drawpix($dc,$x-4+3,$y-4+3,0x000000FF) 
    drawpix($dc,$x-4+3,$y-4+5,0x000000FF) 
    drawpix($dc,$x-4+4,$y-4+4,0x00000000) 
    drawpix($dc,$x-4+5,$y-4+3,0x000000FF) 
    drawpix($dc,$x-4+5,$y-4+5,0x000000FF) 
    drawpix($dc,$x-4+6,$y-4+1,0x000000FF) 
    drawpix($dc,$x-4+6,$y-4+7,0x000000FF) 
    drawpix($dc,$x-4+7,$y-4+1,0x000000FF) 
    drawpix($dc,$x-4+7,$y-4+2,0x000000FF) 
    drawpix($dc,$x-4+7,$y-4+6,0x000000FF) 
    drawpix($dc,$x-4+7,$y-4+7,0x000000FF) 
    DllCall ("user32.dll", "int", "ReleaseDC", "hwnd", 0,  "int", $dc[0]) 
 EndFunc

The drawpixel function isn't writen by me. I forgot the person who made it.

But without the person who made drawpix, it would never works so smooth

Note on script: You start it with alt + f1

Edit:

For the people that have no idea what this program do:

Posted Image

It simply sets in the middle of your screen a dot, that help you to aim in games like counter strike

Edited by jaenster

-jaenster

Link to comment
Share on other sites

Script works beautifully

However it flickers and lags when any full-screen DirectX application is opened on top of it.

I'm pretty sure the only way to display something over DirectX (without flcker) is through hooking API.

I would LOVE for someone to write a script that does that :)

Edited by Paulie
Link to comment
Share on other sites

Thanks for your crosshair, works nice o:)

For autoitusers who don't like to change always crosshair parameters in the the script you will be able able to download fullcrosshair in this topic with a link...

well, yes but it is an old script, i only posted for you to show how i did it, so i dont really care about it :)

have fun with it :)

-jaenster

Link to comment
Share on other sites

Script works beautifully

However it flickers and lags when any full-screen DirectX application is opened on top of it.

I'm pretty sure the only way to display something over DirectX (without flcker) is through hooking API.

I would LOVE for someone to write a script that does that :)

http://www.gamedev.net/community/forums/to...topic_id=359319

http://www.gamedev.net/community/forums/to...topic_id=445141

worth a shot..

Just don't get yourself VAC banned. :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...