Raised This Month: $ Target: $400
 0% 

Remove the Crosshair


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 09-29-2006 , 17:56   Remove the Crosshair
Reply With Quote #1

I have coded a modification for Day of Defeat that gives players Ironsights on their weapons. The only thing preventing me from releasing it is because it requires a client-side package. This package includes customxhair.spr which has one of the crosshairs as "blank" or transparent completely.

This is the only way I know of to remove the crosshair from Day of Defeat.


Does anyone know another way? Any kind of hint, clue, trail...I'll do all the work but does anyone know a possibility?

The message HideWeapon works, but it also disables all recoil.
The message Crosshair does nothing in Day of Defeat.
hud_draw 0 works, but after you jump you cannot shoot again.

There's gotta be something I'm missing. Even if I display a sprite on the users hud to go over their crosshair - does anyone know a way?
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
DiscoBBQ
Veteran Member
Join Date: Jan 2005
Location: Clemson, South Carolina
Old 09-29-2006 , 23:49   Re: Remove the Crosshair
Reply With Quote #2

Execute the "Crosshair 0" on the player; Likewise when they disconnect or map change make sure to have them turned back to "Crosshair 1".
DiscoBBQ is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 09-30-2006 , 00:23   Re: Remove the Crosshair
Reply With Quote #3

That might work in CS, but it does nothing in dod.
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
VEN
Veteran Member
Join Date: Jan 2005
Old 09-30-2006 , 02:50   Re: Remove the Crosshair
Reply With Quote #4

Did you tryed bits from (1<<0) to (1<<7) for HideWeapon? Most of the bits should be mod-specific, i.e. different that CS, so you have to check it yourself for DoD. Also there may be a specail message like HideCrosshair or something else. Type "meta game" in the server console and try to search for the appropriate message name.
VEN is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 09-30-2006 , 08:40   Re: Remove the Crosshair
Reply With Quote #5

Actually when I put simple integers, 1 through 17, they all did something in HideWeapon. But when I did 1<<# any number only #1 did something I believe.

I've actually looked through every Dod message and none seem to be it. I've even tried logging the ones I don't know and they are things other than crosshair. There has to be something though.
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
VEN
Veteran Member
Join Date: Jan 2005
Old 10-01-2006 , 04:03   Re: Remove the Crosshair
Reply With Quote #6

Note: you shouldn't pass an integers but a bits. So lets say there are 8 possible HUD elements that can be hidden. If you would test it with integers you'll have to check 255 integers while only 8 bits is needs to be checked. And, btw, i recommend you to pass 255 i.e. 1<<8 - 1, i.e. 1<<0|1<<1|...|1<<7 - this will allow you to check whether HideWeapon allows to hide the crosshair at all or not. Also a note, that 1<<2 bit could be a "hide all" so in this case you might want to exlude it as non-practical solution. I. e. (1<<8 - 1) & ~(1<<2) or 251

Edit:
Quote:
The message HideWeapon works, but it also disables all recoil.
Which value?

Last edited by VEN; 10-01-2006 at 04:06.
VEN is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 10-04-2006 , 00:12   Re: Remove the Crosshair
Reply With Quote #7

Thanks for helping VEN. This is what i've got.

1<<0 - disable ammo, disable xhair, disable slot1 slot2 slot3 etc (does not disable objectives)
1<<1 - back to normal
1<<2 - disable entire hud even say text
1<<3 - back to normal
everything above - back to normal

Does anyone know how to display a sprite on the HUD? Over where the xhair would be? The same way a sniper scope is displayed?

This would solve so many problems. Even cure some diseases.
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
kyo
New Member
Join Date: Mar 2007
Old 04-07-2007 , 17:00   Re: Remove the Crosshair
Reply With Quote #8

im not too good with all this server stuff but i have an idea how to get ride of the corsshairs.first youd fource a download (i have kno ideda how) of this sprite i have.then lock the cl_xhair_style at 1 and the cross hairs should be gone but like i said i dont kno if you can fource a download
kyo is offline
kyo
New Member
Join Date: Mar 2007
Old 04-07-2007 , 17:08   Re: Remove the Crosshair
Reply With Quote #9

http://files.filefront.com/no_crossh.../fileinfo.html

thats the file tht turns off the cosshair
kyo is offline
zenix
Member
Join Date: Mar 2007
Old 04-07-2007 , 20:47   Re: Remove the Crosshair
Reply With Quote #10

kyo - To force a download, you could attempt to precache it, Steam would notice not on the client and download it before the user even enters the game. It is an idea that could be used succesfully.

Wilson - if the file isn't too big (1-10kb) downloading shouldn't be much of a problem for you users at all. Another question though, why do you even want the crosshairs gone at all?!?
__________________
My Current Plugins:
Weapon Icon Display
zenix is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:54.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode