How could I ? [mysql]
#9

pawn Код:
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;
}
that's the most you can optimize it... You welcome
Reply


Messages In This Thread
How could I ? [mysql] - by anou1 - 09.02.2014, 20:31
Re: How could I ? [mysql] - by anou1 - 10.02.2014, 07:34
Re: How could I ? [mysql] - by Yashas - 10.02.2014, 08:16
Re: How could I ? [mysql] - by anou1 - 10.02.2014, 08:48
Re: How could I ? [mysql] - by SwisherSweet - 10.02.2014, 08:52
Re: How could I ? [mysql] - by anou1 - 10.02.2014, 09:03
Re: How could I ? [mysql] - by SwisherSweet - 10.02.2014, 09:04
Re: How could I ? [mysql] - by anou1 - 10.02.2014, 09:08
Re: How could I ? [mysql] - by SwisherSweet - 10.02.2014, 09:10
Re: How could I ? [mysql] - by Konstantinos - 10.02.2014, 09:51

Forum Jump:


Users browsing this thread: 2 Guest(s)