11.02.2018, 06:15
Hi,
I've made a getinfo command for admins, the only problem is when I write an ID (doesn't matter who's, mine or someone else's) It won't show, nothing happens!
I've made a getinfo command for admins, the only problem is when I write an ID (doesn't matter who's, mine or someone else's) It won't show, nothing happens!
Код:
CMD:getinfo(playerid, params[]) { if(connected[playerid] == true) return GameTextForPlayer(playerid, "~r~Spawn First", 5000, 5); if(pInfo[playerid][Admin] < 2) return SendClientMessage(playerid, -1, "{C3C3C3}(INFO) You don't have the priviliges to use this command."); { new str[500], target; new ip[16], country[32], isp[32], city[32]; if(sscanf(params, "u", target)) return SendClientMessage(playerid, -1, "{c3c3c3}(INFO) /getinfo [id]"); if(pInfo[playerid][Admin] == 1) { GetPlayerIp(target, ip, 16); GetIPCountry(ip, country, sizeof country); GetIPISP(ip, isp, sizeof isp); GetIPCity(ip, city, sizeof city); GetPlayerIp(target,ip,sizeof(ip)); format(str,sizeof(str), "Player Information\nName: {EFB509}%s(ID:%d)\nIP: {EFB509}%s\nCountry: {EFB509}%s\nCity: {EFB509}%s\nISP: {EFB509}%s",RealName[target], playerid, ip, country, city, isp); ShowPlayerDialog(playerid, 1029, DIALOG_STYLE_MSGBOX, "info",str, "Ok",""); } } return 1; }