1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-01-31 18:07:14 +01:00

Implement network statistics.

network statistics can now be retrieved for each client.
This commit is contained in:
Sandu Liviu Catalin 2019-08-13 18:29:09 +03:00
parent 5266465df6
commit 413bf546b6
2 changed files with 14 additions and 0 deletions

View File

@ -401,6 +401,15 @@ void CPlayer::SetOptionEx(Int32 option_id, bool toggle, Int32 header, LightObj &
} }
} }
// ------------------------------------------------------------------------------------------------
Float64 CPlayer::GetNetworkStatistics(Int32 option_id) const
{
// Validate the managed identifier
Validate();
// Return the requested information
return _Func->GetNetworkStatistics(m_ID, static_cast< vcmpNetworkStatisticsOption >(option_id));
}
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
Int32 CPlayer::GetWorld() const Int32 CPlayer::GetWorld() const
{ {

View File

@ -325,6 +325,11 @@ public:
*/ */
void SetOptionEx(Int32 option_id, bool toggle, Int32 header, LightObj & payload); void SetOptionEx(Int32 option_id, bool toggle, Int32 header, LightObj & payload);
/* --------------------------------------------------------------------------------------------
* Retrieve network statistics related to the managed player entity.
*/
Float64 GetNetworkStatistics(Int32 option_id) const;
/* -------------------------------------------------------------------------------------------- /* --------------------------------------------------------------------------------------------
* Retrieve the world in which the managed player entity exists. * Retrieve the world in which the managed player entity exists.
*/ */