Jump to content

Pick a random?


Recommended Posts

I didn't want to start a new topic but i got another problem, Im trying to spawn a player;

  
function spawn(source, spawn) 
outputChatBox("work1") 
local gang = executeSQLQuery("SELECT gang FROM Spawn WHERE name = ?",tostring(spawn)) 
if gang == "none" then 
outputChatBox("work2") 
elseif gang ~= "none" then 
outputChatBox("work3") 
end 
end 
  

It shows in the chatbox work1 and work3 but the gang in the db is "none" (without quotes)

Link to comment
function spawn ( source, spawn ) 
    outputChatBox ( "work1" ) 
    local gang = executeSQLQuery ( "SELECT gang FROM Spawn WHERE name = ?", tostring ( spawn ) ) 
    if ( gang ) then 
        local gangName = gang [ 1 ] [ "gang" ] 
        if ( gangName == "none" ) then 
            outputChatBox ( "work2" ) 
        else 
            outputChatBox ( "work3" ) 
        end 
    end 
end 

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...