25.06.2012, 21:00
pawn Код:
stock GetAdminRank(playerid)
{
if(!IsPlayerConnected(playerid)) return 0;
new AdminRank[40]
switch(Adminvariable[playerid])
{
case 0: { Adminrank = "None"; }
case 1: { Adminrank = "Moderator"; }
case 2: { Adminrank = "Junior Admin"; }
//And so forth
}
return Adminrank;
}
public OnPlayerText(playerid, text[])
{
new string[128], name[MAX_PLAYER_NAME];
if(Adminvariable[playerid] >= 1)
{
format(string, sizeof(string), "[%s] %s: %s", GetAdminRank(playerid), GetPlayerName(playerid, name, sizeof(name)), text);
SendClientMessageToAll(playerid, -1, string);
return 0;
}
return 1;
}