SA-MP Forums Archive
How to make sparkling name for admins - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to make sparkling name for admins (/showthread.php?tid=461625)



SOLVED - SilentSoul - 02.09.2013

SOLVED


Re: How to make sparkling name for admins - Konstantinos - 02.09.2013

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 );
}



Re: How to make sparkling name for admins - SilentSoul - 02.09.2013

Thank you Konstantinos very much +1 rep , i will test it now