Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » chatcommand
chatcommand [message #457083] Fri, 07 October 2011 11:54 Go to previous message
robbyke is currently offline  robbyke
Messages: 348
Registered: September 2010
Location: Belgium
Karma:
Recruit
ive been trying to understand the new keyhook and ive mastered as far as i need it.

but id like that if someone presses a key the server acts as if someone typed a certain chatcommand

it used to work with ssgm_chatcommand something and ive looked at it , but i have no clue how it works

im trying this virtual void:
struct Datastruct
{//triggers a chat command in some way
	virtual void Trigger_Chat_Command(int ID,int Type,const StringClass &Command,const TokenClass &Text);
};
Datastruct *Data;

void KB_keyhook::Detach(GameObject *obj)
{
	JFW_Key_Hook_Base::Detach(obj);
}

void KB_keyhook::Created(GameObject *obj)
{
	enabled = true;
	hookid = 0;
	k = 0;
	time = true;
	InstallHook(Get_Parameter("Key"),obj);
	LastPress = The_Game()->Get_Game_Duration_S()-5;
}
void KB_keyhook::KeyHook()
{
	Data->Trigger_Chat_Command(Get_Player_ID(Owner()),Get_Int_Parameter("ChatType"),Get_Parameter("Command"),TokenClass());
}
ScriptRegistrant<KB_keyhook> KB_keyhook_Registrant("KB_keyhook","Key:string,Command:string,ChatType:integer");


wich was the way it worked if im lucky it works otherwise ill edit my post here

NO LUCK Sad

any help?


Owner of kambot TT server

kambot.freeforums.org

[Updated on: Fri, 07 October 2011 17:01]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: gameobject lists-> which&when
Next Topic: TCW Tropical [wip]
Goto Forum:
  


Current Time: Sun Dec 01 13:34:39 MST 2024

Total time taken to generate the page: 0.00676 seconds