21.02.2012, 19:36
Hi,
What's the better use Y_INI or original pawn for this check ban? (Call when the player connect in the server.)
Bans.txt is a file with many names, no key = val. so... original pawn is the best?
thanks
What's the better use Y_INI or original pawn for this check ban? (Call when the player connect in the server.)
Bans.txt is a file with many names, no key = val. so... original pawn is the best?
Код:
stock Ban(playerid)
{
GetPlayerName(playerid,player,sizeof(player));
file = fopen("Bans.txt",io_read);
if (file)
{
while(fread(file,open,sizeof(open)))
{
if (strfind(open, player, true) != -1)
{
SendClientMessage(playerid, ADMIN_RED, "You'r ban");
fclose(open);
Kick(playerid);
return 1;
}
}
}
fclose(file);
return true;
}

