03.05.2014, 19:23
pawn Код:
CMD:aunban(playerid,params[])
{
new stringa[128], nomep[34];
format(stringa,sizeof(stringa),"{FF0000}[SERVER]**{FFFFFF}You can't use this command, level so low or you aren't an admin");
if(pinfo[playerid][adminlevel] < 4) return SendClientMessage(playerid,-1,stringa);
format(stringa,sizeof(stringa),"{FF0000}[SERVER]**{FFFFFF}Use: /aunban [playername]");
if(sscanf(params,"s[34]",nomep)) return SendClientMessage(playerid,-1,stringa);
format(stringa,128,"utenti/%s.ini",nomep);
if(fexist(stringa))
{
format(stringa,128,"utenti/%s.ini",nomep);
new INI:file = INI_Open(stringa);
INI_RemoveEntry(file,"bannato");
INI_Close(file);
format(stringa,128,"{FF0000}[SERVER]**{FFFFFF}You have unbanned the player: %s",nomep);
SendClientMessage(playerid, -1, stringa);
}
else
{
format(stringa,128,"{FF0000}[SERVER]**{FFFFFF}This player don't exist in our database");
SendClientMessage(playerid, -1, stringa);
}
return 1;
}