24.10.2017, 03:37

How i can get that code into my script?
PHP код:
public OnLookupResponse(sessionid, response, data[])
{
new xml[5][2],
playerid = GetPlayerFromSession(sessionid);
if(playerid == -1) return 1;
if(response != 200)
{
if(Retry[playerid] == 0)
{
Retry[playerid] = 1;
LookupPlayerIP(playerid);
}
return 1;
}
xml[0][0] = strfind(data, "<host>", true);
xml[0][1] = strfind(data, "</host>", true);
xml[1][0] = strfind(data, "<isp>", true);
xml[1][1] = strfind(data, "</isp>", true);
xml[2][0] = strfind(data, "<code>", true);
xml[2][1] = strfind(data, "</code>", true);
xml[3][0] = strfind(data, "<country>", true);
xml[3][1] = strfind(data, "</country>", true);
xml[4][0] = strfind(data, "<region>", true);
xml[4][1] = strfind(data, "</region>", true);
strmidex(LookupData[playerid][Hostname], data, 6 + xml[0][0], xml[0][1], 60);
strmidex(LookupData[playerid][ISP], data, 5 + xml[1][0], xml[1][1], 60);
strmidex(LookupData[playerid][Code], data, 6 + xml[2][0], xml[2][1], 3);
strmidex(LookupData[playerid][Country], data, 9 + xml[3][0], xml[3][1], 40);
strmidex(LookupData[playerid][Region], data, 8 + xml[4][0], xml[4][1], 40);
LookupData[playerid][Proxy] = strval(data[strfind(data, "<proxy>", true) + 7]);
CallLocalFunction("OnLookupComplete", "i", playerid);
return 1;
}

