Range Banning! Help please.
#1

Hey, I've made a Range Ban command which looks like this:
pawn Код:
dcmd_suspendrange(playerid,params[])
{
  if(PlayerInfo[playerid][pAdmin] < 2) return 1;
  new ip[128],string[128],pName[MAX_PLAYER_NAME],reason;
  if(sscanf(params,"sz",ip,reason)) return SendClientMessage(playerid,COLOR_GREY,".: Usage: /suspendrange [range (123.123.*.*)] [reason] :.");
  GetPlayerName(playerid,pName,sizeof(pName));
  format(string,sizeof(string),"..: %s BANNED Range %s. Reason: %s :..",pName,ip,reason);
  SendClientMessageToAll(COLOR_DARKRED,string);
  print(string);
  dini_IntSet("CLRP/RangeBans.ban",ip,1);
  return 1;
}
And this is supposed to check if the player is banned on connect:

pawn Код:
stock RangeBanCheck(playerid)
{
  new pIP[256];
  GetPlayerIp(playerid,pIP,sizeof(pIP));
  new pName[MAX_PLAYER_NAME];
  GetPlayerName(playerid,pName,sizeof(pName));
  if(dini_Int("CLRP/RangeBans.ban",pIP) == 1)
  {
        new server[256];
        format(server,sizeof(server),".: Server kicked %s, RANGE BANNED! :.",pName);
        SendClientMessageToAll(COLOR_DARKRED, server);
        Kick(playerid);
    }
    return 1;
}
First of all, the /suspendrange REASON shows the first letter and then the playername who banned the range...

/imageshack/img24/567/samp003kc.png

And Second of all. When I connect to the server with my range banned, it doesn't kick me and says RANGE BANNED with big letters...


Help please =)
Reply


Messages In This Thread
Range Banning! Help please. - by introzen - 05.01.2010, 15:20
Re: Range Banning! Help please. - by introzen - 05.01.2010, 20:50
Re: Range Banning! Help please. - by GTAguillaume - 05.01.2010, 21:01
Re: Range Banning! Help please. - by Cueball - 06.01.2010, 01:05
Re: Range Banning! Help please. - by introzen - 06.01.2010, 02:19
Re: Range Banning! Help please. - by introzen - 06.01.2010, 02:24
Re: Range Banning! Help please. - by introzen - 06.01.2010, 02:53
Re: Range Banning! Help please. - by [HiC]TheKiller - 06.01.2010, 03:00
Re: Range Banning! Help please. - by introzen - 06.01.2010, 04:00
Re: Range Banning! Help please. - by dice7 - 06.01.2010, 05:35

Forum Jump:


Users browsing this thread: 1 Guest(s)