Jump to content

Few questions about Scoreboard


rafull6

Recommended Posts

Hello guys. I have few questions about scoreboard. I tried to find the answers, but i failed. Help me with it please.

(P.S. I'm usind DXscoreboard https://community.multitheftauto.com/index.php?p=resources&s=details&id=419)

1st question:

How to add columns like a "kills", "death", "money" ( i saw a lot of examples, but they do not work for me)

2nd question:

How to make teams like "Players", "Members" (screenshot):

2958.png

3rd question:

How to paint all player blips and their names in yellow colour (for example), and make member colours blue (for example).

Mey be that's very easy for you guys, but it's pretty hard for me, because I'm begginer in lua, so, please help me with it :|

Link to comment

About my 2nd question "How to make teams like "Players", "Members"..."

So i enabled in dxscoreboard "show teams". But how to connect it with ACL. I want to make next: when player connects to the server it checks him in ACL groups and move to the team in scoreboard. For example: all defoult players will be moved to the group "Users", members admins and moderators to "Members" in scoreboard. How to do that?

Link to comment

create both teams Members and Users on player join check if he is in the acl group and set his team like this

Members = createTeam('Members') 
Users = createTeam('Users') 
  
addEventHandler('onPlayerJoin', root, 
function() 
-- check if he is admin according to you it's not with account because it's onPlayerJoin so this is with name not the best way to do it 
if isObjectInACLGroup ( "user." .. getPlayerName(source), aclGetGroup ( "Groupname" ) ) then 
setPlayerTeam(source, Members) 
else 
setPlayerTeam(source, Users) 
end 
end 
) 

Link to comment

Did you edit it? it was just an example you should edit /add more checking for groups.

Example:

if isObjectInACLGroup ( "user." .. getPlayerName(source), aclGetGroup ( "Admin" ) ) or isObjectInACLGroup ( "user." .. getPlayerName(source), aclGetGroup ( "Moderators" ) ) then  
  

you can add more.

Link to comment

We strongly advise that you don't use isObjectInACLGroup, and that you should use hasObjectPermissionTo. You can make your own ACL right for whatever feature you're trying to restrict access to. This is especially true if you want to share your script - there's no reason you should expect other server admins to have an 'admin' ACL group, or that you should assume you know what group they want to be able to use your feature.

Link to comment

There is a resource with you can get kills and deaths, this resource comes with MTA, you must start with admin panel, the name of the resource is scores, start it and you will see, but dont you think the kills and all that will be saved because you must to create some script for that.

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