Raised This Month: $32 Target: $400
 8% 

StatusIcon Equivelant?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 03-20-2007 , 16:59   StatusIcon Equivelant?
Reply With Quote #1

Counter-Strike and Half-Life both use the message StatusIcon to call lines from sprites/hud.txt to display on the screen.

Day of Defeat also uses sprites/hud.txt but does not have a message called StatusIcon.

I have looked through other messages but none seem to have a string similar to StatusIcon's string write.

Is there any way I can call a line from sprites/hud.txt ? If I am able to do this, there will be unlimited possibilities...something I've been trying to do for months in DoD, and I've finally come across this lead.

So is there any way to either call hud.txt lines using a different method, or put that HL message back into the game? Is it possible from a module?
__________________

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 03-22-2007 , 04:06   Re: StatusIcon Equivelant?
Reply With Quote #2

ItemPickup - though actually a temporary icon, see the AMwiki for details.
VEN is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 03-22-2007 , 18:25   Re: StatusIcon Equivelant?
Reply With Quote #3

Thanks VEN, but that's actually not a DoD Message as far as I know. It's not on the list -- is there any way to still use it or substitute it?
__________________

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 03-23-2007 , 04:02   Re: StatusIcon Equivelant?
Reply With Quote #4

Quote:
have looked through other messages but none seem to have a string similar to StatusIcon's string write.
Quote:
Originally Posted by DoD Message
Note: Even though StatusIcon isn't registered as a message, it is possible to register this message (I lost the code to do this, but I have done it)
I think he meant RegUserMsg (see fakemeta_const.inc and hlsdk notes @ metamod site for details).
VEN is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 03-23-2007 , 17:16   Re: StatusIcon Equivelant?
Reply With Quote #5

ven, i can't believe i overlooked that line. been looking at that for months...if you are right, ven, i will give you a birthday cake. no joke.
__________________

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]
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 03-23-2007 , 18:36   Re: StatusIcon Equivelant?
Reply With Quote #6

All right I read the sdk notes and fakemeta_const, and so far what I have is

Code:
public plugin_precache() {     g_msgStatusIcon = engfunc( EngFunc_RegUserMsg, "StatusIcon", -1 ); }

But when I do a message_begin with g_msgStatusIcon as the message type, it outputs "Plugin called message_begin with an invalid message id", the same error I got before I added this line.

I've searched all over for someone actually using EngFunc_RegUserMsg, and I can't find an example of it in use. Has anyone ever used this, and if so how am I doing it incorrectly?
__________________

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]
stupok
Veteran Member
Join Date: Feb 2006
Old 03-24-2007 , 00:30   Re: StatusIcon Equivelant?
Reply With Quote #7

This is a shot in the dark since I haven't read anything on the topic, but try this after the message has been registered.

Code:
msgid = get_user_msgid("StatusIcon") message_begin(something, msgid, {0,0,0}, id)
stupok is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 03-24-2007 , 03:10   Re: StatusIcon Equivelant?
Reply With Quote #8

Good idea, but I did try that and it returns the same error message.

What is the proper way of RegUserMsg'ing?
__________________

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 03-24-2007 , 05:36   Re: StatusIcon Equivelant?
Reply With Quote #9

Perform three printouts:

get_user_msgid("StatusIcon") (before msg reg)
actual reg result
get_user_msgid("StatusIcon") (again)

What do you see?

Also try to register it not directly in plugin_precache, but
Code:
new g_fw_id   public plugin_precache() {         g_fw_id = register_forward(FM_RegUserMsg, "fwRegUserMsg", 1) }   public fwRegUserMsg(const name[], size) {         // HERE         unregister_forward(FM_RegUserMsg, g_fw_id, 1) }

And repeat printouts again.

Last edited by VEN; 03-24-2007 at 05:57.
VEN is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 03-24-2007 , 07:06   Re: StatusIcon Equivelant?
Reply With Quote #10

Thanks for your continuing help.

Before switching to the forward hook, it output 0 for PRE registry, 128 as the return value, and 0 for POST registry (Pre and Post using get_user_msgid)

I switched it to be done on the FM_RegUserMsg hook just like you said, and the same values are returned.

---------------------------------------------------

sawce suggested I set it as a local info so i don't re-register it. I tried the following, but the same error message is present:

Code:
// He said to use plugin_init not precache public plugin_init() {     g_msgStatusIcon = reg_statusicon();     new buff[100];     formatex( buff, sizeof(buff)-1, "%d", g_msgStatusIcon);     set_localinfo( "StatusIconValue", buff); } reg_statusicon() {     new buff[100];     get_localinfo( "StatusIconValue", buff, sizeof(buff)-1 );         if (buff[0]==0)     {         return engfunc( EngFunc_RegUserMsg, "StatusIcon", -1 );     }     else     {         return str_to_num(buff);     }     return 0; }

Like I said, same error message, but perhaps it's the right idea?
__________________

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]
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 01:11.


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