Jump to content

[REL] dxscoreboard - A DirectX scoreboard resource


Awwu

Recommended Posts

Posted (edited)

Hello there!

This is my latest resource, dxscoreboard. It's created as a replacement for the old scoreboard resource created by jbeta.

The biggest difference to the old resource is that it is created fully using MTA's DirectX drawing functions. Here are couple sample pictures.

949.png

[Click me for more!]

Features:

- All features the old scoreboard resource has.

- Neater looking interface accompilished with DirextX drawing functions (colours and animation).

- Additional scripting functionality for both server and client.

- Sorting now actually works properly, unlike in the old scoreboard resource.

- Customizable through client-side xml file. All changes made are not server-based but global.

- Web interface hasn't been changed much, so it should remain the same.

Installation:

Download it from the [MTA community].

After downloading and placing the resource where it belongs to, all you really need to do is replace all references of "scoreboard" to "dxscoreboard". Or if you don't bother to do so, you can always rename the old scoreboard to something like "scoreboard_old" and name this one to "scoreboard".

All functions used in previous scoreboard resource work in the newer one too.

Scripting documentation can be found in the [MTA development wiki].

Credits:

- jbeta for creating the original scoreboard resource

Have fun!

Edited by Guest
  • Replies 58
  • Created
  • Last Reply

Top Posters In This Topic

Posted

Hmm, looks good. Reminds me of my own attempt to make a DX scoreboard, I guess I don't have to do that now anymore. :)

EDIT: Perhaps it's an idea though to remove "[team]" from teams, as in my opinion, that looks ugly.

Posted

Make the team stand out. When I looked at that screenshot first time I thought that [TEAM] is a clan and there were 2 members of that clan playing :shock:

Sorry, personally I don't like this scoreboard, it reminds me SA-MP too much!

Posted
Make the team stand out. When I looked at that screenshot first time I thought that [TEAM] is a clan and there were 2 members of that clan playing :shock:

That's true, please change the layout of the Teams a little bit.

But really great resource, i will use it 8)

//EDIT: I know, that sounds "crazy", but wouldn't it better to change the name of the resource to "scoreboard"? So nobody need to change "scoreboard" to "dxscoreboard". Possible, this would prevent some problems with resources like stealth, race or admin if the person don't changed "scoreboard" to "dxscoreboard". I for my part would prefer it to rename the original scoreboard in scoreboard_old - and that's it.

Posted

Okay, I uploaded a bit tweaked version of the scoreboard resource. I hope you like it more now.

Make the team stand out. When I looked at that screenshot first time I thought that [TEAM] is a clan and there were 2 members of that clan playing :shock:

That's true, please change the layout of the Teams a little bit.

But really great resource, i will use it 8)

//EDIT: I know, that sounds "crazy", but wouldn't it better to change the name of the resource to "scoreboard"? So nobody need to change "scoreboard" to "dxscoreboard". Possible, this would prevent some problems with resources like stealth, race or admin if the person don't changed "scoreboard" to "dxscoreboard". I for my part would prefer it to rename the original scoreboard in scoreboard_old - and that's it.

I surely would do that, but I prefer not to do so that users don't confuse this scoreboard with the other one. Sure you can always just replace the old one with this or rename the old one to something other and change this resource's name to "scoreboard". It should work either way.

Posted
I surely would do that, but I prefer not to do so that users don't confuse this scoreboard with the other one. Sure you can always just replace the old one with this or rename the old one to something other and change this resource's name to "scoreboard". It should work either way.

Hi, i tried it now - works very well :) You could write this as an alternative and "easier" way to get this scoreboard to work.

Posted

You could make sort of a "priority" value for each column. For example, if Name is fixed at 1 and Ping is fixed at 100, and people could give a priority value when adding new columns, it would be a lot easier to have columns show up in the desired order.

Posted

robhol's idea is actually better.

We've modified lil_toady's fps resource to display players' fps count on the scoreboard. Now we would like it to always be 2nd to last, with ping last.

Under the current system however, that will only work if fps starts after whatever current gamemode is running, or we have to edit every gamemode, modifying each call to the scoreboard, to make it's columns appear #columns -2 instead of the default -1.

Such a "weighted" system would work out better. :)

