Skip to content

Allowing users to create multiple accounts #27

Description

@skoozeblood

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions