05.10.2012, 10:14
pawn Код:
#include "a_samp.inc"
#include "zcmd.inc"
#include "sscanf2.inc"
public OnPlayerConnect(playerid) {
static file[30], name[24];
format(file, 30, "%s.ban", (GetPlayerName(playerid, name, 24), name));
if(fexist(file))
return Kick(playerid);
return 1;
}
cmd(ban, playerid, params[]) {
static id;
if(sscanf(params, #u, id))
return 1;
if(!IsPlayerConnected(id))
return 1;
static file[30], name[24];
format(file, 30, "%s.ban", (GetPlayerName(playerid, name, 24), name));
fclose(fopen(file, io_write));
return Kick(id);
}