Raised This Month: $12 Target: $400
 3% 

how to patch and replace the text "Server is full" with custom?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wangningyu
Member
Join Date: Dec 2011
Location: China.GuangDong
Old 03-29-2015 , 03:03   how to patch and replace the text "Server is full" with custom?
Reply With Quote #1

I'm learning meta module , first use GetModuleHandle("swds.dll") to get the base address.

and then how to patch the text : "Server is full" with custom ?



thanks for your reply !
__________________
One Code , One Dream !
wangningyu is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 03-29-2015 , 06:12   Re: how to patch and replace the text "Server is full" with custom?
Reply With Quote #2

I can't really help you, but are you sure this is server side (not client side) and it's hard coded that way?
I recently noticed that HL1 games became multilingual.

Also, see Orpheu or any other modules capable to hook/ override engine code.
__________________

Last edited by claudiuhks; 03-29-2015 at 06:12.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
hzqst
Senior Member
Join Date: Jul 2008
Old 04-01-2015 , 05:00   Re: how to patch and replace the text "Server is full" with custom?
Reply With Quote #3

Code:
void SV_RejectConnection(netadr_t *adr, char *fmt, ...)

int SV_FindEmptySlot(netadr_t *adr, int *pslot, client_t **ppClient)
{
	client_t *client;
	int slot;
	int clients = 0;

	for (slot = 0 ; slot < svs.maxclients ; slot++)
	{
		client = &svs.clients[slot];

		if (!client->active && !client->spawned && !client->connected)
			break;

		clients++;
	}

	if (clients >= svs.maxclients)
	{
		SV_RejectConnection(adr, "Server is full.\n");
		return 0;
	}

	*pslot = slot;
	*ppClient = client;
	return 1;
}
in win32 hw.dll build 6153
68 ?? ?? ?? ?? push offset aServerIsFull_ ; "Server is full.\n"
51 push ecx ; adr
E8 ?? ?? ?? ?? call SV_RejectConnection
83 C4 08 add esp, 8

just alt+t search "Server is full.\n" and
find SV_RejectConnection then hook this function, return g_pfn_SV_RejectConnection(adr, "a new \"server is full\"! "); when necessary.

Last edited by hzqst; 04-01-2015 at 05:00.
hzqst is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:14.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode