pawn Код:
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BLUE 0x0000BBAA
public OnPlayerText(playerid, text[])
{
new string[128], name[MAX_PLAYER_NAME];
if(Adminvariable[playerid] == 1)
{
format(string, sizeof(string), "[V.I.P] %s: %s", GetPlayerName(playerid, name, sizeof(name)), text);
SendClientMessageToAll(playerid, COLOR_GREEN, string);
return 0;
}
if(Adminvariable[playerid] == 2)
{
format(string, sizeof(string), "[Moderator] %s: %s", GetPlayerName(playerid, name, sizeof(name)), text);
SendClientMessageToAll(playerid, COLOR_GREEN, string);
return 0;
}
else if(Adminvariable[playerid] >= 3)
{
format(string, sizeof(string), "[%d Admin] %s: %s", Admincariable[playerid], GetPlayerName(playerid, name, sizeof(name)), text);
SendClientMessageToAll(playerid, COLOR_ORANGE, string);
return 0;
}
else if(Adminvariable[playerid] == 0)
{
format(string, sizeof(string), "[Player] %s: %s", GetPlayerName(playerid, name, sizeof(name)), text);
SendClientMessageToAll(playerid, COLOR_WHITE, string);
return 0;
}
else if(Leadervariable[playerid] == 1)
{
format(string, sizeof(string), "[Leader] %s: %s", GetPlayerName(playerid, name, sizeof(name)), text);
SendClientMessageToAll(playerid, COLOR_BLUE, string);
return 0;
}
return 1;
}