SA-MP Forums Archive
BlueG MySQL to StrickenKid's MySQL! - 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: BlueG MySQL to StrickenKid's MySQL! (/showthread.php?tid=454765)



BlueG MySQL to StrickenKid's MySQL! - Dam0n - 30.07.2013

Hello,

The below function uses BlueG's MySQL, and i want to convert it to StrickenKid's MySQL.

How to convert mysql_query_callback to Strickenkids?

I want to use this function with Strickenkid's MySQL plugin.

pawn Код:
stock jBanCheck(playerid)
{
    format(jQuery, MAX_QUERY_LENGTH, "SELECT user_banner, ban_reason, TIMESTAMPDIFF(MINUTE, NOW(), DATE_ADD(ban_timestamp, INTERVAL ban_time MINUTE)) FROM `"#J_TABLE"` WHERE user_banned_ip = '%s' AND (NOW() <= DATE_ADD(ban_timestamp, INTERVAL ban_time MINUTE) OR ban_time = 0)", jIP[playerid]);
    mysql_query_callback(QUERY_CHECKNAME, jQuery, "jban_OnQueryFinish", playerid, jban_connection);
    return 1;
}
pawn Код:
public jban_OnQueryFinish(query[], index, extraid, connectionHandle)
{
    if(index == QUERY_CHECKNAME)
    {
        mysql_store_result();
        if(mysql_num_rows() > 0)
        {
            mysql_fetch_row(jResult);
            j_sscanf(jResult, "p|ssi", jBan_Name, jBan_Reason, jBan_Time);
           
            format(jBan_Message, MAX_MESSAGE_LENGTH, "[jBan]: You have an existing ban from \"%s\" for \"%s\", it will expire in %d minutes!", jBan_Name, jBan_Reason, jBan_Time);
            SendClientMessage(extraid, COLOR_RED, jBan_Message);
           
            Kick(extraid);
        }
        mysql_free_result();
    }
    return 1;
}
Thank you.


Re: BlueG MySQL to StrickenKid's MySQL! - Dam0n - 30.07.2013

Anyone, please?


AW: BlueG MySQL to StrickenKid's MySQL! - Mellnik - 30.07.2013

Hey, I suggest you learning how to use one of the new plugins which are supported. Because it makes no sense to use an outdated one.


Re: BlueG MySQL to StrickenKid's MySQL! - Scenario - 30.07.2013

Don't switch from BlueG's to Strickenkid's... Stricken's is slower and more inefficient and, IIRC, hasn't been updated in years. BlueG's is (or will be very soon) the fastest it has ever been and it has an abundant feature set.


Re: BlueG MySQL to StrickenKid's MySQL! - Dam0n - 30.07.2013

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
Don't switch from BlueG's to Strickenkid's... Stricken's is slower and more inefficient and, IIRC, hasn't been updated in years. BlueG's is (or will be very soon) the fastest it has ever been and it has an abundant feature set.
Well, Ok. But my Admin System was scripted with Strickenkids, so for now i really need that function for StrickenKids. Can you do this please?


Re: BlueG MySQL to StrickenKid's MySQL! - Dam0n - 31.07.2013

Anyone?


Re: BlueG MySQL to StrickenKid's MySQL! - CrazyChoco - 31.07.2013

Why not just convert your admin system into r31, it's quite simple to use.


Re: BlueG MySQL to StrickenKid's MySQL! - Dam0n - 01.08.2013

Quote:
Originally Posted by CrazyChoco
Посмотреть сообщение
Why not just convert your admin system into r31, it's quite simple to use.
No.

Anyone please?