/ipcheck problem [help me]
#2

Code:
CMD:ipcheck(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] >= 1)
			  return SendClientMessage(playerid, COLOR_GRAD1, "You're not authorized to use that command!");
			  
	if(AdminDuty[playerid] != 1 && PlayerInfo[playerid][pAdmin] < 5)
  			return SendClientMessage(playerid,COLOR_WHITE, "You're not on-duty as admin. To access your admin commands you must be on-duty. Type /aduty to go on-duty.");
  			
	new string[128], giveplayerid;
	if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /ipcheck [playerid/partofname]");

	if(giveplayerid == INVALID_PLAYER_ID)
                  return SendClientMessage(playerid, COLOR_WHITE, "Player not connected!");
                  
	if(IsPlayerConnected(giveplayerid))
	{
		new playerip[32], country[64], city[64];
		GetPlayerIp(giveplayerid, playerip, sizeof(playerip));
		GetIPCountry(playerip, country, 64);
		GetIPCity(playerip, city, 64);
		format(string, sizeof(string), "ID: %d - Name: %s - IP: %s - Country: %s - City: %s", giveplayerid, GetPlayerNameEx(giveplayerid), playerip, country, city);
		SendClientMessage(playerid, COLOR_WHITE, string);
	}
	return 1;
}
try this...! I will check out the ban code.
Reply


Messages In This Thread
/ipcheck problem [help me] - by Loudinest - 30.03.2018, 05:32
Re: /ipcheck problem [help me] - by UFF - 30.03.2018, 05:50
Re: /ipcheck problem [help me] - by Loudinest - 30.03.2018, 06:16
Re: /ipcheck problem [help me] - by Abagail - 30.03.2018, 06:23
Re: /ipcheck problem [help me] - by UFF - 30.03.2018, 06:31
Re: /ipcheck problem [help me] - by MadeMan - 30.03.2018, 14:17

Forum Jump:


Users browsing this thread: 1 Guest(s)