Raised This Month: $51 Target: $400
 12% 

includes drive me crazy lol


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Cr3V3TT3
Senior Member
Join Date: Jul 2004
Location: V'dauban
Old 02-03-2005 , 18:01   includes drive me crazy lol
Reply With Quote #1

hi,
how to get the includes i need for a command ?

Code:
UserMessageBegin((IRecipientFilter &)mrf, "HudMsg" );
	WRITE_BYTE ( 3 & 0xFF );
	WRITE_FLOAT( ss_hudmsg_x.GetFloat() );
	WRITE_FLOAT( ss_hudmsg_y.GetFloat() );
	WRITE_BYTE ( ss_hudmsg_red.GetInt() );
	WRITE_BYTE ( ss_hudmsg_green.GetInt() );
	WRITE_BYTE ( ss_hudmsg_blue.GetInt() );
	WRITE_BYTE ( ss_hudmsg_alpha.GetInt() );
	WRITE_BYTE ( ss_hudmsg_red.GetInt() );
	WRITE_BYTE ( ss_hudmsg_green.GetInt() );
	WRITE_BYTE ( ss_hudmsg_blue.GetInt() );
	WRITE_BYTE ( ss_hudmsg_alpha.GetInt() );
	WRITE_BYTE ( 0 );
	WRITE_FLOAT( 0.0 );
	WRITE_FLOAT( 0.0 );
	WRITE_FLOAT( ss_hudmsg_time.GetInt() );
	WRITE_FLOAT( 0 );
	WRITE_STRING( mess );
MessageEnd();
When compile that got the errors
Quote:
C:\mymods\SOundsSource\src\utils\Sounds_Sourc e\sounds_source.cpp(651) : error C2065: 'UserMessageBegin' : undeclared identifier
C:\mymods\SOundsSource\src\utils\Sounds_Sourc e\sounds_source.cpp(652) : error C2065: 'WRITE_BYTE' : undeclared identifier
C:\mymods\SOundsSource\src\utils\Sounds_Sourc e\sounds_source.cpp(653) : error C2065: 'WRITE_FLOAT' : undeclared identifier
C:\mymods\SOundsSource\src\utils\Sounds_Sourc e\sounds_source.cpp(66 : error C2065: 'WRITE_STRING' : undeclared identifier
C:\mymods\SOundsSource\src\utils\Sounds_Sourc e\sounds_source.cpp(669) : error C2065: 'MessageEnd' : undeclared identifier
That mean those commands are not registered i think

So try to include dlls\gameinterface.h
But get the errors :
Quote:
..\..\dlls\gameinterface.h(15) : error C2143: syntax error : missing ';' before '*'
..\..\dlls\gameinterface.h(15) : error C2501: 'g_pStringTableInfoPanel' : missing storage-class or type specifiers
..\..\dlls\gameinterface.h(102) : error C2143: syntax error : missing ';' before '*'
..\..\dlls\gameinterface.h(102) : error C2501: 'ClientPutInServerOverrideFn' : missing storage-class or type specifiers
..\..\dlls\gameinterface.h(104) : error C2146: syntax error : missing ')' before identifier 'fn'
..\..\dlls\gameinterface.h(104) : error C2182: 'ClientPutInServerOverride' : illegal use of type 'void'
..\..\dlls\gameinterface.h(104) : error C2440: 'initializing' : cannot convert from 'int *(__cdecl *)(struct edict_t *,const char *)' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
..\..\dlls\gameinterface.h(104) : error C2059: syntax error : ')'
C:\mymods\SOundsSource\src\utils\Sounds_Sourc e\sounds_source.cpp(651) : error C2065: 'UserMessageBegin' : undeclared identifier
C:\mymods\SOundsSource\src\utils\Sounds_Sourc e\sounds_source.cpp(652) : error C2065: 'WRITE_BYTE' : undeclared identifier
C:\mymods\SOundsSource\src\utils\Sounds_Sourc e\sounds_source.cpp(653) : error C2065: 'WRITE_FLOAT' : undeclared identifier
C:\mymods\SOundsSource\src\utils\Sounds_Sourc e\sounds_source.cpp(66 : error C2065: 'WRITE_STRING' : undeclared identifier
C:\mymods\SOundsSource\src\utils\Sounds_Sourc e\sounds_source.cpp(669) : error C2065: 'MessageEnd' : undeclared identifier
I think i miss one file but if i add a file i have more errors.....

Do you got any tutorials to help me plz?
Cr3V3TT3 is offline
Send a message via MSN to Cr3V3TT3
Fruchtzwerg
Member
Join Date: Dec 2004
Old 02-03-2005 , 21:53  
Reply With Quote #2

You have to add all needed header files.
__________________
Fruchtzwerg is offline
Cr3V3TT3
Senior Member
Join Date: Jul 2004
Location: V'dauban
Old 02-04-2005 , 15:37  
Reply With Quote #3

lol
how to know what are the
Quote:
needed header files
?
Cr3V3TT3 is offline
Send a message via MSN to Cr3V3TT3
Roger Devil
Senior Member
Join Date: Dec 2004
Location: Germany
Old 02-05-2005 , 04:00  
Reply With Quote #4

You hav to incldue the following files :
..\..\tier1\bitbuf.cpp
..\..\public\tier1\bitbuf.h


Code is :
bf_write* bfw=engine->UserMessageBegin( &mrf, 3 );
bfw->WriteByte( 1 );
bfw->WriteString( "Simple TextMsg\n");
bfw->WriteByte(1);
engine->MessageEnd();

The number for the messages is in file :
src\game_shared\hl2\hl2_usermessages.cpp

Please note, that HudMsg will not be displayed in Counterstrike-Source.
You can only print to the Chat-Area or HudText(...)
Hope this helps you

Roger Devil
Roger Devil is offline
Send a message via ICQ to Roger Devil
Cr3V3TT3
Senior Member
Join Date: Jul 2004
Location: V'dauban
Old 02-05-2005 , 05:38  
Reply With Quote #5

Thx
Cr3V3TT3 is offline
Send a message via MSN to Cr3V3TT3
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:59.


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