02.09.2013, 17:59
For random colours:
pawn Код:
// Global variable
new
ColorChanger_Timer[ MAX_PLAYERS ]
;
// Where you want to set the timer and start changing the name color
// Check if they're admin (what you posted) and if they are set the timer
ColorChanger_Timer[ playerid ] = SetTimerEx( "OnPlayerChangeColor", 1000, true, "i", playerid );
// OnPlayerDisconnect and/or if you want to stop changing the colour
KillTimer( ColorChanger_Timer[ playerid ] );
forward OnPlayerChangeColor( playerid );
public OnPlayerChangeColor( playerid )
{
SetPlayerColor( playerid, ( 16777216 * random( 256 ) ) + ( 65536 * random( 256 ) ) + ( 256 * random( 256 ) ) + 255 );
}