Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Code Release - !ping command
Re: Code Release - !ping command [message #313110 is a reply to message #313097] Wed, 23 January 2008 10:10 Go to previous messageGo to previous message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma:
General (3 Stars)
Cat998 wrote on Wed, 23 January 2008 15:58

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




memory leak.

class PingChatCommand : public ChatCommandClass {
	void Triggered(int ID,const TokenClass &Text,int ChatType) {
		char msg[256];
		sprintf(msg, "message %S, your ping is %d.", Get_Wide_Player_Name_By_ID(ID), Get_Ping(ID));
		Console_Input(msg);
		
	}
};
ChatCommandRegistrant<PingChatCommand> PingChatCommandReg("!ping",CHATTYPE_ALL,0,GAMEMODE_ALL);

[Updated on: Wed, 23 January 2008 10:41]

Report message to a moderator

 
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: Sat Oct 19 11:10:31 MST 2024

Total time taken to generate the page: 0.01035 seconds