IP & PING Retruns me same ping as player which executes the command
#4

pawn Code:
CMD:ip(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 3)
    {
        new target;
        if(sscanf(params, "u", target)) return SendClientMessage(playerid, COLOR_ORANGE, "[*] Usage: /ip [playerid/name]");
        else if(target == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_ORANGE, "[*] Enter a valid player ID/name!");
        new ip[16], name[MAX_PLAYER_NAME], string[100];
        GetPlayerName(target, name, MAX_PLAYER_NAME);
        GetPlayerIP(target, ip, sizeof(ip));
        format(string, 100, "|- %s[%d]'s IP: %s -|", name, target, ip);
        SendClientMessage(playerid, 0x33AA33AA, string);
    }
    else return SendClientMessage(playerid, 0xFF0000AA, "You cannot use this command!");
    return 1;
}
Reply


Messages In This Thread
IP & PING Retruns me same ping as player which executes the command - by MiGu3X - 29.03.2013, 22:43
Re: IP & PING Retruns me same ping as player which executes the command - by MarkoN - 29.03.2013, 22:52
Re: IP & PING Retruns me same ping as player which executes the command - by zxc1 - 29.03.2013, 22:58
Re: IP & PING Retruns me same ping as player which executes the command - by kamzaf - 30.03.2013, 01:11

Forum Jump:


Users browsing this thread: 1 Guest(s)