Home » Renegade Discussions » Mod Release Forum » [Plug-in] SSGM2.02 Ping Plugin
( ) 1 Vote
Re: [Plug-in] SSGM2.02 Ping Plugin [message #439451 is a reply to message #439290] |
Sat, 13 November 2010 23:59 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to previous message](/theme/Renegade_Forums/images/down.png) |
![](/images/avatars/N_Tech.jpg) |
ExEric3
Messages: 746 Registered: February 2005 Location: Slovakia
Karma:
|
Colonel |
|
|
Xpert wrote on Fri, 12 November 2010 08:41 | This is an old bump, I know, but I was browsing the forums to see if there's anything I can make use for myself and I came across this. So I decided to show mine, I'll paste it. Maybe if Exeric still browse these forums, you can make use of it too? You don't have to put the whole player's name.
class ConnectionChatCommand : public ChatCommandClass {
void Triggered(int ID,const TokenClass &Text,int ChatType) {
if (!Text[1].empty()) {
GameObject *obj;
std::string name = Text[1].c_str();
std::string sender = Get_Player_Name_By_ID(ID);
int amount = 0;
amount = Get_Part_Names(name.c_str());
if (amount == 1) {
obj = Get_Part_Name(name.c_str());
int PID = Get_Player_ID(obj);
name = Get_Player_Name(obj);
if (ID != PID) {
Console_Input(StrFormat("ppage %d Connection for %s -> Ping: %d; Kbits: %d; Used bandwidth: %d;",ID,name.c_str(),Get_Ping(PID),Get_Kbits(PID),Get_Bandwidth(PID)).c_str());
}
else {
Console_Input(StrFormat("ppage %d Your connection -> Ping: %d; Kbits: %d; Used bandwidth: %d;",ID,Get_Ping(ID),Get_Kbits(ID),Get_Bandwidth(ID)).c_str());
}
}
else if (amount == 0) {
Console_Input(StrFormat("ppage %d Player not found.",ID).c_str());
return;
}
else if (amount > 1) {
obj = Get_GameObj_By_Player_Name(name.c_str());
if (!obj) {
Console_Input(StrFormat("ppage %d There are %i players with that substring, please make the name more unique.",ID,amount).c_str());
return;
}
}
}
else {
Console_Input(StrFormat("ppage %d Your connection -> Ping: %d; Kbits: %d; Used bandwidth: %d;",ID, Get_Ping(ID), Get_Kbits(ID), Get_Bandwidth(ID)).c_str());
}
}
};
ChatCommandRegistrant<ConnectionChatCommand> ConnectionChatCommandReg("!ping;!lag",CHATTYPE_ALL,0,GAMEMODE_ALL);
|
Thanks for your code. For you all works? Because when I use in game !ping partname FDS crash with this:
Exception occurred at 0x38D1B717 (No Owner)
The Renegade FDS tried to write to address 0x38d1b717 (No Owner)
Yeah I updated engine_player.cpp which you posted here.
|
|
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
[Plug-in] SSGM2.02 Ping Plugin
By: ExEric3 on Sat, 18 April 2009 14:28
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: reborn on Sat, 18 April 2009 17:14
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: ExEric3 on Sat, 18 April 2009 18:15
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: ExEric3 on Wed, 22 July 2009 09:57
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: jnz on Wed, 22 July 2009 11:55
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: ExEric3 on Wed, 22 July 2009 15:26
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: raven on Wed, 22 July 2009 11:33
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: dr3w2 on Thu, 23 July 2009 19:36
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: dr3w2 on Sat, 25 July 2009 14:56
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: jnz on Sat, 25 July 2009 15:14
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: Goztow on Fri, 24 July 2009 05:31
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: dr3w2 on Sat, 25 July 2009 15:16
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: jnz on Sat, 25 July 2009 15:30
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: Xpert on Fri, 12 November 2010 00:41
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: ExEric3 on Sat, 13 November 2010 23:59
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: reborn on Fri, 12 November 2010 02:45
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: Xpert on Fri, 12 November 2010 13:25
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: jnz on Fri, 12 November 2010 05:15
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: cAmpa on Fri, 12 November 2010 09:25
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: jnz on Sat, 13 November 2010 13:22
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: Xpert on Sun, 14 November 2010 01:37
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: jnz on Tue, 16 November 2010 05:30
|
Goto Forum:
Current Time: Wed Aug 21 17:44:59 MST 2024
Total time taken to generate the page: 0.00840 seconds
|