[Src]->playerinfo

Codes already submitted by people of the forums.
Post Reply
Acidx
Member
Posts: 198
Joined: Tue Mar 23, 2004 4:27 am

Post by Acidx »

As i promised i would be releasing alot of my original codes from this past ok this one is a little neat, its not an admin command and can be optional for some servers.. it was never used in anyserver ive coded for but i made it because i feel like there is a purpose for any code... So i hope someone finds it very usefull...


Use:
Player types /playerinfo Acidx
Server: Acidx is level 75 and a member of The Unadvised Guild
WARNING: this has no Admin level set to use it..
it was intended to be a normal player command for fun...


/*==== in Game.cpp====*/

Code: Select all

/*=========CheckPlayer Level & Guild====/playerinfo===*/
void CGame::PlayerCommand_CheckLevel(int iClientH, char* pData, DWORD dwMsgSize)
{/*An Acidx Production - Check Player Level and Guild Last updated July 04, 2005 - Acidx*/
 class  CStrTok * pStrTok;
short m_iRating;
char   * token, cName[11], cTargetName[11], cLevelMessage[256], cTemp[256], seps[] = "= \t\n", cBuff[256];
register int i;
if ((dwMsgSize) <= 0) return;
 ZeroMemory(cTargetName, sizeof(cTargetName));
 ZeroMemory(cBuff, sizeof(cBuff));
 memcpy(cBuff, pData, dwMsgSize);

 pStrTok = new class CStrTok(cBuff, seps);
 token = pStrTok->pGet();

 token = pStrTok->pGet();
 
 if (token != NULL) {
  ZeroMemory(cName, sizeof(cName));
  strcpy(cName, token);
 } 
 else {
  ZeroMemory(cName, sizeof(cName));
  strcpy(cName, "null");
 }

 token = pStrTok->pGet();
 
 if (token != NULL) {
  m_iRating = atoi(token);
 } 
 
 if (token == NULL) { 
  token = "null"; 
 }
 
  if (cName != NULL) {
  token = cName;

   if (strlen(token) > 10) 
      memcpy(cTargetName, token, 10);
   else memcpy(cTargetName, token, strlen(token));

   for (i = 1; i < DEF_MAXCLIENTS; i++) 
      if ((m_pClientList[i] != NULL) && (memcmp(m_pClientList[i]->m_cCharName, cTargetName, 10) == 0)) {
if (m_pClientList[i]->m_cGuildName == "NONE"){
     wsprintf(cLevelMessage, "The Player %s is Level %i and is Not a member of any guild", m_pClientList[i]->m_cCharName, m_pClientList[i]->m_iLevel);
}
else {
     wsprintf(cLevelMessage, "The Player %s is Level %i and is a member of %s.", m_pClientList[i]->m_cCharName, m_pClientList[i]->m_iLevel, m_pClientList[i]->m_cGuildName);
}
     ShowClientMsg(iClientH, cLevelMessage);

    }
  }
}
/*========In Game.H======*/

Code: Select all

/*====Add us some Defines here teehee <3 Acidx*/
void PlayerCommand_CheckLevel(int iClientH,char* pData, DWORD dwMsgSize);


/*in ChatMsgHandler(); add this*/

Code: Select all

    if (memcmp(cp, "/playerinfo ", 12) == 0) {
  PlayerCommand_CheckLevel(iClientH, cp, dwMsgSize -21);
  return;
 }

Enjoy.. and post any additions/changes you made and share with our great community <3

-Acidx
<b>-<span style='color:green'>ACiD-x </span><span style='color:red'> Owning PCs Since 1987</span><br><img src='http://img204.imageshack.us/img204/2245/hackertf5.gif' border='0' alt='user posted image' /><br><img src='http://img509.imageshack.us/img509/6697 ... 4sc4ed.png' border='0' alt='user posted image' /><br><span style='color:orange'>i am Pwn NetGAYLORDS !</span></b><br><span style='color:blue'><br>I Pwn HBUSA =)</span>
Hepha
Regular
Posts: 31
Joined: Wed Dec 14, 2005 10:57 pm

