changing color help! - 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: changing color help! (
/showthread.php?tid=519115)
changing color help! -
KillerStrike23 - 12.06.2014
hey am asking if it is possible to change the color for the leader to this {FF0000} which is red when the other ranks is white which is this {FFFFFF}
my code
pawn Код:
CMD:sfmembers(playerid,params[]){
new Count=0,n[MAX_PLAYER_NAME],string[128],AdmRank[40];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][sFLevel] > 0 && IsPlayerConnected(i))
{
switch(PlayerInfo[i][sFLevel])
{
case 1:
{
AdmRank = "Newest Member";
}
case 2:
{
AdmRank = "Junior Member";
}
case 3:
{
AdmRank = "Executive Member";
}
case 4:
{
AdmRank = "Senior Member";
}
case 5:
{
AdmRank = "Head Member";
}
case 6:
{
AdmRank = "Lieutenant";
}
case 7:
{
AdmRank = "General";
}
case 8:
{
AdmRank = "Leader";
}
}
GetPlayerName(i,n,sizeof(n));
format(string, 128, "{FFFFFF}Rank: %d - %s (Id:%i) | %s |", PlayerInfo[i][sFLevel], n, i, AdmRank);
ShowPlayerDialog(playerid, 901, DIALOG_STYLE_MSGBOX, "{FF0000}SFTDM - StreetFighters", string, "OK","");
Count++;
}
}
if(Count == 0)
{
ShowPlayerDialog(playerid, 901, DIALOG_STYLE_MSGBOX, "{FF0000}SFTDM - StreetFighters", "There is no online sfs right now", "OK","");
}
return 1;}
Re : changing color help! -
S4t3K - 12.06.2014
Simply add the {FF0000} between the beginning quote and the "L" of "Leader".
It will give as output "{FF0000}Leader"
Re: changing color help! -
KillerStrike23 - 12.06.2014
lol nah I want to change the hole string color name and id ... etc
Re: changing color help! -
AiRaLoKa - 12.06.2014
maybe like this?
pawn Код:
CMD:sfmembers(playerid,params[])
{
new Count=0,n[MAX_PLAYER_NAME],string[128],AdmRank[40];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][sFLevel] > 0 && IsPlayerConnected(i))
{
switch(PlayerInfo[i][sFLevel])
{
case 1:
{
AdmRank = "Newest Member";
}
case 2:
{
AdmRank = "Junior Member";
}
case 3:
{
AdmRank = "Executive Member";
}
case 4:
{
AdmRank = "Senior Member";
}
case 5:
{
AdmRank = "Head Member";
}
case 6:
{
AdmRank = "Lieutenant";
}
case 7:
{
AdmRank = "General";
}
case 8:
{
AdmRank = "Leader";
}
}
GetPlayerName(i,n,sizeof(n));
if(PlayerInfo[i][sFLevel] == 8)format(string, 128, "{FF0000}Rank: %d - %s (Id:%i) | %s |", PlayerInfo[i][sFLevel], n, i, AdmRank);
else format(string, 128, "{FFFFFF}Rank: %d - %s (Id:%i) | %s |", PlayerInfo[i][sFLevel], n, i, AdmRank);
ShowPlayerDialog(playerid, 901, DIALOG_STYLE_MSGBOX, "{FF0000}SFTDM - StreetFighters", string, "OK","");
Count++;
}
}