/hc help
#4

Код:
CMD:hc(playerid, params[])
{
    new string[128];
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(!PlayerInfo[playerid][pHelper] && !PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
    if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /hc [text]");
    if(AntiAdv(playerid, params)) return 1;
    if(PlayerInfo[playerid][pHelper] || PlayerInfo[playerid][pAdmin]) format(string, sizeof(string), "** %s %s: %s", RPHLN(playerid), RPN(playerid), params);
    foreach(Player, i)
    {
        if(IsPlayerLoggedIn(i))
        {
            if(PlayerInfo[i][pHelper] || PlayerInfo[i][pAdmin])
            {
                SendClientMessage(i, COLOR_LIME, string);
            }
        }
    }
    // Logs
    if(PlayerInfo[playerid][pHelper] && !PlayerInfo[playerid][pAdmin]) format(string, sizeof(string), "*%s %s: %s", RPHLN(playerid), RPN(playerid), params);
    else if(!PlayerInfo[playerid][pHelper] && PlayerInfo[playerid][pAdmin])format(string, sizeof(string), "*%s %s: %s", RPALN(playerid), RPN(playerid), params);
    Log("logs/helperchat.log", string);
    return 1;
}
Reply


Messages In This Thread
/hc help - by lulo356 - 14.04.2014, 21:54
Re: /hc help - by RenSoprano - 14.04.2014, 22:09
Re: /hc help - by lulo356 - 14.04.2014, 22:23
Re: /hc help - by GloomY - 15.04.2014, 00:35

Forum Jump:


Users browsing this thread: 3 Guest(s)