Post by Hepha »

g00d job acid.. nice code, thx.
<img src='http://img174.imageshack.us/img174/9513 ... ionrv6.png' border='0' alt='user posted image' />
Blizaga
Regular
Posts: 68
Joined: Sat Jul 08, 2006 7:39 pm

Post by Blizaga »

mmm :D :rolleyes: post any thing more importat or more interesting.
<a href='http://imageshack.us' target='_blank'><img src='http://img224.imageshack.us/img224/2738/screenqu8.jpg' border='0' alt='user posted image' /></a><br>drajwer draw<br><a href='index.php?showtopic=7299' target='_blank'>index.php?showtopic=7299</a>
Crossfade
Loyal fan
Posts: 354
Joined: Sun Mar 20, 2005 5:55 pm

Post by Crossfade »

Blizaga wrote: mmm :D :rolleyes: post any thing more importat or more interesting.
appreciate it bitch lol
juggalo2
Spamtastic
Posts: 1144
Joined: Sun Jul 17, 2005 5:28 pm

Post by juggalo2 »

Crossfade wrote:
Blizaga wrote: mmm :D  :rolleyes:  post any thing more importat or more interesting.
appreciate it bitch lol
i second that
<img src='http://lifeplaysu420.com/unknow/nightsign.png' border='0' alt='user posted image' /><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Wanna make money for surfing the net sing up at <br><a href='http://www.cashfiesta.com/php/join.php? ... yprivitera' target='_blank'>cash fiesta</a><br>its all free hey why ntot make money while fucking around on the computer<br><br><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
locobans
Outpost Junkie
Posts: 2264
Joined: Tue Jul 13, 2004 3:51 am
Location: Behind You
Contact:

Post by locobans »

Third?
QUOTE (ADDKiD @ Dec 1 2006, 4:01 PM) <br>You guys make me laugh alot, half the shit I say, is bullshit...<br><br><img src='http://img485.imageshack.us/img485/492/banssig1ng.gif' border='0' alt='user posted image' /><br><br><b>I see no changes at all, wake up in the morning and ask myself...<br>Is life worth living? Should I blast myself?</b><br><br><b><a href='http://2paclegacy.com' target='_blank'>2PacLegacy.com</a></b>
xmukox
Member
Posts: 175
Joined: Sun Sep 11, 2005 9:53 am

Post by xmukox »

woof nice ;X
ADDKiD
&lt;3 bd long time
Posts: 967
Joined: Tue Jul 12, 2005 8:07 pm
Location: Washington, USA
Contact:

Post by ADDKiD »

Your all gay? :P GJ Acid, btw, you should really give it to me 1st. That way I can answer all the noob questions for you... ^_^
Crossfade
Loyal fan
Posts: 354
Joined: Sun Mar 20, 2005 5:55 pm

Post by Crossfade »

ADDKiD wrote: Your all gay? :P GJ Acid, btw, you should really give it to me 1st. That way I can answer all the noob questions for you... ^_^
why you keep posting useless stuff acid, your a cool guy and all but your posts keep leading to one thing.. YOU. can't you figure out anything by yourself?
Acidx
Member
Posts: 198
Joined: Tue Mar 23, 2004 4:27 am

Post by Acidx »

Crossfade wrote:
ADDKiD wrote: Your all gay? :P GJ Acid, btw, you should really give it to me 1st. That way I can answer all the noob questions for you... ^_^
why you keep posting useless stuff acid, your a cool guy and all but your posts keep leading to one thing.. YOU. can't you figure out anything by yourself?
ummmm Excuse me? lol wow..
<b>-<span style='color:green'>ACiD-x </span><span style='color:red'> Owning PCs Since 1987</span><br><img src='http://img204.imageshack.us/img204/2245/hackertf5.gif' border='0' alt='user posted image' /><br><img src='http://img509.imageshack.us/img509/6697 ... 4sc4ed.png' border='0' alt='user posted image' /><br><span style='color:orange'>i am Pwn NetGAYLORDS !</span></b><br><span style='color:blue'><br>I Pwn HBUSA =)</span>
Drajwer
&lt;3 bd long time
Posts: 841
Joined: Fri Dec 10, 2004 3:24 pm

