IRC problem
#1

Hi guys I created IRC system but I have a problem i try to !kick someone , but I can only kick a person who is online in IRC so i want to kick a player in-game

Код:
!kick
-ChanServ- Insufficient parameters for KICK.
-ChanServ- Syntax: KICK <#channel> <nickname> [reason]
pawn code :

Код:
IRCCMD:kick(botid, channel[], user[], host[], params[])
{
	// Check if the user is at least a halfop in the channel
	if (IRC_IsHalfop(botid, channel, user))
	{
		new playerid, reason[64];
		// Check if the user at least entered a player ID
		if (sscanf(params, "dS(No reason)[64]", playerid, reason))
		{
			return 1;
		}
		// Check if the player is connected
		if (IsPlayerConnected(playerid))
		{
			// Echo the formatted message
			new msg[128], name[MAX_PLAYER_NAME];
			GetPlayerName(playerid, name, sizeof(name));
			format(msg, sizeof(msg), "02*** %s has been kicked by %s on IRC. (%s)", name, user, reason);
			IRC_GroupSay(groupID, channel, msg);
			format(msg, sizeof(msg), "*** %s has been kicked by %s on IRC. (%s)", name, user, reason);
			SendClientMessageToAll(0x0000FFFF, msg);
			// Kick the player
			Kick(playerid);
		}
	}
	return 1;
}
Reply


Messages In This Thread
IRC problem - by RedCode - 04.06.2015, 22:54
Re: IRC problem - by Bingo - 04.06.2015, 23:28
Re: IRC problem - by RedCode - 04.06.2015, 23:33
Re: IRC problem - by RedCode - 04.06.2015, 23:37
Re: IRC problem - by Bingo - 04.06.2015, 23:40
Re: IRC problem - by Translator - 04.06.2015, 23:40
Re: IRC problem - by Vince - 04.06.2015, 23:42
Re: IRC problem - by RedCode - 04.06.2015, 23:46
Re: IRC problem - by RedCode - 04.06.2015, 23:48
Re: IRC problem - by RedCode - 04.06.2015, 23:52

Forum Jump:


Users browsing this thread: 1 Guest(s)