/ip gives error, /mute doesn't works correctly
#3

At the On IsPlayerConnected part, you put an ! at the IsPlayerConnected, which caused the error.

pawn Code:
CMD:ip(playerid, params[])
{
    new target;
    if(PlayerInfo[playerid][pAdmin] >=3)
    {
        if (IsPlayerConnected(target))
        {
            if(sscanf(params, "u", target)) return SendClientMessage(playerid, DEEPPINK, "USAGE: /ip <id>");
            {
                new tname[MAX_PLAYER_NAME];
                GetPlayerName(target, tname, sizeof(tname));
                new pstr[128];
                new tping = GetPlayerIp(target, pstr, sizeof(pstr));
                format(pstr, sizeof(pstr), "{FFFFFF}%s's {00FF66}IP {FFFFFF}is:{00FF66}%s", tname, tping);
                SendClientMessage(playerid, -1, pstr);
                return 1;
            }
        }
        else return SendClientMessage(playerid, DEEPPINK, "ERROR: Player is not connected.");
    }
    else return SendClientMessage(playerid, DEEPPINK, "ERROR: You must be level 3 to use that command!");
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)