/hc help
#1

If you are a admin, and not a helper, you cant talk in the /hc, well you can but its not showing the text.
pawn Код:
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
#2

&& mean that you need to be helper and admin to use this command you can use || this mean you need to be helper or admin
Reply
#3

Quote:
Originally Posted by RenSoprano
Посмотреть сообщение
&& mean that you need to be helper and admin to use this command you can use || this mean you need to be helper or admin
Alright, let me check <3
Reply
#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


Forum Jump:


Users browsing this thread: 3 Guest(s)