25.02.2019, 14:14
pawn Код:
/ Calculate FPS
if ( iDrunkLevel < 100 ) SetPlayerDrunkLevel( playerid, 2000 );
else
{
if ( playerDrunkLevel[ playerid ] != iDrunkLevel )
{
new iFPS = playerDrunkLevel[ playerid ] - iDrunkLevel;
if ( ( iFPS > 0 ) && ( iFPS < 200 ) )
playerFPS[ playerid ] = iFPS;
playerDrunkLevel[ playerid ] = iDrunkLevel;
}
}
return 1;
}
pawn Код:
CMD:pinfo( playerid, params[ ] )
{
if ( playerData[ playerid ][ playerLevel ] < 1 )
return SendClientMessage(playerid, COLOR_WHITE, "{F81414}[ERROR]{FFFFFF} You don't have an appropriate administration level to use this command." );
new szString[ 144 ], otherid;
if ( sscanf( params, "u", otherid ) )
return SendClientMessage( playerid, COLOR_WHITE, "{FFAF00}[USAGE]{FFFFFF} /pinfo [PLAYER_ID]" );
if ( ! IsPlayerConnected( otherid ) )
return SendClientMessage( playerid, COLOR_WHITE, "{FF0404}[ERROR] {FFFFF}Invalid Player ID." );
format( szString, sizeof( szString ), "{FF0770}[ADMIN] {FFFFFF} %s(%d), %.2f PL, %d ms, %d FPS", playerData[otherid][playerNamee], otherid, NetStats_PacketLossPercent( otherid ), GetPlayerPing( otherid ), GetPlayerFPS( otherid ) );
SendClientMessage( playerid, -1, szString );
return 1;
}