/ipcheck problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /ipcheck problem (
/showthread.php?tid=414423)
/ipcheck problem -
Mr.1337 - 09.02.2013
I am using GEOInfo include, when I get ingame and type /ipcheck I get a weird thing, screenshot will make you understand what I mean
pawn Code:
CMD:ipcheck(playerid, params[])
{
new playerb, string[128];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
if(!aDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not on admin duty.");
if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /ipcheck [playerid]");
if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
format(string, sizeof(string), "{FF9900}Name: {FFFFFF}%s {FF9900}| IP: {FFFFFF}%s | Country: {FFFFFF}%s | City: {FFFFFF}%s", RPN(playerb), RPIP(playerb), GetPlayerCountry(playerid), GetPlayerCity(playerid));
SendClientMessage(playerid, COLOR_ORANGE, string);
return 1;
}
And before I added the "GetPlayerCountry and GetPlayerCity" the command used to work perfect, please help me out.
Re: /ipcheck problem -
Neil. - 09.02.2013
pawn Code:
CMD:ipcheck(playerid, params[])
{
new id, string[128];
new ip[24];
new name[MAX_PLAYER_NAME];
new country[50];
new city[24];
GetPlayerCountry(id, country, sizeof(country));
GetPlayerCity(id, city, sizeof(city));
GetPlayerIp(id, ip, sizeof(ip));
GetPlayerName(id,name,sizeof(name));
if(!IsPlayerLoggedIn(id)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
if(!aDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not on admin duty.");
if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /ipcheck [playerid]");
if(!IsPlayerLoggedIn(id)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
format(string, sizeof(string), "{FF9900}Name: {FFFFFF}%s {FF9900}| IP: {FFFFFF}%s | Country: {FFFFFF}%s | City: {FFFFFF}%s", name, ip, country, city);
SendClientMessage(playerid, COLOR_ORANGE, string);
return 1;
}
Re: /ipcheck problem -
Mr.1337 - 09.02.2013
Quote:
Originally Posted by Ken97
pawn Code:
CMD:ipcheck(playerid, params[]) { new id, string[128]; new ip[24]; new name[MAX_PLAYER_NAME]; new country[50]; new city[24]; GetPlayerCountry(id, country, sizeof(country)); GetPlayerCity(id, city, sizeof(city)); GetPlayerIp(id, ip, sizeof(ip)); GetPlayerName(id,name,sizeof(name)); if(!IsPlayerLoggedIn(id)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); if(!aDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not on admin duty."); if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /ipcheck [playerid]"); if(!IsPlayerLoggedIn(id)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id."); format(string, sizeof(string), "{FF9900}Name: {FFFFFF}%s {FF9900}| IP: {FFFFFF}%s | Country: {FFFFFF}%s | City: {FFFFFF}%s", name, ip, country, city); SendClientMessage(playerid, COLOR_ORANGE, string); return 1; }
|
Country and City doesn't appear, for example I get this IG:
Name: Mr.1337 | IP:blabla.blabla.blabla | Country: | City:
Re: /ipcheck problem -
Scenario - 09.02.2013
Are you running this on your localhost?
If so, try running it on a hosted server somewhere.
Re: /ipcheck problem -
Mr.1337 - 09.02.2013
Quote:
Originally Posted by RealCop228
Are you running this on your localhost?
If so, try running it on a hosted server somewhere.
|
I'm running it on volt host.
Re: /ipcheck problem -
Mr.1337 - 10.02.2013
BUMP!