Help with kick command
#1

I am trying to make kick command that kicks all online players with .... ip.

Код:
CMD:kip(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] == 6)
	{
	    new ip[32], inputip;
	    if(sscanf(params, "s[32]", inputip)) return SendClientMessage(playerid, WHITE, "USAGE:/kip [IP]");
	    for(new p=0; p<MAX_PLAYERS; p++)
		{
	    	if(IsPlayerConnected(p))
	    	{
				GetPlayerIp(p, ip, sizeof(ip));
				if(strcmp(inputip, ip, true))       <==== Argument type mistmach 1
				{
				    Kick(p);
				}
			}
		}
		new str[128], adname[MAX_PLAYER_NAME];
		GetPlayerName(playerid, adname, sizeof(adname));
		format(str, sizeof(str), "ADMIN %s kick all players with IP: %s", adname, inputip);
		SendClientMessageToAll(RED, str);
		
	}
	else return SendClientMessage(playerid, RED, "You are not a admin!");
	return 1;
}
Reply


Messages In This Thread
Help with kick command - by Stoyanov - 02.03.2015, 10:11
Re: Help with kick command - by ATGOggy - 02.03.2015, 10:23
Re: Help with kick command - by JeaSon - 02.03.2015, 10:28
Re: Help with kick command - by ATGOggy - 02.03.2015, 10:29
Re: Help with kick command - by CalvinC - 02.03.2015, 10:35
Re: Help with kick command - by Stoyanov - 02.03.2015, 10:39
Re: Help with kick command - by Stoyanov - 02.03.2015, 10:48
Re: Help with kick command - by ATGOggy - 02.03.2015, 10:59
Re: Help with kick command - by CalvinC - 02.03.2015, 11:00
Re: Help with kick command - by Stoyanov - 02.03.2015, 11:19

Forum Jump:


Users browsing this thread: 1 Guest(s)