Jump to content

scoreboard


Young$

Recommended Posts

the scoreboard is wrong script i think?

this is script :arrowdown:

_________________________________________________________________

--call(getResourceFromName("scoreboard"), "addScoreboardColumn")

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)

___________________________________________________________________

and this is scoreboard

___________________________________________________________________

mta-screen_2012-01-23_14-47-34.png

___________________________________________________________________

and this is what i want

___________________________________________________________________

mta-screen_2012-01-23_14-46-46.png

___________________________________________________________________

i hope you can give a good script

Link to comment

  
function createthedamnteams() 
team1 = createTeam("Members",0,255,0) 
team2 = createTeam("Moderators",255,255,0) 
team3 = createTeam("Admins",0,0,255) 
team4 = createTeam("VIP",139,0,139) 
end 
addEventHandler ( "onResourceStart", getRootElement(), createthedamnteams ) 
  

That will create your teams (serversided)

Link to comment
  • Other Languages Moderators
function createthedamnteams() 
team1 = createTeam("Members",0,255,0) 
team2 = createTeam("Moderators",255,255,0) 
team3 = createTeam("Admins",0,0,255) 
team4 = createTeam("VIP",139,0,139) 
end 
addEventHandler("onResourceStart", resourceRoot, createthedamnteams) 

Link to comment

- teams.lua

function createthedamnteams() 
    member = createTeam("Members",0,255,0) 
    moder = createTeam("Moderators",255,255,0) 
    smoder = createTeam("SuperModerator",255,255,0) 
    admin = createTeam("Admins",255,0,0) 
    vip = createTeam("VIP",255,255,0) 
end 
addEventHandler("onResourceStart", resourceRoot, createthedamnteams) 
  
function addthem (player) 
    if isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Admin" ) ) then 
    setPlayerTeam ( player, admin ) 
    elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "SuperModerator" ) ) then 
    setPlayerTeam ( player, smoder ) 
    elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Moderator" ) ) then 
    setPlayerTeam ( player, moder ) 
    elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Vip" ) ) then 
    setPlayerTeam ( player, vip ) 
    elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Everyone" ) ) then 
    setPlayerTeam ( player, member ) 
    end 
end 
  
function addtoteamtimer() 
    setTimer(addthem,1000,1,source) 
end 
addEventHandler ( "onPlayerLogin", root, addtoteamtimer ) 
addEventHandler ( "onPlayerJoin", root, addtoteamtimer ) 

- meta.xml

    "youngs" type="misc" name="Teams" /> 
    

for the vip team you need to create a ACL group called " Vip "

Link to comment
- teams.lua
function createthedamnteams() 
    member = createTeam("Members",0,255,0) 
    moder = createTeam("Moderators",255,255,0) 
    smoder = createTeam("SuperModerator",255,255,0) 
    admin = createTeam("Admins",255,0,0) 
    vip = createTeam("VIP",255,255,0) 
end 
addEventHandler("onResourceStart", resourceRoot, createthedamnteams) 
  
function addthem (player) 
    if isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Admin" ) ) then 
    setPlayerTeam ( player, admin ) 
    elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "SuperModerator" ) ) then 
    setPlayerTeam ( player, smoder ) 
    elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Moderator" ) ) then 
    setPlayerTeam ( player, moder ) 
    elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Vip" ) ) then 
    setPlayerTeam ( player, vip ) 
    elseif isObjectInACLGroup ( "user." ..getAccountName(getPlayerAccount(player)) , aclGetGroup ( "Everyone" ) ) then 
    setPlayerTeam ( player, member ) 
    end 
end 
  
function addtoteamtimer() 
    setTimer(addthem,1000,1,source) 
end 
addEventHandler ( "onPlayerLogin", root, addtoteamtimer ) 
addEventHandler ( "onPlayerJoin", root, addtoteamtimer ) 

- meta.xml

    "youngs" type="misc" name="Teams" /> 
    

for the vip team you need to create a ACL group called " Vip "

I don't thest this but i think this is working

you put in server side?

if you are using race is a litel bug i noticed on my server somethimes you are showd in the team(scoreboard) after the next map started

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