.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > General Bot Coding
General Bot Coding See what a pain it is to get those little mechs shooting around

Reply
 
Thread Tools
Messaging system
Old
  (#1)
InternetNightmare
Guest
 
Status:
Posts: n/a
Default Messaging system - 13-02-2004

Well sending messige is something like taht:
Quote:
MESSAGE_BEGIN(MSG_ONE, Msg, NULL, pl->edict());
WRITE_BYTE(Byte);
WRITE_STRING(Textorsmth);
MESSAGE_END();
But were do I find message list for Health and... (I have VGUI message list) for MOD? Maybe I should ask creators? It's not a Half-Life (msgs are in SDK )
  
Reply With Quote
Re: Messaging system
Old
  (#2)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Messaging system - 13-02-2004

If you use metamod, you can use the GET_USER_MSG_ID (PLID, "Health", NULL); macro to get the message ID for Health messages.

If you don't use metamod, you have to keep track yourself of who's who, by hooking pfnRegUserMsg() and checking the return values. pfnRegUserMsg() is called by the MOD when the server boots up so that the MOD can register its network messages to the engine ; the engine replies back with a message ID that will be associated to that message name. By hooking this function you can build yourself a table where you'll look up which message ID corresponds to which message name, and vice versa.

BTW, learning everything that is to learn in the world is a really nice hobby. Keep it up



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: Messaging system
Old
  (#3)
InternetNightmare
Guest
 
Status:
Posts: n/a
Default Re: Messaging system - 13-02-2004

Thanks! I'm using MetaMOD! Well and current step of learning everything is HL SDK. I already know many things, especialy about PCs.
And if you know some good MetaMOD coding links, feel free to share...
  
Reply With Quote
Re: Messaging system
Old
  (#4)
InternetNightmare
Guest
 
Status:
Posts: n/a
Default Re: Messaging system - 13-02-2004

Oh about good is REAL... Thats a good joke
  
Reply With Quote
Re: Messaging system
Old
  (#5)
InternetNightmare
Guest
 
Status:
Posts: n/a
Default Re: Messaging system - 13-02-2004

Quote:
These are old metamod plugins for very old game called Half-Life and I have stopped wasting all of my time coding/supporting theim.
Is he stuipid or what!?
  
Reply With Quote
Re: Messaging system
Old
  (#6)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Messaging system - 13-02-2004

please stop spamming, though. Consider editing your posts to save space.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: Messaging system
Old
  (#7)
BAStumm
Member
 
BAStumm's Avatar
 
Status: Offline
Posts: 138
Join Date: Jan 2004
Location: Spokane, WA USA
Default Re: Messaging system - 18-02-2004

wouldn't it be simpler to check indexent->v.health if you want to know health rather than intercepting the messages? or pPlayer->v.health or whatever you prefer to call it....






  
Reply With Quote
Re: Messaging system
Old
  (#8)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Messaging system - 18-02-2004

he does not want to KNOW the health... he wants to SET it. Nuance



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: Messaging system
Old
  (#9)
botmeister
Ex-Council Member
 
botmeister's Avatar
 
Status: Offline
Posts: 1,090
Join Date: Nov 2003
Location: Canada
Default Re: Messaging system - 19-02-2004

To change the health of a player, just do this:

pPlayer->v.health = new_heath;

but you guys must already know this?


Maker of the (mEAn) Bot.Admin Manager

"In theory, there is no difference between theory and practice. But, in practice, there is." - Jan L.A. van de Snepscheut
  
Reply With Quote
Re: Messaging system
Old
  (#10)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Messaging system - 19-02-2004

tsk tsk tsk botmeister...

this is NOT sufficient

Read the beginning of the post

*edit* silly me, the explanation lies in another thread... hold on, lemme look it up
...ah, here it is: http://forums.bots-united.com/showthread.php?t=724



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."

Last edited by Pierre-Marie Baty; 19-02-2004 at 03:57.. Reason: added URL to other thread
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

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



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com