getting a players' FPS
#1

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;
}
I put this code on my game mode but it isn't getting a players' FPS when I type this command:-
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;
}
Reply


Messages In This Thread
getting a players' FPS - by Hammad123 - 25.02.2019, 14:14
Re: getting a players' FPS - by TheToretto - 25.02.2019, 14:29
Re: getting a players' FPS - by Hammad123 - 25.02.2019, 14:35
Re: getting a players' FPS - by TheToretto - 25.02.2019, 14:59
Re: getting a players' FPS - by Hammad123 - 25.02.2019, 15:21

Forum Jump:


Users browsing this thread: 2 Guest(s)