22.01.2014, 16:21
pawn Код:
#define COLOR_ADMIN 0xFFFFFFFF // Define your Admin Color here.
CMD:b(playerid, params[])
{
new string[128];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /b [text] (Local OOC Chat)");
if(AntiAdv(playerid, params)) return 1;
format(string, sizeof(string), "(( [%i] %s Says: %s ))", playerid, RPN(playerid), params);
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if(aDuty[playerid])
{
SendNearbyMessage(playerid, 10, string, COLOR_ADMIN, COLOR_ADMIN, COLOR_ADMIN, COLOR_ADMIN, COLOR_ADMIN);
}
}
else
{
SendNearbyMessage(playerid, 10, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
}
Log("logs/chat.log", string);
return 1;
}

