
[REQ] "Notes" Code
Dominican Republic

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>
-
- noob
- Posts: 27
- Joined: Sun Aug 27, 2006 4:50 am
-
- noob
- Posts: 11
- Joined: Thu Aug 17, 2006 5:34 am
Since power it he can, is not very difficult, I it am working, for the present I cannot postear anything as that it he has muchisimos mistakes, but you upset it he finishes it I spend pass it to you 
Cya!

Cya!
<b><i>ZeroEoyPnk</i></b><br><img src='http://ar.geocities.com/eoy_zero/mas_para_mi.jpg' border='0' alt='user posted image' />
Translation:zeroeoypnk wrote: Since power it he can, is not very difficult, I it am working, for the present I cannot postear anything as that it he has muchisimos mistakes, but you upset it he finishes it I spend pass it to you
Cya!
Since power it he can, is not very difficult
Since a rat can eat a power cord, it must not be very difficult.
I it am working
I am working on eating 1 right now
for the present I cannot postear anything as that it he has muchisimos mistakes
without a christmas present i can't post anything without many mistakes.
but you upset it he finishes it I spend pass it to you

If my rat is not upset, he can eat 4 whole power cords in 1 day

Well thats what googles Retard->English translation spat out.. I hope it helps more then his original post did.
Reppin' 127.0.0.1!!!<br><br><img src='http://img502.imageshack.us/img502/1348/sig4daxbn2.jpg' border='0' alt='user posted image' /><br><br>I contend that we are both atheists. I just believe in one fewer god than you do. <br>When you understand why you dismiss all the other possible gods, you will <br>understand why I dismiss yours.<br>~ <b>Stephen Roberts</b>
I'd have made it GUI but with no interface.. can't do it
so here is a command version.
Notes command (NOTE this is untested and may/may not work.)
Client.h into the class
Client.cpp into the initialization.
Game.h into the class
Game.cpp all over the place
ChatMsgHandler
Anywhere
_bDecodePlayerDatafileContents
at the head
_iComposePlayerDatafileContents

