Jump to content

expected ) near isadmin line 3 WTF?


Recommended Posts

Well i dont get why it wants a bracket and i cant fix it

function isplayeradmin(thePlayer) 
  local isadmin = ( hasObjectPermissionTo ( thePlayer, "command.aexec", true ) )  
  setElementData(thePlayer, "admin" isadmin)  
  end 
addEventHandler("onResourceStart", getResourceRootElement(thisResource), isplayeradmin) 

Link to comment
function isplayeradmin() 
local players = getElementsByType ( "player" ) 
    for _,v in ipairs(players) do 
    local isadmin = ( hasObjectPermissionTo ( v, "command.aexec", true ) ) 
    setElementData(v, "admin", isadmin) 
    end 
end 
addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), isplayeradmin) 

Edited by Guest
Link to comment
function isplayeradmin() 
local players = getElementsByType ( "player" ) 
    for _,v in ipairs(players) do 
    local isadmin = ( hasObjectPermissionTo ( v, "command.aexec", true ) ) 
    setElementData(v, "admin", isadmin) 
end 
addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), isplayeradmin) 

You forgot '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...