Ban command help please.
#10

pawn Код:
stock BanCheck(playerid)
{
    new pName[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid,pName,sizeof(pName));
    format(pName, 128, "BANNED %s", pName);//Because the name always has "BANNED" in front of it
    new File:check = fopen("CLRP/Bans.ban", io_read);
    while(fread(check, string))
    {
      if(!strcmp(string,pName)) return 1;
        new server[256];
        format(server,sizeof(server),".: Server kicked %s, Account BANNED! :.",pName);
        SendClientMessageToAll(COLOR_DARKRED, server);
        Kick(playerid);
    }
    return 1;
}
This kicks me when I join...

pawn Код:
stock BanCheck(playerid)
{
    new pName[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid,pName,sizeof(pName));
    format(pName, 128, "BANNED %s", pName);//Because the name always has "BANNED" in front of it
    new File:check = fopen("CLRP/Bans.ban", io_read);
    while(fread(check, string))
    {
      if(strcmp(string,pName)) return 1;
        new server[256];
        format(server,sizeof(server),".: Server kicked %s, Account BANNED! :.",pName);
        SendClientMessageToAll(COLOR_DARKRED, server);
        Kick(playerid);
    }
    return 1;
}
this doesn't kick me =/

Line in the Bans.ban file looks like this:

Код:
[2010/01/07 - 16:28:05] ..: Sarah_Johnson BANNED Daniel_Jackson. Reason: test :..
Reply


Messages In This Thread
Ban command help please. - by introzen - 06.01.2010, 22:58
Re: Ban command help please. - by pagie1111 - 07.01.2010, 02:47
Re: Ban command help please. - by introzen - 07.01.2010, 02:59
Re: Ban command help please. - by pagie1111 - 07.01.2010, 03:03
Re: Ban command help please. - by introzen - 07.01.2010, 03:55
Re: Ban command help please. - by bogeymanEST - 07.01.2010, 05:43
Re: Ban command help please. - by pagie1111 - 07.01.2010, 11:06
Re: Ban command help please. - by introzen - 07.01.2010, 15:08
Re: Ban command help please. - by Nakki - 07.01.2010, 15:14
Re: Ban command help please. - by introzen - 07.01.2010, 15:32

Forum Jump:


Users browsing this thread: 1 Guest(s)