Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Chat Hook.
Re: Chat Hook. [message #271383 is a reply to message #271244] Sat, 07 July 2007 03:15 Go to previous messageGo to previous message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma:
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","");
		}
	}
}



 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Tow Truck.
Next Topic: SSGm Script Question
Goto Forum:
  


Current Time: Sun Dec 22 10:34:40 MST 2024

Total time taken to generate the page: 0.00759 seconds