Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Chat Hook.
Chat Hook. [message #271244] Fri, 06 July 2007 14:25 Go to next message
Sn1per74* is currently offline  Sn1per74*
Messages: 939
Registered: April 2006
Karma: 0
Colonel
Somebody was attempting to help me make a chat hook. A !fly command. He led me to the chat hook, but he told me there was anohter just like it and I was editing the wrong one. What did I do??!?!

http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png
Creator: AoBFrost
Re: Chat Hook. [message #271245 is a reply to message #271244] Fri, 06 July 2007 15:46 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
What Server side source code are you using?


Re: Chat Hook. [message #271246 is a reply to message #271245] Fri, 06 July 2007 15:56 Go to previous messageGo to next message
Sn1per74* is currently offline  Sn1per74*
Messages: 939
Registered: April 2006
Karma: 0
Colonel
Aow.cpp SSAOW V 1.51

http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png
Creator: AoBFrost
Re: Chat Hook. [message #271247 is a reply to message #271244] Fri, 06 July 2007 16:01 Go to previous messageGo to next message
Genesis2001
Messages: 1397
Registered: August 2006
Karma: 0
General (1 Star)
Use SSGM 2.01 and LuaPlugin. Smile


-MathK1LL
Re: Chat Hook. [message #271248 is a reply to message #271247] Fri, 06 July 2007 16:04 Go to previous messageGo to next message
Sn1per74* is currently offline  Sn1per74*
Messages: 939
Registered: April 2006
Karma: 0
Colonel
I've tried to use LUA plugin... But it never works. I might when you guys get some bugs out.

http://i4.photobucket.com/albums/y133/FMAROCKS/sniper74halosigsnipedontforgettogiv.png
Creator: AoBFrost
Re: Chat Hook. [message #271297 is a reply to message #271244] Fri, 06 July 2007 19:59 Go to previous messageGo to next message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma: 0
General (3 Stars)
The bugs are in your code Wink
http://forums.dcomproductions.net/viewtopic.php?f=14&t=41

[Updated on: Fri, 06 July 2007 20:05]

Report message to a moderator

Re: Chat Hook. [message #271369 is a reply to message #271244] Sat, 07 July 2007 01:34 Go to previous messageGo to next message
_SSnipe_ is currently offline  _SSnipe_
Messages: 4121
Registered: May 2007
Location: Riverside Southern Califo...
Karma: 0
General (4 Stars)
check my pm Very Happy
Re: Chat Hook. [message #271383 is a reply to message #271244] Sat, 07 July 2007 03:15 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
Copy paste this over the existing chat hook.

const char *WideCharToChar(const wchar_t *wcs);
void Chat(int ID, int Type, const wchar_t *Msg) {
	GameObject *obj = Get_GameObj(ID);
	if (Type == 2) return;
	if (Settings->Gamelog && Settings->NewGamelog) Gamelog_Chat_Hook(ID,Type,Msg);
	if (Type == 1)
	{
		const char *Msg2 = WideCharToChar(Msg);
		if (stricmp(Msg2,"!bind") == 0)
		{
			VehicleOwner(Commands->Get_ID(Get_GameObj(ID)),1);
		}
		else if (stricmp(Msg2,"!unbind") == 0)
		{
			VehicleOwner(Commands->Get_ID(Get_GameObj(ID)),2);
		}
		else if (stricmp(Msg2,"!lock") == 0)
		{
			VehicleOwner(Commands->Get_ID(Get_GameObj(ID)),3);
		}
		else if (stricmp(Msg2,"!unlock") == 0)
		{
			VehicleOwner(Commands->Get_ID(Get_GameObj(ID)),4);
		}
		else if (stricmp(Msg2,"!bl") == 0)
		{
			VehicleOwner(Commands->Get_ID(Get_GameObj(ID)),5);
		}
		else if (stricmp(Msg2,"!c4") == 0)
		{
			VehicleOwner(Commands->Get_ID(Get_GameObj(ID)),6);
		}
		else if (stricmp(Msg2,"!vkick") == 0)
		{
			VehicleOwner(Commands->Get_ID(Get_GameObj(ID)),7);
		}
				else if (stricmp(Msg2,"!fly") == 0)
		{
			Commands->Attach_Script(obj,"jfw_flying_infantry","");
		}
	}
}



Re: Chat Hook. [message #271445 is a reply to message #271244] Sat, 07 July 2007 12:14 Go to previous message
_SSnipe_ is currently offline  _SSnipe_
Messages: 4121
Registered: May 2007
Location: Riverside Southern Califo...
Karma: 0
General (4 Stars)
pretty much same code i pmmed u but without teh rest of it (the chat hook stuff ) lol
Previous Topic: Tow Truck.
Next Topic: SSGm Script Question
Goto Forum:
  


Current Time: Sun Dec 22 05:37:31 MST 2024

Total time taken to generate the page: 0.00703 seconds