What's wrong with Kick ?
#1

Hey,
I got this function which suddenly stopped working:
pawn Код:
//OnPlayerConnect
if(CheckPlayerName(plName)==0)
  {
        ErrorMsg(playerid,"Didn't you noticed that this is a ROLEPLAY server??");
        KickPlayer(playerid,"Non-RP name!","Your name must be in FirstName_LastName format!");

  }

stock KickPlayer(playerid,reason1[128],reason2[256],kickerid=-255)
{
      if(IsPlayerConnected(playerid))
        {
            SendClientMessage(playerid,COLOR_ERROR,"____________________________________________________________");
            if(kickerid != -255)
            {
        SendFMessageToAll(COLOR_ERROR,"%s has been kicked by %s",pName[playerid],pName[kickerid]);
            }
            else
            {
                SendFMessageToAll(COLOR_ERROR,"%s has been kicked!",pName[playerid]);
            }
            new str[512];
            format(str,512,"Reason: %s",reason1);
            SendClientMessageToAllEx(playerid,COLOR_ERROR,str);
            SendFMessage(playerid,COLOR_ERROR,"Reason: %s",reason2);
            SendClientMessage(playerid,COLOR_ERROR,"____________________________________________________________");
            Kick(playerid); // THIS SHOULD KICK THE PLAYER
      }
}
Player get's all messages ("You have been kicked...") but it doesn't get's kicked... I have to kick them manually using /kick command (it works perfectly), which uses the same Kick(id);
Reply


Messages In This Thread
What's wrong with Kick ? - by SiJ - 25.01.2010, 04:57
Re: What's wrong with Kick ? - by SiJ - 25.01.2010, 14:39
Re: What's wrong with Kick ? - by -Rebel Son- - 25.01.2010, 20:04
Re: What's wrong with Kick ? - by KnooL - 25.01.2010, 20:12
Re: What's wrong with Kick ? - by SiJ - 26.01.2010, 08:59
Re: What's wrong with Kick ? - by Calgon - 26.01.2010, 09:33
Re: What's wrong with Kick ? - by SiJ - 26.01.2010, 09:42
Re: What's wrong with Kick ? - by Calgon - 26.01.2010, 09:44
Re: What's wrong with Kick ? - by SiJ - 26.01.2010, 10:52
Re: What's wrong with Kick ? - by Calgon - 27.01.2010, 11:18

Forum Jump:


Users browsing this thread: 1 Guest(s)