hey guyz.....i need some help
#6

If you want to get his id just use tab, if you want his ip here's a command using sscanf
pawn Код:
CMD:getip(playerid, params[])
{
    if(Level[playerid] < 1) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: you are not level 1!"); //adminvaiable here

    new str[256], id, PlayerName[MAX_PLAYER_NAME];
    if(sscanf(params, "u", id))
    {
        SendClientMessage(playerid, 0xFF0000FF, "Usage: /getip [id]");
        return 1;
    }
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Player not connected");
    if(IsPlayerConnected(id))
    {

        GetPlayerName(id, PlayerName, sizeof(PlayerName));
        new ip[100];
        GetPlayerIp(id, ip, sizeof(ip));

        format(str, sizeof(str), "%s(%d) ip is: [%s]", PlayerName, playerid, ip);
        SendClientMessage(playerid, orange, str);



    }
    return 1;
}
Reply


Messages In This Thread
hey guyz.....i need some help - by _ELIX_ - 18.09.2011, 12:54
Re: hey guyz.....i need some help - by =WoR=Varth - 18.09.2011, 12:57
Re: hey guyz.....i need some help - by _ELIX_ - 18.09.2011, 12:58
Re: hey guyz.....i need some help - by =WoR=G4M3Ov3r - 18.09.2011, 13:03
Re: hey guyz.....i need some help - by =WoR=Varth - 18.09.2011, 13:03
Re: hey guyz.....i need some help - by brett7 - 18.09.2011, 13:15
Re: hey guyz.....i need some help - by _ELIX_ - 18.09.2011, 13:31
Re: hey guyz.....i need some help - by Kingunit - 18.09.2011, 13:34
Re: hey guyz.....i need some help - by Issam - 18.09.2011, 13:42
Re: hey guyz.....i need some help - by Davz*|*Criss - 18.09.2011, 13:44

Forum Jump:


Users browsing this thread: 2 Guest(s)