BlueG MySQL to StrickenKid's MySQL!
#1

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.
Reply
#2

Anyone, please?
Reply
#3

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.
Reply
#4

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.
Reply
#5

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?
Reply
#6

Anyone?
Reply
#7

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

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

Anyone please?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)