Minor erros for getIP CmD
#2

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:

Код:
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;
}
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...
Reply


Messages In This Thread
Minor erros for getIP CmD - by fuckingcruse - 22.10.2015, 07:06
Re: Minor erros for getIP CmD - by PrivatioBoni - 22.10.2015, 07:25
Re: Minor erros for getIP CmD - by fuckingcruse - 22.10.2015, 07:30
Re: Minor erros for getIP CmD - by PrivatioBoni - 22.10.2015, 07:33
Re: Minor erros for getIP CmD - by fuckingcruse - 22.10.2015, 07:35
Re: Minor erros for getIP CmD - by PrivatioBoni - 22.10.2015, 07:39
Re: Minor erros for getIP CmD - by fuckingcruse - 22.10.2015, 07:41
Re: Minor erros for getIP CmD - by PrivatioBoni - 22.10.2015, 07:42
Re: Minor erros for getIP CmD - by fuckingcruse - 22.10.2015, 07:43
Re: Minor erros for getIP CmD - by PrivatioBoni - 22.10.2015, 07:44

Forum Jump:


Users browsing this thread: 1 Guest(s)