Ban command help please.
#7

pawn Код:
stock BanCheck(playerid)
{
new pName[MAX_PLAYER_NAME], string[128];// defines variables
GetPlayerName(playerid,pName,sizeof(pName));// sizes off the name
format(pName, 128, "BANNED %s", pname);// Why do you change pName to this?
new File:check = fopen("CLRP/Bans.ban", io_read);// opens and reads the file given
while(fread(check, string))// while loop
{
  if(!strcmp(string,pName)) return 1;// if strcmp doesn't find a truth to the statement - return 1
new server[256];// defines a string with a ridiculously large cell ammount
format(server,sizeof(server),".: Server kicked %s, Account BANNED! :.",pName);
SendClientMessageToAll(COLOR_DARKRED, server);
Kick(playerid);
}
return 1;
}
now if you haven't noticed what is wrong, here:

pawn Код:
stock BanCheck(playerid)
{
new pName[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid,pName,sizeof(pName));
format(string, sizeof(string), "BANNED %s", pname);
new File:check = fopen("CLRP/Bans.ban", io_read);
while(fread(check, string))
{
  if(!strfind(string)) return 1;
new server[38 + MAX_PLAYER_NAME];
format(server,sizeof(server),".: Server kicked %s, Account BANNED! :.",pName);
SendClientMessageToAll(COLOR_DARKRED, server);
Kick(playerid);
}
return 1;
}
Hope it works
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)