OwlGamingCommunity / MTA

OwlGaming roleplay script for Multi Theft Auto on GTA:SA
https://owlgaming.net
GNU General Public License v2.0
82 stars 101 forks source link

Allowing users to create multiple accounts #27

Closed skuzad25 closed 2 years ago

skuzad25 commented 2 years ago

In server.lua for the account system I was told to freeze some lines. But it doesn't work, only breaks the script. Here's the lines:

local preparedQuery2 = "SELECT mtaserial FROM account_details WHERE mtaserial='".. toSQL(mtaSerial) .."' LIMIT 1" local Q2 = mysql:query(preparedQuery2) if not Q2 then triggerClientEvent(client,"set_warning_text",client,"Register","Error code 0003 occurred.") return false end

            local usernameExisted = mysql:fetch_assoc(Q2)
            if (mysql:num_rows(Q2) > 0) and usernameExisted["id"] ~= "1" then
                triggerClientEvent(client,"set_warning_text",client,"Register","Multiple Accounts is not allowed (Existed: "..tostring(usernameExisted["username"])..")")
                return false
            end
            mysql:free_result(Q2)
ChaosParadise commented 2 years ago

This is not a bug or issue with the codebase. Moved to discussions.