Jump to content

SQLite Problem


noOx

Recommended Posts

Hi, i have a problem with SQLite.

I want to create a Whitelist with SQLite but when i join on my server it do nothing.

  
        whitelist = executeSQLSelect("whitelist", "username", "username = 'noOx'") 
        if (whitelist == false) then -- When my Name dont exist. 
            outputChatBox("Your Name are not on the Whitelist.", source, 200, 0, 0, true) 
        else 
            spawnPlayer(source, x, y, z) 
            fadeCamera(source, true) 
            setCameraTarget(source, source) 
            outputChatBox("Welcome.", source, 255, 255, 255, true) 
        end 
  

I have already create a new table with the Firefox Extension "SQLite Manager" and changed the name to registry.db

In the Table whitelist is one Record with username = blablub, but i spawn normally :(

And sorry for my bad english, im from germany.

Edited by Guest
Link to comment

The complete Function

function joinHandler() 
  
        local x = 1959.55 
        local y = -1714.46 
        local z = 10     
        whitelist = executeSQLSelect("whitelist", "username", "username = 'noOx'") 
        if (whitelist == false) then -- Wenn Name nicht auf der Whitelist steht 
            outputChatBox("Dein Name steht nicht auf der Whitelist. Informiere einen Administrator", source, 200, 0, 0, true) 
        else 
            spawnPlayer(source, x, y, z) 
            fadeCamera(source, true) 
            setCameraTarget(source, source) 
            outputChatBox("Willkommen auf dem GangLife RPG Server", source, 255, 255, 255, true) 
        end 
end 
addEventHandler("onPlayerJoin", getRootElement(), joinHandler) 

I dont get any errors ingame or in the serverconsole..that is the problem :/

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...