22.08.2012, 10:51
ok i have this cmd
can someone edit it so like i do it but underneath the ip it gives the location such as philipines or whatever?
pawn Код:
CMD:ipcheck(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
new string[128], giveplayerid;
if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /ipcheck [playerid]");
if(giveplayerid == INVALID_PLAYER_ID) return 1;
if(IsPlayerConnected(giveplayerid))
{
new playerip[32];
GetPlayerIp(giveplayerid, playerip, sizeof(playerip));
format(string, sizeof(string), "(ID: %d) - (Name: %s) - (IP: %s)", giveplayerid, GetPlayerNameEx(giveplayerid), playerip);
SendClientMessageEx(playerid, COLOR_WHITE, string);
}
else SendClientMessageEx(playerid, COLOR_GRAD1, "Invalid player specified.");
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
}
return 1;
}