07.01.2010, 11:06
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;
}
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;
}

