11.03.2014, 18:01
Hi i have a problem with OnPlayerText
And results are:
But i want only when im omanik then show this:
And when im just a player then:
umm, i hope you understand my problem!
pawn Код:
public OnPlayerText(playerid, text[])
{
new textv2[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof (name));
format(textv2, sizeof (textv2), "{D6D6D6}[Mдngija] [%d] %s: {F0F0F0}%s", playerid, name, text);
SendPlayerMessageToAll(playerid, textv2);
if(PlayerInfo[playerid][Adminlevel] == 1)
{
GetPlayerName(playerid, name, sizeof (name));
format(textv2, sizeof (textv2), "{0BE62C}[Moderaator] [%d] %s: {14F736}%s", playerid, name, text);
SendPlayerMessageToAll(playerid, textv2);
}
else if(PlayerInfo[playerid][Adminlevel] == 2)
{
GetPlayerName(playerid, name, sizeof (name));
format(textv2, sizeof (textv2), "{DB170D}[Admin] [%d] %s: {FF6B63}%s", playerid, name, text);
SendPlayerMessageToAll(playerid, textv2);
}
else if(PlayerInfo[playerid][Adminlevel] == 3)
{
GetPlayerName(playerid, name, sizeof (name));
format(textv2, sizeof (textv2), "{E3A617}[Peaadmin] [%d] %s: {FAB920}%s", playerid, name, text);
SendPlayerMessageToAll(playerid, textv2);
}
else if(PlayerInfo[playerid][Adminlevel] == 4)
{
GetPlayerName(playerid, name, sizeof (name));
format(textv2, sizeof (textv2), "{0DDED3}[Abiomanik] [%d] %s: {1CFFF4}%s", playerid, name, text);
SendPlayerMessageToAll(playerid, textv2);
}
else if(PlayerInfo[playerid][Adminlevel] >= 5)
{
GetPlayerName(playerid, name, sizeof (name));
format(textv2, sizeof (textv2), "{7564CC}[Omanik] [%d] %s: {A28FFF}%s", playerid, name, text);
SendPlayerMessageToAll(playerid, textv2);
}
else if(PlayerInfo[playerid][VIP] >= 1)
{
GetPlayerName(playerid, name, sizeof (name));
format(textv2, sizeof (textv2), "{B2B54E}[VIP] [%d] %s: {E8ED5F}%s", playerid, name, text);
SendPlayerMessageToAll(playerid, textv2);
}
return 1;
}
But i want only when im omanik then show this:
And when im just a player then:
umm, i hope you understand my problem!