Jump to content

HELP !!!


Recommended Posts

If there is a table like this:

houses = { 
{'acc, houseID'}, 
{'acc, houseID'}, 
} 

Then it'll be easier, if you don't have such table then make one and then try something like this:

  
function lockHouses(acc) 
    for k, v in pairs (houses) do 
        if v[1] == acc then 
            lockInterior(v[2]) -- lockInterior() is another function which you should make on your own. 
            return true 
        end 
    end 
end 
  
function quitHandler() 
    local acc = getAccountName(getPlayerAccount(source)) 
    lockHouses(acc) 
end 
addEventHandler("onClientPlayerQuit", root, quitHandler) 
  

Although this is just an 'idea' on how you should work around with such cases, tables are used alot. Also, since we don't have any sample from your current work, i'd just assume you have a pre-made lockInterior() function, otherwise make one if you know what it should be :)

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