[Tutorial] PAWN Beginners: Creating IRC Commands
#2

Instead of the command being kickid1 you could bring in sscanf and use sscanf to do it so like

PHP Code:
 IRCCMD:kickid(botidchannel[], user[], host[], params[])
{
   new 
PID;
   
GetPlayerName(PIDplayernamesizeof(playername));
   if(
sscanf(params"u"PID) return SendClientMessage(playerid, -1"USAGE: /kickid [playerid]);
   if(!IsPlayerConnected(PID)) return SendClientMessage(playerid, -1, "
Player is not connected); 
   if (
IRC_IsOp(botidchanneluser)) 
   {
   
SendClientMessage(1,-1," You were removed from the server by %s from the IRC"user);
   
Kick(PID);
   new 
string[128];
   
format(msgsizeof(string), "**NOTICE: %s has kicked %s out of the server**"user,playername); // This is to announce it to the  in IRC
   
Say(channel,string);
   
format(msgsizeof(string), "**NOTICE:%s has been kicked by %s from the server IRC**"playername,user);
   
SendMessageToAll(-1string);
   }
   return 
1;

I have no idea if that works but it might and it will kick what ever player/id you type hopefully
Reply


Messages In This Thread
PAWN Beginners: Creating IRC Commands - by ZombieNest - 15.06.2014, 19:55
Re: PAWN Beginners: Creating IRC Commands - by DaleWestbrook - 16.06.2014, 10:17
Re: PAWN Beginners: Creating IRC Commands - by iZN - 16.06.2014, 10:25
Re: PAWN Beginners: Creating IRC Commands - by RajatPawar - 16.06.2014, 10:30

Forum Jump:


Users browsing this thread: 1 Guest(s)