28.08.2011, 20:23
(
Last edited by Speed; 29/08/2011 at 08:45 PM.
)
pawn Code:
CMD:unban(playerid, params[])
{
new string, gstring[128];
if(sscanf(params,"us[128]",string,gstring)) return Use(playerid, "/unban [name] [reason]");
else if(PlayerInfo[playerid][pAdmin] < 2)return SendAdmin(playerid, "You are not Admin!");
format(gstring,128,"{FCFCFC}Admin {EE0000}%s {FCFCFC}has unban {EE0000}%s {FCFCFC},Reason:{EE0000} %s",PlayerName(playerid),string,gstring);
SendClientMessageToAll(0xFF0000AA, gstring);
PlayerInfo[string][pBan] = 0;
new uFile[35];
format(uFile, 35, USER_FILE, PlayerName(string));
new INI:playerFile = INI_Open(uFile);
INI_WriteInt(playerFile,"Ban",0);
INI_Close(playerFile);
return 1;
}
CMD:ban(playerid, params[])
{
new player, string[128];
if(sscanf(params,"us[128]",player,string))return Use(playerid, "/ban [ime/ID] [razlog]");
else if(PlayerInfo[playerid][pAdmin] < 2)return SendAdmin(playerid, "You not admin!");
format(string,128,"{FCFCFC}Admin {EE0000}%s {FCFCFC}has ban {EE0000}%s {FCFCFC}Reason:{EE0000} %s",PlayerName(playerid),PlayerName(player),string);
SendClientMessageToAll(0xFF0000AA, string);
PlayerInfo[player][pBan] = 1;
new uFile[35];
format(uFile, 35, USER_FILE, PlayerName(player));
new INI:playerFile = INI_Open(uFile);
INI_WriteInt(playerFile,"Ban",1);
INI_Close(playerFile);
Kick(player);
return 1;
}