MySQL Problem.
#1

OnPlayerLogin:
pawn Код:
MySQLFetchAcctSingle(PlayerInfo[playerid][pSQLID], "Password", PlayerInfo[playerid][pKey]);
    if(strcmp(PlayerInfo[playerid][pKey],password, true ) == 0 )
    {
        new Data[1024];
        new Field[64];
        new rcnt = 1;
        MySQLFetchAcctRecord(PlayerInfo[playerid][pSQLID], Data);
        samp_mysql_strtok(Field, "|", Data);
        while (samp_mysql_strtok(Field, "|", "")==1)
        {
            // The rcnt values here represent the order of the columns in the characters table, so don't mess with them
            // If you add a column to the table, just add a new line with a +1 rcnt to the block below
            // Start it at 3 to skip the first few records we don't need (id, player name, password)
            if (rcnt == 3) PlayerInfo[playerid][pLevel] = strval(Field);
I`m using Adrenaline's MySQL plugin, and i want to do OnPlayerLogin with G-StylezZz's plugin. His plugin doesn't have samp_mysql_strtok, so how can i do OnPlayerLogin with mysql_fetch_row_format ?

Thanks !
Reply
#2

So you want to make a OnPlayerLogin callback? Or make something that logs the player in through MySQL?

Stop double posting, it makes me feel sad...
Reply
#3

It works fine, but i want to change MySQL plugin. Now i`m using Adrenaline's MySQL plugin, and i want to change in G-StyleZzZ plugin.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)