NetStats_MessagesRecvPerSecond

warning

This function was added in SA-MP 0.3z and will not work in earlier versions!

Description

Gets the number of messages the player has received in the last second.

NameDescription
playeridThe ID of the player to get the data from.

Returns

the number of messages the player has received in the last second.

Examples

public OnPlayerCommandText(playerid,cmdtext[])
{
if (!strcmp(cmdtext, "/msgpersec"))
{
new szString[144];
format(szString, sizeof(szString), "You have received %i network messages in the last second.", NetStats_MessagesRecvPerSecond(playerid));
SendClientMessage(playerid, -1, szString);
}
return 1;
}

Related Functions