Post by Drajwer »

Acidx wrote: As i promised i would be releasing alot of my original codes from this past ok this one is a little neat, its not an admin command and can be optional for some servers.. it was never used in anyserver ive coded for but i made it because i feel like there is a purpose for any code... So i hope someone finds it very usefull...


Use:
Player types /playerinfo Acidx
Server: Acidx is level 75 and a member of The Unadvised Guild
WARNING: this has no Admin level set to use it..
it was intended to be a normal player command for fun...


/*==== in Game.cpp====*/

Code: Select all

/*=========CheckPlayer Level & Guild====/playerinfo===*/
void CGame::PlayerCommand_CheckLevel(int iClientH, char* pData, DWORD dwMsgSize)
{/*An Acidx Production - Check Player Level and Guild Last updated July 04, 2005 - Acidx*/
 class  CStrTok * pStrTok;
short m_iRating;
char   * token, cName[11], cTargetName[11], cLevelMessage[256], cTemp[256], seps[] = "= \t\n", cBuff[256];
register int i;
if ((dwMsgSize) <= 0) return;
 ZeroMemory(cTargetName, sizeof(cTargetName));
 ZeroMemory(cBuff, sizeof(cBuff));
 memcpy(cBuff, pData, dwMsgSize);

 pStrTok = new class CStrTok(cBuff, seps);
 token = pStrTok->pGet();

 token = pStrTok->pGet();
 
 if (token != NULL) {
  ZeroMemory(cName, sizeof(cName));
  strcpy(cName, token);
 } 
 else {
  ZeroMemory(cName, sizeof(cName));
  strcpy(cName, "null");
 }

 token = pStrTok->pGet();
 
 if (token != NULL) {
  m_iRating = atoi(token);
 } 
 
 if (token == NULL) { 
  token = "null"; 
 }
 
  if (cName != NULL) {
  token = cName;

   if (strlen(token) > 10) 
      memcpy(cTargetName, token, 10);
   else memcpy(cTargetName, token, strlen(token));

   for (i = 1; i < DEF_MAXCLIENTS; i++) 
      if ((m_pClientList[i] != NULL) && (memcmp(m_pClientList[i]->m_cCharName, cTargetName, 10) == 0)) {
if (m_pClientList[i]->m_cGuildName == "NONE"){
     wsprintf(cLevelMessage, "The Player %s is Level %i and is Not a member of any guild", m_pClientList[i]->m_cCharName, m_pClientList[i]->m_iLevel);
}
else {
     wsprintf(cLevelMessage, "The Player %s is Level %i and is a member of %s.", m_pClientList[i]->m_cCharName, m_pClientList[i]->m_iLevel, m_pClientList[i]->m_cGuildName);
}
     ShowClientMsg(iClientH, cLevelMessage);

    }
  }
}
/*========In Game.H======*/

Code: Select all

/*====Add us some Defines here teehee <3 Acidx*/
void PlayerCommand_CheckLevel(int iClientH,char* pData, DWORD dwMsgSize);


/*in ChatMsgHandler(); add this*/

Code: Select all

    if (memcmp(cp, "/playerinfo ", 12) == 0) {
  PlayerCommand_CheckLevel(iClientH, cp, dwMsgSize -21);
  return;
 }

Enjoy.. and post any additions/changes you made and share with our great community <3

-Acidx
i type /traveller /setinvi 1 /goto playername for guild
and checkip for log, pass, lvl, ip

really, useless
<img src='http://img440.imageshack.us/img440/2627/15pt.jpg' border='0' alt='user posted image' /><br><br>HBPolska characters:<br><br>Hellios 150+ Aresden Hero Mage<br>TheBill 120 Aresden plrider<br>Kill_Me 100 Full-Hero plrider<br>Rockeater 110+ Aresden Plate Mage<br><br><a href='http://www.helbreath.org' target='_blank'>http://www.helbreath.org</a> come and play (250 ppl online)
Post Reply