Help in this command. - 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: Help in this command. (
/showthread.php?tid=535000)
Help in this command. -
krytans - 01.09.2014
pawn Код:
CMD:oipcheck(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 3)
{
if(!sscanf(params, "s[64]", tmp))
{
new dotcount = 0;
for(new i = 0; i < strlen(tmp); i++)
{
if(tmp[i] == '.') dotcount++;
}
if(dotcount == 3)
{
new link[256];
format(ipchecking[playerid], 24, "%s", tmp);
format(link, sizeof(link), "api.ipinfodb.com/v3/ip-city/?key=********&ip=%s", tmp);
HTTP(playerid, HTTP_GET, link, "", "IPCheckResponse");
}
else
{
format(ipchecking[playerid], 24, "%s", tmp);
strcat(tmp, ".ini")
if(!fexist(tmp)) return SendClientMessage(playerid, COLOR_GRAD1, "That player does not exist.");
new link[256];
format(link, sizeof(link), "api.ipinfodb.com/v3/ip-city/?key=******&ip=%s", dini_Get(tmp, "IP"));
HTTP(playerid, HTTP_GET, link, "", "IPCheckResponse");
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /oipcheck [Player Name or IP]");
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use that command !");
}
return 1;
}
My user files are in scriptfiles/users folder where should i define that users folder.
Re: Help in this command. -
meitaredri - 01.09.2014
Код:
CMD:oipcheck(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 3)
{
if(!sscanf(params, "s[64]", tmp))
{
new dotcount = 0;
for(new i = 0; i < strlen(tmp); i++)
{
if(tmp[i] == '.') dotcount++;
}
if(dotcount == 3)
{
new link[256];
format(ipchecking[playerid], 24, "%s", tmp);
format(link, sizeof(link), "api.ipinfodb.com/v3/ip-city/?key=********&ip=%s", tmp);
HTTP(playerid, HTTP_GET, link, "", "IPCheckResponse");
}
else
{
format(ipchecking[playerid], 24, "%s", tmp);
strcat(tmp, ".ini")
if(!fexist(tmp)) return SendClientMessage(playerid, COLOR_GRAD1, "That player does not exist.");
new link[256];
format(link, sizeof(link), "api.ipinfodb.com/v3/ip-city/?key=******&ip=%s", dini_Get(tmp, "IP"));
HTTP(playerid, HTTP_GET, link, "", "IPCheckResponse");
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /oipcheck [Player Name or IP]");
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use that command !");
}
return 1;
}
Try this , +rep if I helped.
Re: Help in this command. -
krytans - 01.09.2014
What's the change in this?
Re: Help in this command. -
krytans - 01.09.2014
any one?