.:: 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 ::. > Cyborg Factory > POD-Bot mm > Common Questions
Common Questions Are you seeking help ? Get it here !

Reply
 
Thread Tools
Money in CS
Old
  (#1)
VenoM UT
Member
 
VenoM UT's Avatar
 
Status: Offline
Posts: 7
Join Date: Aug 2006
Question Money in CS - 01-10-2006

Hi, does anyone know which variable in edict holds the money in CS? Is it in v somewhere? I tried v.impulse but couldn't find it...


[SIGPIC][/SIGPIC]
Less Talk More Shoot
  
Reply With Quote
Re: Money in CS
Old
  (#2)
KWo
Developer of PODBot mm
 
KWo's Avatar
 
Status: Offline
Posts: 3,425
Join Date: Apr 2004
Default Re: Money in CS - 01-10-2006

I don't think it's edict_t keeping money. We are using catching HL messages to get info about the money...

PHP Code:
void pfnMessageBegin (int msg_destint msg_type, const float *pOriginedict_t *ed)
{
   
// Called each Time a Message is about to sent

   
int index;
   
int tab_index;

   
botMsgFunction NULL// no msg function until known otherwise
   
state 0;

   
// Bot involved ?
   
if (!FNullEnt (ed))
   {
      
index ENTINDEX (ed) - 1;

      
// is this message for a bot?
      
if ((index >= 0) && (index gpGlobals->maxClients) && (bots[index].pEdict == ed))
      {
         
botMsgIndex index// index of bot receiving message

         // Message handling is done in bot_client.cpp
         
if (msg_type == GET_USER_MSG_ID (PLID"AmmoPickup"NULL))
            
botMsgFunction BotClient_CS_AmmoPickup;
(...) 
         else if (
msg_type == GET_USER_MSG_ID (PLID"Money"NULL))
            
botMsgFunction BotClient_CS_Money;
(...)
}

void BotClient_CS_Money (void *pint bot_index)
{
   
// This message gets sent when the bots money ammount changes

   
if (state == 0)
      
bots[bot_index].bot_money = *(int *) p;  // amount of money

AMX X hacks private data to set money for the player:
PHP Code:
    // Give money
    
*((int *)pPlayer->pvPrivateData OFFSET_CSMONEY) = params[2]; 
  
Reply With Quote
Re: Money in CS
Old
  (#3)
VenoM UT
Member
 
VenoM UT's Avatar
 
Status: Offline
Posts: 7
Join Date: Aug 2006
Default Re: Money in CS - 02-10-2006

well, that explains why I didn't understand a thing when I looked at the raw code. Dissappointing isn't it? That you can't alter the money the same way as you can alter health or armor... Btw, I was kinda trying a practice mode style gameplay in the bot, so that's why I was asking this.. I found the health variable, and now I can practice in "near" god mode w/o having to wait until next round, going into a den of terrorists alone in rambo style


[SIGPIC][/SIGPIC]
Less Talk More Shoot
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 2 (0 members and 2 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 - 2025, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com