SA-MP Forums Archive
MySQL Help - 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: MySQL Help (/showthread.php?tid=496416)



MySQL Help - ahmedkoki - 22.02.2014

I need help in this code I don't want in it any MySQL functions if you can change the "mysql_function_query" to another function because I don't like to use MySQL it crashes and bugs.

Here is the code

pawn Код:
Group_Save(iGroupID) {
    if(!(0 <= iGroupID < MAX_GROUPS)) // Array bounds check. Use it.
        return 0;

    new
        szQuery[2048],
        i = 0;

    format(szQuery, sizeof szQuery, "UPDATE `groups` SET \
        `Type` = %i, `Name` = '%s', `Allegiance` = %i, `Bug` = %i, `Chat` = %i, \
        `Radio` = %i, `DeptRadio` = %i, `DutyColour` = %i, `RadioColour` = %i, `Stock` = %i, \
        `LockerX` = %.2f, `LockerY` = %.2f, `LockerZ` = %.2f, `LockerVW` = %i, \
        `CrateX` = %.2f, `CrateY` = %.2f, `CrateZ` = %.2f, `Share` = %i"
,
    arrGroupData[iGroupID][g_iGroupType], arrGroupData[iGroupID][g_szGroupName], arrGroupData[iGroupID][g_iAllegiance], arrGroupData[iGroupID][g_iBugAccess], arrGroupData[iGroupID][g_iChatAccess],
    arrGroupData[iGroupID][g_iRadioAccess], arrGroupData[iGroupID][g_iDeptRadioAccess], arrGroupData[iGroupID][g_hDutyColour], arrGroupData[iGroupID][g_hRadioColour], arrGroupData[iGroupID][g_iLockerStock],
    arrGroupData[iGroupID][g_fLockerPos][0], arrGroupData[iGroupID][g_fLockerPos][1], arrGroupData[iGroupID][g_fLockerPos][2], arrGroupData[iGroupID][g_iLockerVW],
    arrGroupData[iGroupID][g_fCratePos][0], arrGroupData[iGroupID][g_fCratePos][1], arrGroupData[iGroupID][g_fCratePos][2], arrGroupData[iGroupID][g_iShareAssets]);

    for(i = 0; i != MAX_GROUP_RANKS; ++i) format(szQuery, sizeof szQuery, "%s, `Rank%i` = '%s'", szQuery, i, arrGroupRanks[iGroupID][i]);
    for(i = 0; i != MAX_GROUP_DIVS; ++i) format(szQuery, sizeof szQuery, "%s, `Div%i` = '%s'", szQuery, i, arrGroupDivisions[iGroupID][i]);
    for(i = 0; i != MAX_GROUP_WEAPONS; ++i) format(szQuery, sizeof szQuery, "%s, `Gun%i` = %i, `Cost%i` = %i", szQuery, i, arrGroupData[iGroupID][g_iLockerGuns][i], i, arrGroupData[iGroupID][g_iLockerCost][i]);
    format(szQuery, sizeof szQuery, "%s WHERE `id` = %i", szQuery, iGroupID + 1);
    return mysql_function_query(MainPipeline, szQuery, false, "OnQueryFinish", "ii", SENDDATA_THREAD, iGroupID);
}



Re: MySQL Help - Mattakil - 22.02.2014

If you don't ant to use MySQL then what do you want to use?


Re: MySQL Help - ahmedkoki - 22.02.2014

Quote:
Originally Posted by Mattakil
Посмотреть сообщение
If you don't ant to use MySQL then what do you want to use?
Any other include that can save like dini? to the the info


Re: MySQL Help - ahmedkoki - 22.02.2014

Bump!!!


Re: MySQL Help - ahmedkoki - 22.02.2014

Bump !!!