Rollo

[RELEASE] LIVE SCOREBOARDS

60 posts in this topic

LIVE SCOREBOARDS

Hey guys this is my first release for Exile Mod. I was not sure where to put it but i think scripts is the correct sub section. This is a server side script that allows you to put live scoreboards in Exile. You can use it to also put custom messages but you will have to figure out how to do that yourself. I have made a GitHub repository so please feel free to contribute,  report bugs or fork it and do as you please with it. The installation instructions are on the GitHub page and all the info regarding the script will be updated there.

GitHub Repository : https://github.com/ivaylosp/message_boards

message_board.jpgscoreboard.jpg

Edited by Rollo
  • Like 12

Share this post


Link to post
Share on other sites
Advertisement

@Rollo Thanks for the great release. I was looking at adding total poptabs to the score board.

I can see how to add it to the billboard.  Just stuck on adding total poptabs to the exile.ini.

This is the call to grab total poptabs:
number_format($PlayerInfo[0]['locker']+$TerritoryInfobyID[0]['container_money']);

Would the exile.ini then look like this?

Spoiler

[ngGetTopTenMoney]
SQL1_1 = SELECT RPAD(CONCAT(RPAD(name,(SELECT MAX(LENGTH(account.name)) as message FROM (SELECT * FROM account WHERE last_connect_at > NOW() - INTERVAL 1 WEEK ORDER BY score DESC LIMIT 13) PlayerInfo),' '),' ',number_format($PlayerInfo[0]['locker']+$TerritoryInfobyID[0]['container_money']),42, ' ') message_board_row FROM account ORDER BY score DESC LIMIT 13
Number Of Inputs = 0
OUTPUT = 1-STRING

cheers mate

Share this post


Link to post
Share on other sites
1 hour ago, aussie battler said:

@Rollo Thanks for the great release. I was looking at adding total poptabs to the score board.

I can see how to add it to the billboard.  Just stuck on adding total poptabs to the exile.ini.

This is the call to grab total poptabs:
number_format($PlayerInfo[0]['locker']+$TerritoryInfobyID[0]['container_money']);

Would the exile.ini then look like this?

  Hide contents

[ngGetTopTenMoney]
SQL1_1 = SELECT RPAD(CONCAT(RPAD(name,(SELECT MAX(LENGTH(account.name)) as message FROM (SELECT * FROM account WHERE last_connect_at > NOW() - INTERVAL 1 WEEK ORDER BY score DESC LIMIT 13) PlayerInfo),' '),' ',number_format($PlayerInfo[0]['locker']+$TerritoryInfobyID[0]['container_money']),42, ' ') message_board_row FROM account ORDER BY score DESC LIMIT 13
Number Of Inputs = 0
OUTPUT = 1-STRING

cheers mate

I am glad you are liking the release. Did you manage to get it going ?

Regarding your question you can not use SQF scripting within SQL queries. My whole plan for the board was to not use any SQF logic and to use the powerful SQL to get what i need. So your query will have to look like this:

SELECT RPAD(CONCAT(RPAD(name,(SELECT MAX(LENGTH(account.name)) AS message FROM (SELECT account.name, SUM(container.money) + account.locker as total_money FROM account JOIN container ON container.account_uid = account.uid WHERE last_connect_at > NOW() - INTERVAL 1 WEEK GROUP BY account.uid    ORDER BY total_money DESC LIMIT 13) account), ' '), ' ', SUM(container.money) + account.locker), 42, ' '    ) message_board_row FROM account JOIN container ON container.account_uid = account.uid GROUP BY    account.uid ORDER BY score DESC LIMIT 13

Make sure this goes on one line and it should yeld the combined container money + locker money ordered by players that have connected in the last week.

Edited by Rollo
  • Like 2

Share this post


Link to post
Share on other sites

Thanks @Rolloyou are a legend. I haven't installed it yet, players have only just been asking me for something like this.

I'll let you know wit goes when I install it. Nice and easy instructions, looking forward to adding this across our servers. 

  • Like 1

Share this post


Link to post
Share on other sites

Nice one @Rollo 

Couple of questions though: 

Quote

Copy exile_ng folder into ##arma_3_server##/@ExileServer/addons/

You mean PBO it and then copy paste it in the folder I'm guessing?

 

Quote

Copy the coordinates from the placed billboards and update the settings you put under ##arma_3_server##/mpmissions/##exile_mission##/config.cpp

How does one set the DIR of the billboard?

Also, I cant seem to get it working even after following everything carefully, but I am however getting this in my server RPT:

Error in expression <ageBoards_getTopTenScores.sqf', false],
];

call ExileNG_system_process_preInit;>
19:25:36   Error position: <];

call ExileNG_system_process_preInit;>
19:25:36   Error Missing [
19:25:36 File exile_ng\bootstrap\fn_preInit.sqf [ExileNG_fnc_preInit], line 40
19:25:36 Error in expression <ageBoards_getTopTenScores.sqf', false],
];

call ExileNG_system_process_preInit;>
19:25:36   Error position: <];

call ExileNG_system_process_preInit;>
19:25:36   Error Missing [
19:25:36 File exile_ng\bootstrap\fn_preInit.sqf [ExileNG_fnc_preInit], line 40

Thanks!

Edit: nevermind found the issue, you have one ',' too much in the preinit file at the last line. 

 

['ExileNG_system_messageBoards_getTopTenScores', 'exile_ng\code\ExileNG_system_messageBoards_getTopTenScores.sqf', false],

should be: 
 

 ['ExileNG_system_messageBoards_getTopTenScores', 'exile_ng\code\ExileNG_system_messageBoards_getTopTenScores.sqf', false]

 

Edited by ILLUXNNN

Share this post


Link to post
Share on other sites

@ILLUXNNN I created the repository quite late and i extracted the code from my running mission so i must have just made a mistake i will correct it on Git. You are 100% correct its not just copy paste it has to be PBOed i will adjust the docs accordingly. Please let me know if you succeeded in getting it working. I would really love the feedback so i can make everyone elses life easier when they installing it.

  • Like 2

Share this post


Link to post
Share on other sites

@Rollo

I was about to get it working but then I was getting these errors, haven't had time to look into them yet: 

 

(_billboard_characters_placeholders selec>
19:41:29   Error position: <_billboard_characters_placeholders selec>
19:41:29   Error Undefined variable in expression: _billboard_characters_placeholders
19:41:29 File exile_ng\code\ExileNG_system_messageBoards.sqf, line 86
19:41:29 Error in expression <oard_character = toString [_x]; };
};

 

Share this post


Link to post
Share on other sites
Advertisement

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.