Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Code Release - !ping command
Code Release - !ping command [message #313058] Wed, 23 January 2008 04:45 Go to previous message
ExEric3 is currently offline  ExEric3
Messages: 746
Registered: February 2005
Location: Slovakia
Karma:
Colonel
Here is the code of !ping command for scripts.dll - Add this code at the end of the file "gmmain.cpp":

class PingChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
		Console_Input(StrFormat("message %s, your ping is %d.",Get_Player_Name_By_ID(ID),Get_Ping(ID)).c_str());
		
	}
};
ChatCommandRegistrant<PingChatCommand> PingChatCommandReg("!ping",CHATTYPE_ALL,0,GAMEMODE_ALL);


Thanks to jindrak2 for help.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Serverside Co-Op
Next Topic: NEED HELP MAKING A WEAPON REPLACEMENT!
Goto Forum:
  


Current Time: Mon Sep 23 18:29:05 MST 2024

Total time taken to generate the page: 0.00792 seconds