22.10.2015, 07:25
That will just get your own IP every time, and is missing the [number] at the end of "ip" (which is a string).
Take mine:
Indentation is screwed because of the forum.
Also, I can't help but notice your signature: "Scripting for money , except Mysql and textdraws , I can script everything." This GetIP command is pretty basic...
Take mine:
Код:
CMD:getip(playerid, params[]) { new ip[16], ID, string[128]; if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, -1, "No permissions"); if(sscanf(params, "u", ID)) SendClientMessage(playerid, -1, "/getip [name/playerid]"); if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, -1, "Invalid player"); GetPlayerIp(ID, ip, sizeof(ip)); format(string, sizeof(string),"%s[%i] gets IP of %s[%i]. IP: %s", GetName(playerid), playerid, GetName(ID), ID, ip); SendClientMessage(playerid, -1, string); return 1; }
Also, I can't help but notice your signature: "Scripting for money , except Mysql and textdraws , I can script everything." This GetIP command is pretty basic...