Jump to content

[HELP ME] Why not working isobjectinaclgroup?


Turbe$Z

Recommended Posts

function Superman.Start()
  if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("Admin")) then 
  local self = Superman

  -- Register events
  addEventHandler("onClientResourceStop", getResourceRootElement(thisResource), Superman.Stop, false)
  addEventHandler("onPlayerJoin", rootElement, Superman.onJoin)
  addEventHandler("onPlayerQuit", rootElement, Superman.onQuit)
  addEventHandler("onClientRender", rootElement, Superman.processControls)
  addEventHandler("onClientRender", rootElement, Superman.processFlight)
  addEventHandler("onClientPlayerDamage", localPlayer, Superman.onDamage, false)
  addEventHandler("onClientElementDataChange", rootElement, Superman.onDataChange)
  addEventHandler("onClientElementStreamIn", rootElement, Superman.onStreamIn)
  addEventHandler("onClientElementStreamOut", rootElement, Superman.onStreamOut)

  -- Bind keys
  --bindKey("jump", "down", Superman.onJump)

  -- Register commands
  addCommandHandler("superman", Superman.cmdSuperman)
  -- Initializate attributes
  self.smokeGenerators = {}
  self.rotations = {}
  self.previousVelocity = {}
	end
end
addEventHandler("onClientResourceStart", getResourceRootElement(thisResource), Superman.Start, false)

Error: attempt to call global 'getPlayerAccount' (a nil value) wtf..?

Link to comment
2 hours ago, Turbo777 said:

onPlayerJoin and onPlayerQuit are server sided events.

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