and... whats the question?Warlord wrote: Btw maybe someone could help me. I have studied only C programming language, but c++ is much different than c.
mkay - lets go to the point.
Can anyone help me a little bit..
I think that this code is just fucked up, and my brain doesn't take it anymore..So I ask help...
I already solved my problemCode: Select all
void CGame::LoadFriendList() //some polish friends helped me. { char buf[1024]; int konieclinii; unsigned long linie=0; FILE* f=fopen("contents\\FriendList.txt","rt"); m_iTotalFriends=0; while(fgets(buf,1024,f)){ konieclinii=0; int i=strlen(buf); if(i>0 && buf[--i]=='\n'){ buf[i]=0; // kasujemy znak konca linii konieclinii=1; linie++; } if (linie-1<13) { strcpy(m_cFriends[linie-1],buf); m_iTotalFriends++; } } if (m_iTotalFriends>12) m_iTotalFriends=12; fclose(f);
[Src]->Friends List.
<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)
-
- Loyal fan
- Posts: 391
- Joined: Sat Mar 26, 2005 12:41 am
ok, i had the same problem with the no show buttons, but what i did was remove the
int he DrawDialogBox_FriendList function
also make sure you remove a ending } before break;, but it seamed to work for me ..
but sadly there is a ting you forgot to add int he code, u know u dont even call for the "LoadFriendList()" function.... so basicly in your code the friends list isnt loading...
but i added that too under the ctrl+f area
......sadely client crashes when it loads too ...(*nvm i guess it worked i just tryed it lol)
(WOOHOO!, lol nvm its all working saves my char name too )
oh and a good idea for the friends list is saveing the list by char name, i have it setup for that, becouse alot people use more then one account / character / more one person play the computer.
... i also dont think its a good idea to add there friends list ont he server side, becouse thats just more messages, and more bandwidth, its best to keep stuff like this on client side.
also i made it save on log off to.
i think thats why it was crashing , it didnt save lol. becouse m_cPlayerName isnt identifyed when your closeing the game lol...
you can juse search
then add this after PlaySound('E', 14, 5); witch is a few lines down.
works for me now ...
good idea Drajwer ... i may try to also add a thing were u can typ there name in..
instead of happen to click them.
Code: Select all
if (m_iFriendIndex != -1) {
also make sure you remove a ending } before break;, but it seamed to work for me ..
but sadly there is a ting you forgot to add int he code, u know u dont even call for the "LoadFriendList()" function.... so basicly in your code the friends list isnt loading...
but i added that too under the ctrl+f area
Code: Select all
case 70: //'F'
if (m_bCtrlPressed == TRUE && m_cGameMode == DEF_GAMEMODE_ONMAINGAME && (!m_bInputStatus) )
LoadFriendList();
EnableDialogBox(43, NULL, NULL, NULL);
break;
(WOOHOO!, lol nvm its all working saves my char name too )
oh and a good idea for the friends list is saveing the list by char name, i have it setup for that, becouse alot people use more then one account / character / more one person play the computer.
... i also dont think its a good idea to add there friends list ont he server side, becouse thats just more messages, and more bandwidth, its best to keep stuff like this on client side.
Code: Select all
void CGame::LoadFriendList() //some polish friends helped me.
{
char buf[1024];
int konieclinii;
unsigned long linie=0;
//new load by char name
char cFn[256]/*, cTemp[255]*/;
wsprintf(cFn,"contents\\friends\\%s.txt", m_cPlayerName);
FILE* f=fopen(cFn,"rt");
m_iTotalFriends=0;
if(f == NULL) {
FILE* c=fopen(cFn, "w");
fclose(c);
}
while(fgets(buf,1024,f)){
konieclinii=0;
int i=strlen(buf);
if(i>0 && buf[--i]=='\n'){
buf[i]=0; // kasujemy znak konca linii
konieclinii=1;
linie++;
}
if (linie-1<13) {
strcpy(m_cFriends[linie-1],buf);
m_iTotalFriends++;
}
}
if (m_iTotalFriends>12) m_iTotalFriends=12;
fclose(f);
}
void CGame::SaveFriendList()
{
char cFn[256]/*, cTemp[255]*/;
wsprintf(cFn,"contents\\friends\\%s.txt", m_cPlayerName);
FILE* f=fopen(cFn,"w");
int i;
char wr[12];
for (i=0;i<m_iTotalFriends;i++) {
ZeroMemory(wr,sizeof(wr));
wsprintf(wr,"%s\n",m_cFriends[i]);
fputs(wr,f);
}
fclose(f);
}
i think thats why it was crashing , it didnt save lol. becouse m_cPlayerName isnt identifyed when your closeing the game lol...
you can juse search
Code: Select all
if( m_cLogOutCount == -1 )
Code: Select all
memcpy(m_cFriends[m_iTotalFriends],m_cMCName,10);
m_iTotalFriends++;
m_stDialogBoxInfo[43].sV1=0;
SaveFriendList();
good idea Drajwer ... i may try to also add a thing were u can typ there name in..
instead of happen to click them.
<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' />
-
- Loyal fan
- Posts: 391
- Joined: Sat Mar 26, 2005 12:41 am
search
add this under it
and if u dont have this already search:
add this under the break after that case
oh ya and you do need this soo search:
add this after that case:
this code is on what drajwer posted heh but this is main code for why the dialog box isnt movable and all that . but the other code u need, or ull probley get errors.
oh and by the way on the above post heh, the case 70 for the f, if function isnt correct, soo basicly with that one it will come up with the letter f pressed, so u may wana add {'s or something
Code: Select all
m_stDialogBoxInfo[42].sSizeY = 339;
Code: Select all
// friends
m_stDialogBoxInfo[43].sX = 0;
m_stDialogBoxInfo[43].sY = 0;
m_stDialogBoxInfo[43].sSizeX = 258;
m_stDialogBoxInfo[43].sSizeY = 339;
Code: Select all
// levelup diag
Code: Select all
//friends list
case 43:
if (m_bIsDialogEnabled[43] == FALSE)
{
m_iFriendIndex = -1;
m_stDialogBoxInfo[43].sV1= 0;
}
break;
Code: Select all
// Snoopy: Drag Gail menu
Code: Select all
case 43: // Drajwer - friendlist s
m_stMCursor.cSelectedObjectType = DEF_SELECTEDOBJTYPE_DLGBOX;
m_stMCursor.sSelectedObjectID = cDlgID;
break;
oh and by the way on the above post heh, the case 70 for the f, if function isnt correct, soo basicly with that one it will come up with the letter f pressed, so u may wana add {'s or something
<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' />
Also, the list should be scrollable and there should be no friend limit... any Binary Lists will be ok. I dont have time atm so do what you want and post updates here
<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)
-
- Loyal fan
- Posts: 391
- Joined: Sat Mar 26, 2005 12:41 am
alright, ya should have scrolling , hey Drajwer on mine i have to have like a Enter on the top of the file or my client crashes, and on the game, i have like wierd name or what ever on the top of the dialog, if i delete it, it will crash my client ;(... have any idea???
<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' />
sux skin
<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)
-
- <3 bd long time
- Posts: 967
- Joined: Tue Jul 12, 2005 8:07 pm
- Location: Washington, USA
- Contact:
Ok, Well why doesn't someone comiple it so people can test it? I'd like to test it myself... Is there anyway I can integrate Angels into v3.51? along with Friends list and possibly some other stuff. I want to pay someone to code this for me... I think all servers should join together and own Sango's server...
ya.... i am whit uADDKiD wrote: Ok, Well why doesn't someone comiple it so people can test it? I'd like to test it myself... Is there anyway I can integrate Angels into v3.51? along with Friends list and possibly some other stuff. I want to pay someone to code this for me... I think all servers should join together and own Sango's server...
"Prefiero morir de pie que vivir arrodillado"
All servers join together
20servers become 1 big server?
A joke??
20servers become 1 big server?
A joke??
<img src='http://www.hot.ee/carvanho/taavi.png' border='0' alt='user posted image' /><br><br><img src='http://www.hot.ee/carvanho/Elvine.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/LieroX.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/Football.png' border='0' alt='user posted image' />
its good idea but u need like 10 programers and nice dedi hoster also exp x2-3 max lvl 180 max stat 200 low drop and u got like 200ppl online
<a href=http://profile.xfire.com/sok0l><img src=http://miniprofile.xfire.com/bg/co/type/0/sok0l.png width=440 height=111></a>
hmm thats good idear tobad not alot of ppl wnana do it im startiun g one welling ben working one it for a while now geting all hb error fixed thats already updating to 3.82 wqithout bugs. then addning new maps towns class and such. then join server to ahve 1 hugly modified and 1 like orgianl server but 3.82 without bugs will be sick setup there will be a poertal in each server to transport to the otehre server its a idear but easyly to do gotta do a lot of codeing well. i always wabnted to do it now i im if im by my self or not i dotn want 1000 server i wasnt 1 with 2 type reg hb and crazy hb with 1000+ all server will bow down to us and surender to us i wish it was tahts smiple but will seesokol wrote: its good idea but u need like 10 programers and nice dedi hoster also exp x2-3 max lvl 180 max stat 200 low drop and u got like 200ppl online
<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>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~