05.01.2010, 15:20
Hey, I've made a Range Ban command which looks like this:
And this is supposed to check if the player is banned on connect:
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 =)
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;
}
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;
}
/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 =)