--
[ Picked text/plain from multipart/alternative ]
This is not the best way at approaching this...you don't want to make each
keyname just "User" when you make it...you should do it like this:
"Users"
{
   "STEAM_ID_LAN"
   {
       "stats"        "50"
   }
   "STEAM_ID_RAWR"
   {
       "stats"        "25"
   }
}

Here's how you would create the player stat:
bool BBStat::createNewPlayerStat(CBasePlayer *pPlayer)
{
   if(pPlayer!=NULL)//note to ben: rather than thinking root's keyname isn't
Users, you should think pPlayer may be null.
   {
      root->FindKey(pPlayer->GetNetworkIDString(),true)->SetInt("stats",25);
      //the true means it would create the key if it wasn't found,
      //therefore you wouldn't need to check if it was null :)
   }
}
--

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to