Results 1 to 9 of 9
  1. #1
    J's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    East Coast
    Posts
    2,164
    Reputation
    452
    Thanks
    5,900
    My Mood
    In Love

    People. I have lost faith in you.

    Why doesn't ANYONE know how to offset the crosshair for combat arms!? It's been like 4 years now and all of the crosshairs on ALL of the hacks that I've seen are always off. Come on people:

    Code:
    crosshairX = (screenW / 2) - 1
    crosshairY = (screenY / 2) - 1
    DRAW YOUR DAMN CROSSHAIR AT THIS POINT!

    Thank you, that is all.

  2. The Following 3 Users Say Thank You to J For This Useful Post:

    arun823 (10-23-2013),[MPGH]Flengo (10-22-2013),xCyberxx (12-24-2013)

  3. #2
    Ch40zz-C0d3r's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    831
    Reputation
    44
    Thanks
    401
    My Mood
    Twisted
    o.0
    1 is right if your line has got a size of 2, just simple math but I believe these people arround here cant even code a simple crosshair function on their own :|
    Very sad....

    Progress with my game - "Disbanded"
    • Fixed FPS lag on spawning entities due to the ent_preload buffer!
    • Edit the AI code to get some better pathfinding
    • Fixed the view bug within the sniper scope view. The mirror entity is invisible now!
    • Added a new silencer for ALL weapons. Also fixed the rotation bugs
    • Added a ton of new weapons and the choice to choose a silencer for every weapon
    • Created a simple AntiCheat, noobs will cry like hell xD
    • The name will be Disbanded, the alpha starts on the 18th august 2014



    Some new physics fun (Serversided, works on every client)



    My new AI
    https://www.youtube.com/watch?v=EMSB1GbBVl8

    And for sure my 8 months old gameplay with 2 friends
    https://www.youtube.com/watch?v=Na2kUdu4d_k

  4. #3
    J's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    East Coast
    Posts
    2,164
    Reputation
    452
    Thanks
    5,900
    My Mood
    In Love
    I don't think you know what you're saying. /fp

    Everyone's crosshair is being drawn EXACTLY in the middle of the screen. Yes, that should be sufficient because your supposed to aim EXACTLY in the middle of your screen. But Combat Arms decided to draw their crosshair 1 pixel to the left of the center, and 1 pixel above the center. /fml

  5. #4
    Ch40zz-C0d3r's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    831
    Reputation
    44
    Thanks
    401
    My Mood
    Twisted
    Your line has got a width so you have to halve it and substract it from the position where you draw it.
    I cant rememeber that my crosshair was off when I drawed it like that..
    Dont tell me I dont know shit :|

    Progress with my game - "Disbanded"
    • Fixed FPS lag on spawning entities due to the ent_preload buffer!
    • Edit the AI code to get some better pathfinding
    • Fixed the view bug within the sniper scope view. The mirror entity is invisible now!
    • Added a new silencer for ALL weapons. Also fixed the rotation bugs
    • Added a ton of new weapons and the choice to choose a silencer for every weapon
    • Created a simple AntiCheat, noobs will cry like hell xD
    • The name will be Disbanded, the alpha starts on the 18th august 2014



    Some new physics fun (Serversided, works on every client)



    My new AI
    https://www.youtube.com/watch?v=EMSB1GbBVl8

    And for sure my 8 months old gameplay with 2 friends
    https://www.youtube.com/watch?v=Na2kUdu4d_k

  6. #5
    ieatyourlvllol's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    50
    Reputation
    77
    Thanks
    339
    My Mood
    Lurking
    yeah i seen a post about this before, and wont the snipers crosshair still be off anyway?? im not sure but id rather keep it dead center.

    i did make one myself....took me 10 years to make a damn box >_< lmao

    Code:
    void Crosshair(LPDIRECT3DDEVICE9 pDevice)
    {
    	if (!OneTime)
    	{
    		X = GetSystemMetrics(SM_CXSCREEN) /2;
    		Y = GetSystemMetrics(SM_CYSCREEN) /2;
    		OneTime = !false;
    	}
    	pDevice->SetRenderState(D3DRS_ZENABLE,D3DZB_FALSE);
    
    	FILLRGB(X   , Y-13,   1, +14, Red, pDevice);  //top line
    	FILLRGB(X-13, Y   , +14,   1, Red, pDevice);  //Left line
    	FILLRGB(X +1, Y   , +14,   1, Red, pDevice);  //Right line
    	FILLRGB(X   , Y +1,   1, +14, Red, pDevice);  //Bottom line
    	
    	FILLRGB(X-20, Y-20, +41,   1, Blue, pDevice);  //Top Box Line
    	FILLRGB(X-20, Y-20,   1, +41, Blue, pDevice);  //Left Side Box Line
    	FILLRGB(X+21, Y-20,   1, +41, Blue, pDevice);  //Right Side Box Line
    	FILLRGB(X-20, Y+21, +42,   1, Blue, pDevice);  //Bottom Box Line
    
    	pDevice->SetRenderState(D3DRS_ZENABLE,D3DZB_TRUE);
    }





  7. The Following User Says Thank You to ieatyourlvllol For This Useful Post:

    [MPGH]AVGN (10-22-2013)

  8. #6
    J's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    East Coast
    Posts
    2,164
    Reputation
    452
    Thanks
    5,900
    My Mood
    In Love
    Normally crosshair's are 1 pixels in width. Come on now >_>

  9. #7
    Flengo's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    /admincp/banning.php
    Posts
    20,591
    Reputation
    5180
    Thanks
    14,178
    My Mood
    Inspired
    I have error things undefined how I do
    I Read All Of My PM's & VM's
    If you need help with anything, just let me know.

     


     
    VM | PM | IM
    Staff Administrator Since 10.13.2019
    Publicist Since 04.04.2015
    Middleman Since 04.14.2014
    Global Moderator Since 08.01.2013
    Premium Since 05.29.2013

    Minion+ Since 04.18.2013

    Combat Arms Minion Since 12.26.2012
    Contributor Since 11.16.2012
    Member Since 05.11.2010


  10. #8
    B4NDiT26's Avatar
    Join Date
    Apr 2012
    Gender
    male
    Posts
    1,010
    Reputation
    26
    Thanks
    32
    My Mood
    Shocked
    I don't think that 1 pixel make difference in aiming.

  11. #9
    arun823's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Los Angeles, California
    Posts
    523
    Reputation
    151
    Thanks
    1,899
    My Mood
    Amused
    Quote Originally Posted by J View Post
    I don't think you know what you're saying. /fp

    Everyone's crosshair is being drawn EXACTLY in the middle of the screen. Yes, that should be sufficient because your supposed to aim EXACTLY in the middle of your screen. But Combat Arms decided to draw their crosshair 1 pixel to the left of the center, and 1 pixel above the center. /fml
    Due to the fact these individuals fail to use ViewPort function or any intelligent function to receive screen size and draw according to the resolution.

    Code:
    D3DVIEWPORT9 Viewport;
    
    DWORD ScreenX = (Viewport.Width / 2) - 1;
    DWORD ScreenY = (Viewport.Height / 2) - 1;
    Should draw perfectly on any resolution now
    Last edited by arun823; 10-23-2013 at 07:59 PM.
    Reversing is the only way to move forward.

  12. The Following User Says Thank You to arun823 For This Useful Post:

    J (10-23-2013)

Similar Threads

  1. [Solved] You have lost connection to the server. Try again in a moment.
    By nate1999 in forum Combat Arms Help
    Replies: 3
    Last Post: 07-04-2013, 05:14 PM
  2. You have lost connection with the server...
    By TweaKx in forum Combat Arms Help
    Replies: 19
    Last Post: 11-14-2010, 11:09 AM
  3. Replies: 18
    Last Post: 04-23-2009, 09:56 PM
  4. You Have Lost Connection [Error: -1]
    By Raggii in forum Combat Arms Hacks & Cheats
    Replies: 6
    Last Post: 08-16-2008, 09:54 AM
  5. i have come to kill you
    By ikki in forum General
    Replies: 28
    Last Post: 10-08-2007, 09:07 PM