SA-MP Forums Archive
Kick First - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Kick First (/showthread.php?tid=491097)



Kick First - ancezas - 29.01.2014

hello i have this code:
pawn Код:
new string[64],arUzrakintas[2],zV[MAX_PLAYER_NAME];
    GetPlayerName(playerid,zV,MAX_PLAYER_NAME);
    format(string,64,"SELECT * FROM zaidejai WHERE vardas='%s'",zV);
    mysql_query(string);
    mysql_store_result();
    if(mysql_retrieve_row()) mysql_get_field("Uzrakintas",arUzrakintas);
    if(strval(arUzrakintas) != 0)
    {
        /* zaidejo profilis yra uzrakintas */
        new msg[232],kas[MAX_PLAYER_NAME],priezastis[36],laikas[32];
        format(msg,70,"SELECT * FROM banlog WHERE UzrakintasZ='%s'",zV);
        mysql_query(msg);
        mysql_store_result();
        if(mysql_retrieve_row())
        {
            mysql_get_field("KasUzrakino",kas);
            mysql_get_field("Priezastis",priezastis);
            mysql_get_field("KadaUzrakino",laikas);
        }
        format( msg, sizeof( msg ), "{FF0000}Љio ћaidėjo profilis yra uћrakintas.\n{FFFFFF}Uћrakino: {C0C0C0}%s{FFFFFF}.\nPrieћastis: {C0C0C0}%s\n{FFFFFF}Data: {C0C0C0}%s", kas,priezastis,laikas);
        ShowPlayerDialog( playerid, 5022, DIALOG_STYLE_MSGBOX, "{FFFFFF}NGP-Life {FF0000}- Info.", msg, "Uћdaryti", "" );
        mysql_free_result();
        Kick(playerid);
    }
and it gives me kick first, not my format text, i need that the dialog window will show on first then kick.
mysql log shows that he gets the fields
Код:
mysql_get_field("KasUzrakino",kas);
	        mysql_get_field("Priezastis",priezastis);
	        mysql_get_field("KadaUzrakino",laikas);



Re: Kick First - DobbysGamertag - 29.01.2014

Use a timer. then kick