[CODE]

All Helbreath Server Source Discussion here.
Drajwer
<3 bd long time
Posts: 841
Joined: Fri Dec 10, 2004 3:24 pm

Post by Drajwer »

first :)
winmain.cpp

Code: Select all

#define ID_BUTTON 501
this is id of our button :P

we need 2 handles more

Code: Select all

HWND G_hEdt = NULL;
HWND G_hBut = NULL;
search for

Code: Select all

LRESULT CALLBACK WndProc( HWND hWnd,UINT message,WPARAM wParam,LPARAM lParam )
and put above

Code: Select all

case WM_COMMAND:
this

Code: Select all

	case WM_COMMAND:
  switch(wParam){
  	case ID_BUTTON:
    char cWhat[100];
	/*get value*/  	GetWindowText(G_hEdt,cWhat,100);
    if (cWhat != NULL) {
/*empty edit */    SetWindowText(G_hEdt,NULL);
  	/* set focus on edit */	SetFocus(G_hEdt);
/*command parser*/    G_pGame->ParseCommand(cWhat);
    }
  	break;
  }
  break;
and we must create these buttons and memos

search for

Code: Select all

BOOL InitInstance( HINSTANCE hInstance, int nCmdShow )
and search for

Code: Select all

GetLocalTime(&SysTime);
then put 1 line above this

Code: Select all


  G_hEdt = CreateWindowEx(0, "EDIT", NULL, WS_EX_CLIENTEDGE | WS_CHILD | WS_VISIBLE | WS_BORDER, 5, 5, 520, 21, G_hWnd, NULL, hInstance, NULL);
  G_hBut = CreateWindowEx(0, "Button", "OK", WS_CHILD | WS_VISIBLE | WS_BORDER, 530, 5, 75, 21, G_hWnd, (HMENU)ID_BUTTON, hInstance, NULL);


ok then go to game.h and search for

Code: Select all

void RequestResurrectPlayer(int iClientH, bool bResurrect);
and put this

Code: Select all

void ParseCommand(char* pMsg);
then go to Game.cpp and put this at end of file

Code: Select all




void CGame::ParseCommand(char* pMsg) {
	char   seps[] = "= \t\n";
	char   * token, * token2;
	class  CStrTok * pStrTok;
	char buff[100];
	BOOL bFlag;
	if (pMsg == NULL) return;
	pStrTok = new class CStrTok(pMsg, seps);
	token = pStrTok->pGet();
	token2 = pStrTok->pGet();
	bFlag = FALSE;
	if (memcmp(pMsg,"/ascii ",7) == 0) {
  //if (strlen(token) == 1) {
  bFlag = TRUE;
  char znak[1];
  memcpy(znak,token,1);
  wsprintf(buff,"AscII%d/%s.txt",znak[0],token);
  PutLogList(buff);
	}
	if (memcmp(pMsg,"/say ",5) == 0) { /* dont laught at this :) */
  bFlag=TRUE;
  //tLogList(token2);
     char ss[100];
  ZeroMemory(ss,100);
  memcpy(ss,pMsg,strlen(pMsg));
  ss[0]=' ';
  ss[1]=' ';
  ss[2]=' ';
  ss[3]=' ';
  int i;
  char*p=ss;
  while(isspace(*p) && (*p))p++;
  memmove(ss,p,strlen(p)+1);
  wsprintf(ss,"%s",ss);
  int do_ilu;
  do_ilu=0;
  for (i = 1; i < DEF_MAXCLIENTS; i++) {
  	if (m_pClientList[i] != NULL) {
    ShowClientMsg(i,ss);
    do_ilu++;
  	}
  }
  char buff[100];
  wsprintf(buff,"(!) Message '%s' sended to %d players.",ss,do_ilu);
  PutLogList(buff);
}
	if ((!bFlag) && (pMsg != NULL)) {
  wsprintf(buff,"(!!!) %s - invalid command",pMsg);
  PutLogList(buff);
	}
	
}

and thats all B)

if this dont work, pm me
<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)
locobans
Outpost Junkie
Posts: 2264
Joined: Tue Jul 13, 2004 3:51 am
Location: Behind You
Contact:

Post by locobans »

This will be a prompt up to what? send messeges?
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>
Drajwer
&lt;3 bd long time
Posts: 841
Joined: Fri Dec 10, 2004 3:24 pm

