12.07.2015, 16:52
Alguйm tem o contador de fps e ping no textdraw.
forward AttPing();
new Text:ping[MAX_PLAYERS];
public OnGameModeInit()
{
for( new i = 0; i < MAX_PLAYERS; i++ ) {
ping[ i ] = TextDrawCreate( 400, 25, " " );
TextDrawFont( ping[ i ], 3);
TextDrawUseBox( ping[ i ], 0);
TextDrawSetOutline( pingping[ i ], 1);
TextDrawBackgroundColor( ping[ i ], 0xffff00ff);
TextDrawColor( ping[ i ], 0x00ff00ff);
TextDrawAlignment( ping[ i ], 1);
}
SetTimer( "AttPing", 1000, 1 );
return 1;
}
public AttPing()
{
new cells[ 19 ];
for( new i = 0; i < MAX_PLAYERS; i++ )
{
if( IsPlayerConnected( i ) )
{
format( cells, sizeof( cells ), "Ping: %d", GetPlayerPing(i) );
TextDrawSetString( ping[ i ], gstring);
}
}
return 1;
}