Jump to content

Help-Scoreboard-Help


Young$

Recommended Posts

mybe this will do the job

-- Server Side

exports.scoreboard:scoreboardAddColumn("ACL") 
  
function set(player) 
local admin = "Admin" 
local supermoderator = "SuperModerator" 
local moderator = "Moderator" 
local everyone = "Visitor" 
local console = "HeadAdmin" 
    if isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Admin" ) ) then 
    setElementData ( player, "ACL", admin ) 
    elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "SuperModerator" ) ) then 
    setElementData ( player, "ACL", supermoderator ) 
    elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Moderator" ) ) then 
    setElementData ( player, "ACL", moderator ) 
    elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Console" ) ) then 
    setElementData ( player, "ACL", console ) 
    elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Everyone" ) ) then 
    setElementData ( player, "ACL", everyone ) 
    end 
end 
  
function timer() 
    setTimer( set, 1000, 1, source ) 
end 
addEventHandler("onPlayerLogin", getRootElement(), timer) 
addEventHandler("onPlayerJoin", getRootElement(), timer) 

Link to comment
exports.scoreboard:scoreboardAddColumn("ACL") 
  
function setACL(player) 
    local admin = "Admin" 
    local supermoderator = "SuperModerator" 
    local moderator = "Moderator" 
    local everyone = "Visitor" 
    local console = "HeadAdmin" 
    if isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Admin" ) ) then 
    setElementData ( player, "ACL", admin ) 
    elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "SuperModerator" ) ) then 
    setElementData ( player, "ACL", supermoderator ) 
    elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Moderator" ) ) then 
    setElementData ( player, "ACL", moderator ) 
    elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Console" ) ) then 
    setElementData ( player, "ACL", console ) 
    elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Everyone" ) ) then 
    setElementData ( player, "ACL", everyone ) 
    end 
end 
  
function timer() 
    setTimer( setACL, 1000, 1, source ) 
end 
addEventHandler("onPlayerLogin", getRootElement(), timer) 
addEventHandler("onPlayerJoin", getRootElement(), timer) 

Never use a existing function name.

Link to comment
only where in meta.xml? and what program???

not the meta.xml

you should put it in .lua script

and includ it in the meta.xml

-- meta.xml

    "your name" type="misc" name="ACL in scoreboard" /> 
    

-- acl.lua

exports.scoreboard:scoreboardAddColumn("ACL") 
  
function setACL(player) 
    local admin = "Admin" 
    local supermoderator = "SuperModerator" 
    local moderator = "Moderator" 
    local everyone = "Visitor" 
    local console = "HeadAdmin" 
    if isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Admin" ) ) then 
    setElementData ( player, "ACL", admin ) 
    elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "SuperModerator" ) ) then 
    setElementData ( player, "ACL", supermoderator ) 
    elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Moderator" ) ) then 
    setElementData ( player, "ACL", moderator ) 
    elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Console" ) ) then 
    setElementData ( player, "ACL", console ) 
    elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Everyone" ) ) then 
    setElementData ( player, "ACL", everyone ) 
    end 
end 
  
function timer() 
    setTimer( setACL, 1000, 1, source ) 
end 
addEventHandler("onPlayerLogin", getRootElement(), timer) 
addEventHandler("onPlayerJoin", getRootElement(), timer) 

Link to comment

tdma\Scoreboard\tdma_scoreboard_stats.lua:87: call: failed to call 'scoreboard:addScoreboardColumn'?

ERROR: tdma\Scoreboard\tdma_scoreboard_stats.lua:70: call: failed to call 'scoreboard:removeScoreboardColumn'

[2012-01-17 19:53:39] ERROR: tdma\Scoreboard\tdma_scoreboard_stats.lua:83: call: failed to call 'scoreboard:removeScoreboardColumn'

[2012-01-17 19:53:39] ERROR: tdma\Scoreboard\tdma_scoreboard_stats.lua:95: call: failed to call 'scoreboard:removeScoreboardColumn'

[2012-01-17 19:53:39] ERROR: tdma\Scoreboard\tdma_scoreboard_stats.lua:107: call: failed to call 'scoreboard:removeScoreboardColumn'?????? why

Link to comment
only where in meta.xml? and what program???

not the meta.xml

you should put it in .lua script

and includ it in the meta.xml

-- meta.xml

    "your name" type="misc" name="ACL in scoreboard" /> 
    

-- acl.lua

exports.scoreboard:scoreboardAddColumn("ACL") 
  
function setACL(player) 
    local admin = "Admin" 
    local supermoderator = "SuperModerator" 
    local moderator = "Moderator" 
    local everyone = "Visitor" 
    local console = "HeadAdmin" 
    if isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Admin" ) ) then 
    setElementData ( player, "ACL", admin ) 
    elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "SuperModerator" ) ) then 
    setElementData ( player, "ACL", supermoderator ) 
    elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Moderator" ) ) then 
    setElementData ( player, "ACL", moderator ) 
    elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Console" ) ) then 
    setElementData ( player, "ACL", console ) 
    elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Everyone" ) ) then 
    setElementData ( player, "ACL", everyone ) 
    end 
end 
  
function timer() 
    setTimer( setACL, 1000, 1, source ) 
end 
addEventHandler("onPlayerLogin", getRootElement(), timer) 
addEventHandler("onPlayerJoin", getRootElement(), timer) 

i have type the same?

Link to comment

:cry: plz help any1!!!!!!!!!!!!!!! this is what it says

ERROR: [gameplay]\scoreboard\acl.lua:1: attempt to call a nil value

ERROR: [gameplay]\scoreboard\acl.lua:1: call: failed to call 'scoreboard:addScoreboardColumn'

] ERROR: attempt to call a nil value [string "?"]

ERROR: call: failed to call 'scoreboard:scoreboardAddColumn' [string "?"

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