05.01.2015, 09:46 
	
	
	
		sorry im posting again about this,i just wanted how to fix it.
my CMD /unban is not working,i use it for who players get banned but it is saying
"Not In the database"
	
	
	
	
my CMD /unban is not working,i use it for who players get banned but it is saying
"Not In the database"
Код:
CMD:unban(playerid, params[])
{
	LoginCheck(playerid);
	if(User[playerid][accountAdmin] >= 2)
	{
	    new
			string[150],
			Account[24],
			DBResult:Result,
			Query[129],
			fIP[30]
		;
		if(sscanf(params, "s[24]", Account)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /unban [account name]");
	    format(Query, 129, "SELECT  FROM `bans` WHERE `username` = '%s'", Account);
		Result = db_query(Database, Query);
		if(db_num_rows(Result))
		{
        	db_get_field_assoc(Result, "ip", fIP, 30);
			if(CheckBan(fIP))
			{
				RemoveBan(fIP);
			}
	        format(Query, 129, "DELETE FROM `bans` WHERE `username` = '%s'", Account);
		    Result = db_query(Database, Query);
	        db_free_result(Result);
			format(string, sizeof string, "[UNBANNED] "white"%s has been unbanned by an admin.", Account);
			SendPlayerMessage(COLOR_ORANGE, string);
			format(string, sizeof string, "[UNBANNED] "white"%s has been unbanned by %s.", Account, GetName(playerid));
			SendAMessage(COLOR_ORANGE, string);
			format(string, sizeof string, "[UNBANNED] %s has been unbanned by %s.", Account, GetName(playerid));
		    Log("ban.txt", string);
		}
		else
		{
		    db_free_result(Result);
		    SendClientMessage(playerid, -1, "» "red"Player is not in the banned database.");
		    return 1;
		}
	}
	else
	{
	    SendClientMessage(playerid, -1, "» "red"You are not authorized to use this command.");
	}
	return 1;
}


