19.02.2015, 08:50
pawn Код:
public OnPlayerText(playerid,text[])
{
if(PInfo[playerid][pAdminDuty] == 1)
{
new pName[MAX_PLAYER_NAME],String[128],Prefix[24] = "Administrator";
GetPlayerName(playerid,pName,24);
format(String, sizeof(String), "%s %s: %s",Prefix,pName,text);
SendClientMessageToAll(COLOR_GOLD,String);
return 0;
}
if(PInfo[playerid][Level] > 1 && text[0] == '.')
{
new msg[128],pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof pName);
format(msg,sizeof(msg),"[ADMIN CHAT] %s[%d]: %s",pName,playerid,text[1]);
MessageToAdmins(COLOR_MEDIUMSEAGREEN,msg);
return 0;
}
return 0;
}