04.06.2015, 22:54
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
pawn code :
Код:
!kick -ChanServ- Insufficient parameters for KICK. -ChanServ- Syntax: KICK <#channel> <nickname> [reason]
Код:
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; }