22.08.2012, 11:02
You have to include that on the top of your script then..
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);
// like this
new szCountry[ 20 ];
GetPlayerCountry( playerid, szCountry, sizeof( szCountry ) );
SendClientMessageEx( playerid, COLOR_WHITE, szCountry );
}
else SendClientMessageEx(playerid, COLOR_GRAD1, "Invalid player specified.");
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
}
return 1;
}