Sign in to follow this  
Followers 0
SteveO

Creating a Crosshair or Dot in the middle of the screen?

27 posts in this topic

Hello, I was just wondering if it's possible to create two intersecting lines (crosshair) or maybe just a big red dot in the middle of your screen...


Share this post


Link to post
Share on other sites



Yes


Giggity

Share this post


Link to post
Share on other sites
:P just joshin, I've never used it but I know there are draw commands, or you could make a png, or probably a bagillion other methods, all depends on what your trying to do.

Giggity

Share this post


Link to post
Share on other sites

Well I'm trying to set-up some crosshairs on COD4 for my buddy.


Share this post


Link to post
Share on other sites

you could create a transparent window with a gdiplus graphic in it :P

cheers


Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

You could also simply create a gif file with a crosshair and then load it in a transparent GUI:

Example:

#include <WindowsConstants.au3>

$x = @DesktopWidth/2 - 68/2
$y = @DesktopHeight/2 - 68/2

GUICreate("", 68, 68, $x, $y, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOOLWINDOW, $WS_EX_TOPMOST))
GUICtrlCreatePic("crosshair.gif",0,0,68,68)
GUISetState()

While 1
    Sleep(25)
WEnd

Regards

EDIT: added a gif file.

post-24573-1217277480_thumb.gif

Edited by newbiescripter

Share this post


Link to post
Share on other sites

Thanks guys. =)


Share this post


Link to post
Share on other sites

Call of Duty 4 has a crosshair unless you are playing Hardcore mode. You would have to suck pretty hard at this game to need this.

Hardcore mode = less bullets to kill someone.

Share this post


Link to post
Share on other sites

Call of Duty 4 has a crosshair unless you are playing Hardcore mode. You would have to suck pretty hard at this game to need this.

Hardcore mode = less bullets to kill someone.

Lol, tell that to Dethredic, I don't even play COD4. Lmao.


Share this post


Link to post
Share on other sites

Lol, tell that to Dethredic, I don't even play COD4. Lmao.

Dethredic, "You would have to suck pretty hard at this game to need this."

But seriously, this game is easy. The only difficult part of Hardcore is not knowing how much ammo you have or where your teammates are. Killing people is easier than normal mode AND there is little grenade spam.

Share this post


Link to post
Share on other sites

Clearly SteveO just sucks and needs help....

Stop blaming things on me haha.

but that aside, I could see the cross hairs helping in those quick reflex times.


"Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it

Share this post


Link to post
Share on other sites

The only time you would need a crosshair is when you are shooting from the hip, and the only time you should be shooting like that is when you are sprinting. Damage is reduced a lot when you aren't zoomed in.

Share this post


Link to post
Share on other sites

The only time you would need a crosshair is when you are shooting from the hip, and the only time you should be shooting like that is when you are sprinting. Damage is reduced a lot when you aren't zoomed in.

And in hardcore mode, you can still easily kill them, thus making the need to zoom in/scope not necessary more of the time. :P


"Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it

Share this post


Link to post
Share on other sites

Do what the rest of the lamers do, get out a felt-tip pen and put a dot in the middle of the screen. It has the benefits of doing what you ask and at the same time, you can't get banned for it.

Share this post


Link to post
Share on other sites

Yeah, but if you do that, you actually feel yourself becoming lamer. If you run the program, you can mask the (equally) lame feeling it creates by exclaiming, "OH GOSH! I SO SMART! I PROGRAM DOTZ!"

I've never played Call of Duty 4, but if you can't beat it without help from a program or pen, and you beat it with one, then you never truly beat it at all. Now you're just tacking cheater onto your underachiever record. :P

Share this post


Link to post
Share on other sites

You could also simply create a gif file with a crosshair and then load it in a transparent GUI:

Example:

#include <WindowsConstants.au3>

$x = @DesktopWidth/2 - 68/2
$y = @DesktopHeight/2 - 68/2

GUICreate("", 68, 68, $x, $y, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOOLWINDOW, $WS_EX_TOPMOST))
GUICtrlCreatePic("crosshair.gif",0,0,68,68)
GUISetState()

While 1
    Sleep(25)
WEnd

Regards

EDIT: added a gif file.

Err, i tried that in Soldier Front (SF) but it did not appear in game , why's that so ?

Share this post


Link to post
Share on other sites

Because like most FPS games, they have the "on top" attribute set as well and will display over the top of your gif. I believe the only truly effective method is to inject your "application" into memory. Don't ask me how, I've never done it, but there are several team chat programs that do it (they display stuff as an overlay on your game screen). Maybe finding out how they do it would help you in your dot quest :P

Share this post


Link to post
Share on other sites

Because like most FPS games, they have the "on top" attribute set as well and will display over the top of your gif. I believe the only truly effective method is to inject your "application" into memory. Don't ask me how, I've never done it, but there are several team chat programs that do it (they display stuff as an overlay on your game screen). Maybe finding out how they do it would help you in your dot quest :P

How do i do that ..

P.S. : If you dont know , im not trying to ask you , trying to ask some others..

Share this post


Link to post
Share on other sites

Memory writing would seem to be the common answer.


Share this post


Link to post
Share on other sites

time ago a made my own,

#include <WindowsConstants.au3>
#include <WinAPI.au3>
#Include <GDIPlus.au3>




mycross(500,400,20)



func mycross($start_x,$start_y,$mylenght)
    _GDIPlus_Startup ()
    $hDC = _WinAPI_GetWindowDC(0)

    $hGraphic = _GDIPlus_GraphicsCreateFromHDC($hDC)
    $Color = 0xFF000000
    $hPen = _GDIPlus_PenCreate($Color,2)


    For $y = 0 to 3000

            _GDIPlus_GraphicsDrawLine($hGraphic, $start_x - $mylenght, $start_y, $start_x - 5, $start_y, $hPen);orizzontale dx
            _GDIPlus_GraphicsDrawLine($hGraphic, $start_x  + $mylenght , $start_y, $start_x + 5, $start_y, $hPen);orizzontale sx
            _GDIPlus_GraphicsDrawLine($hGraphic, $start_x, $start_y - $mylenght, $start_x, $start_y - 5, $hPen);verticale up
            _GDIPlus_GraphicsDrawLine($hGraphic, $start_x, $start_y + $mylenght, $start_x, $start_y + 5, $hPen);verticale down
            $Color += Hex(2)
            _GDIPlus_PenSetColor($hPen, $Color)
    Next


    _WinAPI_RedrawWindow(_WinAPI_GetDesktopWindow(), 0, 0, $RDW_INVALIDATE+$RDW_ALLCHILDREN)
    _WinAPI_ReleaseDC(0, $hDC)
    _GDIPlus_Shutdown()

EndFunc

bye,

m.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0