Notes command (NOTE this is untested and may/may not work.)
Client.h into the class
Code: Select all
struct {
char m_cNotes[90];
} m_stNotesList[20];
Code: Select all
for (i = 0; i < 20; i++)
ZeroMemory(m_stNotesList[i].m_cNotes, 90);
Game.h into the class
Code: Select all
void ViewNotes(int iClientH);
void AddNote(int iClientH, char * pData, DWORD dwMsgSize);
void DeleteNote(int iClientH, char * pData, DWORD dwMsgSize);
ChatMsgHandler
Code: Select all
if (memcmp(cp, "/notes", 6) == 0) {
ViewNotes(iClientH);
return;
}
if (memcmp(cp, "/addnote", 8) == 0) {
AddNote(iClientH, cp, dwMsgSize - 21);
return;
}
if (memcmp(cp, "/delnote", 8) == 0) {
DeleteNote(iClientH, cp, dwMsgSize - 21);
return;
}
Code: Select all
void CGame::ViewNotes(int iClientH)
{
char seps[] = "= \t\n";
char * cp, * token, cBuff[256];
register int i;
if (m_pClientList[iClientH] == NULL) return;
ZeroMemory(cBuff, sizeof(cBuff));
for (i = 0; i < 20; i++)
{
if (strlen(m_pClientList[iClientH]->m_stNotesList[i].m_cNotes) > 0)
{
wsprintf(cBuff, "Note%d: %s", i, m_pClientList[iClientH]->m_stNotesList[i].m_cNotes);
ShowClientMsg(iClientH, cBuff);
}
}
}
void CGame::AddNote(int iClientH, char *pData, DWORD dwMsgSize)
{
char seps[] = "= \t\n";
char * cp, * token, cBuff[256];
class CStrTok * pStrTok;
register int i;
if (m_pClientList[iClientH] == NULL) return;
if ((dwMsgSize) <= 0) return;
ZeroMemory(cBuff, sizeof(cBuff));
memcpy(cBuff, pData, dwMsgSize);
pStrTok = new class CStrTok(cBuff, seps);
token = pStrTok->pGet();
token = pStrTok->pGet();
if (token != NULL)
{
for (i = 0; i < 20; i++)
{
if (strlen(m_pClientList[iClientH]->m_stNotesList[i].m_cNotes) == 0)
{
memcpy(m_pClientList[iClientH]->m_stNotesList[i].m_cNotes, token, strlen(token));
wsprintf(cBuff, "Note %d added.", i);
ShowClientMsg(iClientH, cBuff);
delete pStrTok;
return;
}
}
ShowClientMsg(iClientH, "Too many notes added.");
delete pStrTok;
return;
}
delete pStrTok;
}
void CGame::DeleteNote(int iClientH, char *pData, DWORD dwMsgSize)
{
char seps[] = "= \t\n";
char * cp, * token, cBuff[256];
class CStrTok * pStrTok;
register int i;
if (m_pClientList[iClientH] == NULL) return;
if ((dwMsgSize) <= 0) return;
ZeroMemory(cBuff, sizeof(cBuff));
memcpy(cBuff, pData, dwMsgSize);
pStrTok = new class CStrTok(cBuff, seps);
token = pStrTok->pGet();
token = pStrTok->pGet();
if (token != NULL)
{
i = atoi(token);
if (i > 20)
{
ShowClientMsg(iClientH, "Value too high!");
delete pStrTok;
return;
}
if (strlen(m_pClientList[iClientH]->m_stNotesList[i].m_cNotes) != 0)
{
ZeroMemory(m_pClientList[iClientH]->m_stNotesList[i].m_cNotes, 90);
wsprintf(cBuff, "Note %d deleted.", i);
ShowClientMsg(iClientH, cBuff);
break;
}
}
delete pStrTok;
}
_bDecodePlayerDatafileContents
at the head
Code: Select all
int iNotesIndex = 0;
Code: Select all
case 84:
//Notes list
if (iNotesIndex > 50) {
wsprintf(cTxt, "(!!!) Player(%s) data file error! Too many notes - Connection closed. ", m_pClientList[iClientH]->m_cCharName);
PutLogList(cTxt);
delete pContents;
delete pStrTok;
return FALSE;
}
memcpy(m_pClientList[iClientH]->m_stNotesList[iNotesIndex].m_cNotes, token, strlen(token));
iNotesIndex++;
cReadModeA = 0;
break;
Code: Select all
if (memcmp(token, "character-notes", 15) == 0) cReadModeA = 84;//Notes
Code: Select all
strcat(pData, "[NOTES]\n\n");
for (i = 0; i < 20; i++)
{
if (m_pClientList[iClientH]->m_stNotesList[i].m_cNotes[0] != NULL)
{
strcat(pData, "character-notes = ");
strcat(pData, m_pClientList[iClientH]->m_stNotesList[i].m_cNotes);
strcat(pData, "\n");
}
}
strcat(pData, "\n\n");
<img src='http://www.helbreathx.net/sig/sig.jpeg' border='0' alt='user posted image' /><br><a href='http://mafia.cheats4us.org/index.php?x=231030' target='_blank'>#1 on Mafia
</a><br><!--QuoteBegin-Slipknight+--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Slipknight)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->100mb Internet, burstable too 10GB oc192<br>his speed can go up too 10gbs<br>...<br>Yes my car can have a top speed of 1000mph<!--QuoteEnd--></td></tr></table><div class='signature'><!--QuoteEEnd--><br>^^ I wonder where the retard went to.

-
- Loyal fan
- Posts: 391
- Joined: Sat Mar 26, 2005 12:41 am
tell someone makes the code why not just comunicate threw Player info change your player info heh.
<img src='http://freewebs.com/trickro/70s.png' border='0' alt='user posted image' /><img src='http://freewebs.com/trickro/70s2.jpg' border='0' alt='user posted image' />
nice zero keep it up
<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>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Well aside from the fact that someone already posted it, I'm not going to see if it works. I don't think people should be sharing accounts, thats where some of their problems come from.
ADDKiD, your still a fuckwit, don't try and flame a kid when you are near incompetent yourself, you couldn't code your way out of a paper bag. Stick with designing and not talking to people about something you didn't think up. That reply button doesn't need to be hit all the time.
And I didn't know Google had a retard translator, I've been reading those guys wrong the whole time.
bone-you, gj on actually putting in some work hope it works great for those that need something like that.
ADDKiD, your still a fuckwit, don't try and flame a kid when you are near incompetent yourself, you couldn't code your way out of a paper bag. Stick with designing and not talking to people about something you didn't think up. That reply button doesn't need to be hit all the time.
And I didn't know Google had a retard translator, I've been reading those guys wrong the whole time.
bone-you, gj on actually putting in some work hope it works great for those that need something like that.
-><-