Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin
8 posts, 3 people · 886 views Thread Rating: ★★★★★
closedxhair
Started by Dr.G on 03-09-2009, 07:04 PM
Dr.G
started this thread
Posts: 776
Threads: 75
Joined: Nov 2007
03-09-2009, 07:04 PM #1

how is crosshairs shown/blocked? i cant find the message

Vet
posted here
Posts: 229
Threads: 24
Joined: Oct 2006
03-10-2009, 02:07 AM #2

Unfortunately, DOD doesn't have the 'Crosshair' message like CS does. I think all crosshair functions are handled client-side in DOD.

Dr.G
started this thread
Posts: 776
Threads: 75
Joined: Nov 2007
03-10-2009, 12:17 PM #3

Ok well that was kinda my conclution aswell, by wanted to be sure that didnt fuck up the msgs logging i did. But since its a sprite thats shown, cant we somehow "fake" it while needed you think?

ghzero
posted here
Posts: 160
Threads: 42
Joined: Sep 2007
03-10-2009, 02:51 PM #4

if the client(player) has custom-xhair installed it's possible to send client_cmd to player to toggle between crosshair on and crosshair off by choose the ffset of the transparent crosshair of the customxhair-(collection)file.

Vet
posted here
Posts: 229
Threads: 24
Joined: Oct 2006
03-12-2009, 10:25 AM #5

IDK about blocking them, but for creating them I've got a plugin I'm touching-up, in preparation for release, that creates a crosshair by displaying a HUD message of a single character (either +, X or O) smack-ass in the middle of the screen. Kinda crude, but it works. I'm testing it now on our server. While playing, 'say /help' for more info on the plugin options.

Dr.G
started this thread
Posts: 776
Threads: 75
Joined: Nov 2007
03-12-2009, 11:12 AM #6

just took a look at it on your server, that method seems ok. what i want is to make sniper rifles like in COD4-MW where you hold your breath while using the scope, and hereby is only able to use the scope in like 20-30 sec, but have a crosshair when its not scoped...rnrnhow did you make that hudmsg? like this?:rnrnrn

rnregister_message(get_user_msgid("TextMsg"), "Message_TextMsg")rnrnmessage_begin(MSG_ONE, get_user_msgid("SayText"),origin[3]={0,0,0}, id)rnwrite_byte(id)rnwrite_string(msg)rnmessage_end()
Vet
posted here
Posts: 229
Threads: 24
Joined: Oct 2006
03-12-2009, 07:37 PM #7

Just a simple set_hudmessage/show_hudmessage combo.rn rn

rnset_hudmessage(g_xcolor[clr][0], g_xcolor[clr][1], g_xcolor[clr][2], -1.0, -1.0, 0, 1.0, 0.7)rnshow_hudmessage(id, "%s", g_xhair[g_pinfo[id][STYLE]])rn-rn
Dr.G
started this thread
Posts: 776
Threads: 75
Joined: Nov 2007
03-12-2009, 07:49 PM #8

lol ok i thought alot of them would give a overflood or not be reliable when used like that ...

DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC