Jump to content

Help-Scoreboard-Help


Young$

Recommended Posts

Posted

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) 

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

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
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) 

Posted

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

damn man visit this link ---->>>> http://gifura.orzhk.org/src/1332235315120.swf <<<<----

For some epic maps1!!!!!

Posted
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?

damn man visit this link ---->>>> http://gifura.orzhk.org/src/1332235315120.swf <<<<----

For some epic maps1!!!!!

Posted

: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 "?"

damn man visit this link ---->>>> http://gifura.orzhk.org/src/1332235315120.swf <<<<----

For some epic maps1!!!!!

Posted

That's too f*** wrong:

exports["scoreboard"]:scoreboardAddColumn("ACL") 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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