Posted

Besides that, the original scoreboard indeed had this column system, but it also just placed the columns in front of the ping by default. Which dxscoreboard does not and I'm pointing out.

Posted

We get a couple of errors with dxscoreboard now and then, on resource starting, and calls to addScoreboardColumn:

dxscoreboard_exports.lua:31: attempt to index global 'resourceColumns' (a nil value)
dxscoreboard_exports.lua:149: attempt to index global 'resourceColumns' (a nil value)

However, I tracked down the cause:

on both lines 74 and 88 (in "scoreboardClearColumns(forElement)" and "scoreboardResetColumns(forElement)" respectively) you had the line:

resourceColumns = nil

whereas I believe you meant to use (and what I changed it to to fix it):

resourceColumns = {}

to reset/blank the table, rather than completely destroy it.

  • 2 weeks later...
Posted

Thanks for the bug report.

I've got another version ready here. It has fixed a series of minor bugs and issues and introduces some new features.

- Added more options to the scoreboard settings window.

- Added option to display server/gamemode/map info at the top of the scoreboard.

- Replaced the previous position system with priorities. Name is fixed at priority slot 1 and ping at 500.

- Ability to disable colors/hide teams in scoreboard.

- Fixed bug where some columns were not removed at resource stop.

- Clicking on the arrows also works for scrolling now also when there's many players.

- More scripting functions, documentation soon..

Can be found from the [MTA community].

Posted

I dont know if this has been changed or not, but last i tried this resource the animation to open the scoreboard was far too slow. I understand it can be disabled, but i quite like the animation - its just too slow to have a quick glance.

Posted
I dont know if this has been changed or not, but last i tried this resource the animation to open the scoreboard was far too slow. I understand it can be disabled, but i quite like the animation - its just too slow to have a quick glance.

There's no setting for that yet, but I already thought of adding one. ....I just forgot it. :oops:

Posted

I found the animation speed is directly tied into your framerate - which makes sense seeing as it's a dxScoreboard tied into onClientRender. :D

At 60FPS, the animation is fast and sweet :) but at 20 FPS it is obviously a lot slower.

While no doubt adjusting the animation lines will be a pain I'm guessing an adjustment based on getTickCount deltas should be used instead.

  • 3 weeks later...
Posted

Just uploaded a new version which fixes and adds some stuff. Here's the changelog.

- Made the drawing of the scoreboard be time-based instead of frame-based. Now it won't take longer for it to draw the scoreboard in low-fps situations.

- Added a draw speed setting to the settings window.

- Added a server-side option to enable colorcodes in front of nicks to be used as primary display colors in the scoreboard. Can be found from meta.xml.

This way names will shop up as Awwu instead of #FF00FFAwwu in the scoreboard.

If you just want to remove the colorcodings, add this to some resource (client-side).

addEventHandler( "onClientResourceStart", getResourceRootElement(),
function()
local dxscoreboard = getResourceFromName( "dxscoreboard" )
if dxscoreboard then
           exports.dxscoreboard:scoreboardSetColumnTextFunction( "name", function( name ) return type( name ) == "string" and string.gsub ( name, "#%x%x%x%x%x%x", "" ) or name end )
end
end
)

(just replace all references to dxscoreboard to the new name if you change the resource name)

Posted

Is there a way to make this a little bit bigger?

I'm guessing making it about 1.5 times the current size? Or that may be too much... I don't know, it just seems a bit too small.

I have my chatbox at 1.5 times the default size and that is perfect. I've tried messing around with the code, but nothing I do works. I don't really know much about this sort of thing.

I have our race server dxscoreboard set to show the server info and game mode and map. How hard would it be to have it also display the map's rating next to or under it?

Posted

Excuse the rapid update but I just wanted to fix some of the issues. There's a new release available and the changelog is here:

1114.png

- Made the color-code parsing a bit better. Now supports name with many color-codes and positions them properly in the name.

- Added scale option to settings window (to make the scoreboard bigger/smaller).

- Added ability to alter fonts used in the scoreboard to settings window.

- Added a shortkey to settings window, by default it's F7 (works only when scoreboard is visible).

- Made the drawing generally better.

Downloadable at the [community].

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