Change player color - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Change player color (
/showthread.php?tid=106431)
Change player color -
DokerJr - 03.11.2009
Hi
How to change player color ?
And change the color only admins ...
This screenshot is made with paint
Re: Change player color -
Nameless303 - 03.11.2009
When the player connects;
Код:
public OnPlayerConnect(playerid)
{
SetPlayerColor(playerid, YOUR COLOR HERE);
}
And for admin;
Код:
new IsPlayerRconAdmin[MAX_PLAYERS];
public OnGameModeInit()
{
SetTimer("CheckForNewAdmins", 5000, 1);
return 1;
}
public OnPlayerConnect(playerid)
{
IsPlayerRconAdmin[playerid] = 0;
return 1;
}
forward CheckForNewAdmins();
public CheckForNewAdmins()
{
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerAdmin(i) && IsPlayerRconAdmin[i] == 0)
{
IsPlayerRconAdmin[i] = 1;
SetPlayerColor(playerid, YOUR ADMIN COLOR HERE);
}
}
}
}
Have fun with it (:
Re: Change player color -
David1338 - 03.11.2009
Would be cool if someone makes a FS, that you can choose a player and let him get flashing names with different colors
Re: Change player color -
DokerJr - 03.11.2009
Nameless303
not working
I login and I give color
LIGHTBLUE is not changed