15.01.2017, 12:02
Hey,
i was thinking to use the lookup script, thus i found emmet's include, but its no longer available nor his api is available, so i am using this one: https://sampforum.blast.hk/showthread.php?tid=607276
I've made a small script, filterscript, i used the function without the callback onlookup complete, and the dialog did not show anything, (no data), but when i used the onlookupcomplete callback, it spammed the shit & did not show anything, here's the script:
What did i do wrong? when i use /stalk, even without id, it shows this:
i was thinking to use the lookup script, thus i found emmet's include, but its no longer available nor his api is available, so i am using this one: https://sampforum.blast.hk/showthread.php?tid=607276
I've made a small script, filterscript, i used the function without the callback onlookup complete, and the dialog did not show anything, (no data), but when i used the onlookupcomplete callback, it spammed the shit & did not show anything, here's the script:
PHP код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#include <lookup>
#define cgreen "{8FFF8B}"
#define cadmin "{ff0cd0}"
#define cred "{FF0000}"
CMD:stalk(playerid, params[])
{
new country[60], region[80], city[60], isp[80], timezone[20], zipcode[10], id;
if(sscanf(params, "i", id)) return SendClientMessage(playerid, -1, "Usage: /stalk <playerid>");
GetPlayerCountry(id, country, sizeof(country));
GetPlayerRegion(id, region, sizeof(region));
GetPlayerCity(id, city, sizeof(city));
GetPlayerISP(id, isp, sizeof(isp));
GetPlayerTimezone(id, timezone, sizeof(timezone));
GetPlayerZipcode(id, zipcode, sizeof(zipcode));
new str[1000], pname[24], idname[24];
GetPlayerName(id, idname, 24);
GetPlayerName(playerid, pname, 24);
format(str, sizeof(str), "\t"cadmin"Showing information for player: %s(%i) Requested by:%s(%i)\n\n", idname, id, pname, playerid);
format(str, sizeof(str), "%s "cred"Player Country: "cgreen"%s\n"cred"Player Region: "cgreen"%s\n"cred"Player City: "cgreen"%s\n ",str, country, region, city);
format(str, sizeof(str), "%s "cred"Player ISP: "cgreen"%s\n"cred"Player Timezone: "cgreen"%s\n"cred"Player zipcode: "cgreen"%s\n\n "cadmin"*Provided information MAY NOT be 100% accurate!",str, isp, timezone, zipcode);
ShowPlayerDialog(playerid, 105, DIALOG_STYLE_MSGBOX, "Player Information", str, "Okay", "");
return 1;
}
public OnLookupComplete(playerid){
return 1;
}
Quote:
[13:51:49] Filterscript 'lookup.amx' loaded. [13:51:49] Optimus_Prime (1: {FFFFFF}i fucking lost 18 millions [13:51:58] Usage: /stalk <playerid> [13:51:58] gzswcb (83) has joined the server. [13:52:00] [DEBUG] LookUpCompleted! [13:52:00] [DEBUG] LookUpCompleted! [13:52:00] [DEBUG] LookUpCompleted! [13:52:00] [DEBUG] LookUpCompleted! [13:52:00] [DEBUG] LookUpCompleted! [13:52:01] [DEBUG] LookUpCompleted! [13:52:01] [DEBUG] LookUpCompleted! [13:52:01] [DEBUG] LookUpCompleted! [13:52:01] [DEBUG] LookUpCompleted! [13:52:02] [DEBUG] LookUpCompleted! [13:52:02] [DEBUG] LookUpCompleted! [13:52:14] [DEBUG] LookUpCompleted! [13:52:21] Filterscript 'lookup.amx' unloaded. |