10.02.2014, 09:08
Thank you !
I did this now it works:
But is it possible to optimize it ?
Thank you !
I did this now it works:
Код:
public OnEssaiUnban(playerid, nom[]) { new string[128], query[128]; if(!cache_get_row_count()) { SendClientMessage(playerid, Rouge, "Ce joueur n'existe pas !"); return 1; } mysql_format(mysql, query, sizeof(query), "SELECT * FROM `joueurs` WHERE `Bannis`='1' AND `Username`='%s' LIMIT 1", nom); mysql_tquery(mysql, query, "", ""); if((cache_get_row_int(0, 17)) != 1) { SendClientMessage(playerid, Rouge, "Ce joueur n'est pas bannis !"); return 1; } mysql_format(mysql, query, sizeof(query),"UPDATE `joueurs` SET `Bannis` = '0', `RaisonBan`='' WHERE `Username` = '%e'", nom); mysql_tquery(mysql, query, "", ""); GetPlayerName(playerid, joueuremetteur, sizeof(joueuremetteur)); format(string, sizeof(string), "[Admin]:%s a unban %s.", joueuremetteur, nom); ChannelAdmin(Rouge, string); return 1; }
Thank you !