Post by Drajwer »

locobans wrote: This will be a prompt up to what? send messeges?
like my screen
<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)
DMZ2
noob
Posts: 21
Joined: Sun Jan 16, 2005 10:06 am

Post by DMZ2 »

i get error with ID_PRZYCISK1

i add

Code: Select all

#define ID_PRZYCISK1 502
to my code and it compile but no window in my hg :( please i like your window i want to make mine with that stuff.
Drajwer
&lt;3 bd long time
Posts: 841
Joined: Fri Dec 10, 2004 3:24 pm

Post by Drajwer »

G_hBut = CreateWindowEx(0, "Button", "OK", WS_CHILD | WS_VISIBLE | WS_BORDER, 530, 5, 75, 21, G_hWnd, (HMENU)ID_PRZYCISK1, hInstance, NULL);


for


G_hBut = CreateWindowEx(0, "Button", "OK", WS_CHILD | WS_VISIBLE | WS_BORDER, 530, 5, 75, 21, G_hWnd, (HMENU)ID_BUTTON, hInstance, NULL);
<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)
charlie
Outpost4lyfe
Posts: 3324
Joined: Sun Apr 06, 2003 12:24 am
Location: Mt GOD
Contact:

Post by charlie »

nice mate
Girlfriends are dedicated hookers.
DMZ2
noob
Posts: 21
Joined: Sun Jan 16, 2005 10:06 am

Post by DMZ2 »

still nothing new.. this work for any1 else?
Drajwer
&lt;3 bd long time
Posts: 841
Joined: Fri Dec 10, 2004 3:24 pm

Post by Drajwer »

omg i must make a source with it

commands:

/ascii character name = returns path to character (AsciiAsciiNo/Charname.txt)

/say = sends message to all users

check ParseCommand void


enjoy


<a href='http://www.drajwer.iglu.cz/my_source.zip' target='_blank'>click here</a>
<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)
hummmu
Member
Posts: 165
Joined: Sun Dec 12, 2004 7:59 pm

Post by hummmu »

waw!!! this is actually great work.

That HG looks nice you fully rebuilded it? and ur Gate Sever too?
<a href='http://www.hb2k4.tk' target='_blank'><span style='color:blue'> Use do not abuse.</span> </a> <br><br>-MySeLF-
tyteman
Spamtastic
Posts: 1149
Joined: Wed Nov 12, 2003 2:00 pm
Location: CA, USA

Post by tyteman »

ayres from hbunited did the same.. except he created a wlserver meant for sql..
"<i>One night I was talking to God, but I realized I was talking to <u>myself</u></i>"<br><br><img src='http://img61.imageshack.us/img61/2678/untitled13bf.gif' border='0' alt='user posted image' /><br><br><b><u>Links</u></b><br>
Drajwer
&lt;3 bd long time
Posts: 841
Joined: Fri Dec 10, 2004 3:24 pm

Post by Drajwer »

hummmu wrote: waw!!! this is actually great work.

That HG looks nice you fully rebuilded it? and ur Gate Sever too?
hg only :) im to lame to change gate server
<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)
binarydata
DBfiller
Posts: 3816
Joined: Fri Oct 31, 2003 5:30 am
Location: San Diego CA, USA
Contact:

Post by binarydata »

muy bien
<img src='http://img88.exs.cx/img88/2290/7666.jpg' border='0' alt='user posted image' />
hummmu
Member
Posts: 165
Joined: Sun Dec 12, 2004 7:59 pm

Post by hummmu »

Aryes was a dickhead, but he knew his shit.
<a href='http://www.hb2k4.tk' target='_blank'><span style='color:blue'> Use do not abuse.</span> </a> <br><br>-MySeLF-
molo
Member
Posts: 140
Joined: Mon Jan 17, 2005 1:19 am

Post by molo »

Drajwer wrote: omg i must make a source with it

commands:

/ascii character name = returns path to character (AsciiAsciiNo/Charname.txt)

/say = sends message to all users

check ParseCommand void


enjoy


<a href='http://www.drajwer.iglu.cz/my_source.zip' target='_blank'>click here</a>
i got your source but how do i use it lol

hope u help u out
or u make one for me :P

thanck you
Drajwer
&lt;3 bd long time
Posts: 841
Joined: Fri Dec 10, 2004 3:24 pm

Post by Drajwer »

just compile it lol
<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