15.07.2012, 17:30
(
Последний раз редактировалось Marven; 22.07.2012 в 13:34.
)
hello guys here is the code of my whisper cmd
i want that when someone whispers level 6+ admin can hear that and it should be stored in whisper logs too. Thanks in advance.
Код:
CMD:w(playerid, params[])
{
new text[128], 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: /w [text]");
if(AntiAdv(playerid, params)) return 1;
format(string, sizeof(string), "%s Whispers: %s ", RPN(playerid), params);
SendNearbyMessage(playerid, 10, string, COLOR_ORANGE, COLOR_ORANGE, COLOR_ORANGE, COLOR_ORANGE, COLOR_ORANGE);
new log[256];
format(log, sizeof(log), "%s Whispers: %s", RPN(playerid), text);
Log("logs/whisper.log", log);
foreach(Player, i)
{
if(PlayerInfo[i][pAdmin] >= 6 && Whispers[i] && i != playerid)
{
format(log, sizeof(log), "[WHISPER] %s : %s", RPN(playerid), text);
SendClientMessage(i, COLOR_YELLOW, log);
}
}
return 1;
}


