pawn Код:
switch(PlayerInfo[playerid][pAdmin])
{
case 0:
{
// Do nothing.
}
case 1:
{
format(string,sizeof(string),"(( {FFFFFF}%s {FFFFFF} %s: %s ))", RPN(playerid), params);
}
case 2:
{
format(string,sizeof(string),"(( {FFD400}%s {FFFFFF} %s: %s ))", RPN(playerid), params);
}
case 3:
{
format(string,sizeof(string),"(( {800080}%s {FFFFFF} %s: %s ))", RPN(playerid), params);
}
case 4:
{
format(string,sizeof(string),"(( {FFD400}%s {FFFFFF} %s: %s ))", RPN(playerid), params);
}
case 5:
{
format(string,sizeof(string),"(( {00FF00}%s {FFFFFF} %s: %s ))", RPN(playerid), params);
}
case 6:
{
format(string,sizeof(string),"(( {0000FF}%s {FFFFFF} %s: %s ))", RPN(playerid), params);
}
default: // 7 .. cellmax:
{
format(string,sizeof(string),"(( {FF0000}%s {FFFFFF} %s: %s ))", RPN(playerid), params);
}
}
Assuming you know the admin level will never go negative (easy enough in a given script). Or just use an array.
In PAWN.