Raised This Month: $32 Target: $400
 8% 

[JavaScript & AMXX] Live Scoreboard


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
LuKks
Senior Member
Join Date: Dec 2012
Location: Argentina, Santa Fe
Old 03-09-2019 , 14:49   [JavaScript & AMXX] Live Scoreboard
Reply With Quote #1

What does the plugin do?
Inside the server, nothing really.
Install the plugin and enter the following link:
https://lukks.github.io/live-scoreboard/?ip:port
* replace the ip and port.



You can install the files on your website (without database or anything, just upload the files).
It also shows when it is Vip, Dead or has C4.
In addition, it works locally: https://vgy.me/mgYU8u.jpg

Requirements:
* Sockets Async by Destro
* Port open: 65535 - server port. For example, for 127.0.0.1:27015 -> 38520.

Thank you:
@Destro for your module to handle sockets and cryptography stock.
@Milashkasiya I saw your Half-Life Main Page Simulator and then it occurred to me to replicate the scoreboard.
@Pan-Bimbo you helped me with a question with the end of line that was not working.

Ideas:
+ I plan to add in the top left, for example, "220fps 3/12 de_dust2".
+ Make the ping have a +-3 so that it does not update as many times (anyway is optimal because it's updated per player).
? It would have been perfect with ReactJS (it reduces some cpu to the browser) but I wanted everyone to be able to handle the files well.

Note:
You can't use the cryptography stock of Destro, it has to be the one attached here.
GitHub: https://github.com/LuKks/live-scoreboard

Last changes:
Replica of the say on web: now you can write bidirectionally. Idea from @levinx
Fixed who is c4. Report of @pallaroid
Small optimizations.

Spanish version: https://amxmodx-es.com/Thread-JavaSc...ive-Scoreboard
Attached Files
File Type: sma Get Plugin or Get Source (live_scoreboard.sma - 377 views - 6.9 KB)
File Type: inc live_scoreboard.inc (7.3 KB, 264 views)
File Type: zip live_scoreboard.zip (753.1 KB, 290 views)

Last edited by LuKks; 03-11-2019 at 07:19. Reason: added port open calculation
LuKks is offline
DevilBoy.eXe
Member
Join Date: Mar 2017
Location: Romania
Old 03-09-2019 , 16:54   Re: [JavaScript & AMXX] Live Scoreboard
Reply With Quote #2

Dosen't work for me
I installed the module and plugin and nothing, there must be any port open?
__________________

DevilBoy.eXe is offline
Send a message via Yahoo to DevilBoy.eXe Send a message via Skype™ to DevilBoy.eXe
JocAnis
Veteran Member
Join Date: Jun 2010
Old 03-09-2019 , 17:52   Re: [JavaScript & AMXX] Live Scoreboard
Reply With Quote #3

amazing..its also having chat there :O
can you give any IP to see it live as example?
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
LuKks
Senior Member
Join Date: Dec 2012
Location: Argentina, Santa Fe
Old 03-09-2019 , 21:13   Re: [JavaScript & AMXX] Live Scoreboard
Reply With Quote #4

Quote:
Originally Posted by DevilBoy.eXe View Post
Dosen't work for me
I installed the module and plugin and nothing, there must be any port open?
You are right, I forget say it. The port open should be 65535 - server port.

Quote:
Originally Posted by JocAnis View Post
amazing..its also having chat there :O
can you give any IP to see it live as example?
I don't have online servers but you can test on localhost as I do.
LuKks is offline
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 03-09-2019 , 23:54   Re: [JavaScript & AMXX] Live Scoreboard
Reply With Quote #5

GOOD JOB
SHIELD755 is offline
thEsp
BANNED
Join Date: Aug 2017
Old 03-10-2019 , 06:58   Re: [JavaScript & AMXX] Live Scoreboard
Reply With Quote #6

Great, I wonder how long did it take you to code it ?
thEsp is offline
LuKks
Senior Member
Join Date: Dec 2012
Location: Argentina, Santa Fe
Old 03-10-2019 , 22:40   Re: [JavaScript & AMXX] Live Scoreboard
Reply With Quote #7

Quote:
Originally Posted by thEsp View Post
Great, I wonder how long did it take you to code it ?
I appreciate the interest.
Short answer: About 2-3 days because are two versions so they was different days.

The difficult part was make the helper functions for websocket connection (socket_handshake, socket_mask and socket_unmask) because the module Sockets Async don't handle websockets directly so you have to do it yourself (now you can use my functions).

In the second version (actually this last one) I make the say replication then I need send from browser to server too, so I made socket_unmask but also I find one bug with socket_mask sending large data and some pending optimizations, everything solved.
* socket_handshake is for establish the initial connection.

The frontend design is not complex, you can see the .css with few lines.

The JavaScript part was not difficult because it's my main language. Note: don't expect that the code be perfect (except the helper functions), it's just a informal plugin.

Pawn/AMXX was my first language for several years, so..
LuKks is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 03-10-2019 , 23:18   Re: [JavaScript & AMXX] Live Scoreboard
Reply With Quote #8

PHP Code:
L 03/10/2019 18:55:15: [AMXX]    [0live_scoreboard.sma::socket_all (line 124)
L 03/10/2019 18:55:15: [AMXX]    [1live_scoreboard.sma::plugin_end (line 52)
L 03/10/2019 19:22:59Start of error session.
L 03/10/2019 19:22:59Info (map "de_eldorado") (file "addons/amxmodx/logs/error_20190310.log")
L 03/10/2019 19:22:59Invalid array handle provided (0)
L 03/10/2019 19:22:59: [AMXXDisplaying debug trace (plugin "live_scoreboard.amxx"version "1.0.0")
L 03/10/2019 19:22:59: [AMXXRun time error 10native error (native "ArraySize")
L 03/10/2019 19:22:59: [AMXX]    [0live_scoreboard.sma::socket_all (line 124)
L 03/10/2019 19:22:59: [AMXX]    [1live_scoreboard.sma::plugin_end (line 52)
L 03/10/2019 19:37:53Start of error session.
L 03/10/2019 19:37:53Info (map "zs_lostcity") (file "addons/amxmodx/logs/error_20190310.log")
L 03/10/2019 19:37:53Invalid array handle provided (0)
L 03/10/2019 19:37:53: [AMXXDisplaying debug trace (plugin "live_scoreboard.amxx"version "1.0.0")
L 03/10/2019 19:37:53: [AMXXRun time error 10native error (native "ArraySize")
L 03/10/2019 19:37:53: [AMXX]    [0live_scoreboard.sma::socket_all (line 124)
L 03/10/2019 19:37:53: [AMXX]    [1live_scoreboard.sma::plugin_end (line 52
PHP Code:
L 03/10/2019 19:23:00: [errfailed to bind
L 03
/10/2019 19:37:55: [errfailed to bind 
L 02/28/2019 - 09:596: Log file started (file "czero/addons/amxmodx/logs/live_scoreboard.log") (game "czero") (amx "1.8.3-dev+5134")
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
LuKks
Senior Member
Join Date: Dec 2012
Location: Argentina, Santa Fe
Old 03-11-2019 , 07:25   Re: [JavaScript & AMXX] Live Scoreboard
Reply With Quote #9

The run time error was because if the socket not bind then the array is not created, so in plugin_end makes error. I updated the source with the fix, I just moved the array creation.

And "failed to bind" because you don't have the port opened. Check the requeriments.

Thank you for the report :)
LuKks is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 03-11-2019 , 11:31   Re: [JavaScript & AMXX] Live Scoreboard
Reply With Quote #10

Quote:
Originally Posted by LuKks View Post
The run time error was because if the socket not bind then the array is not created, so in plugin_end makes error. I updated the source with the fix, I just moved the array creation.

And "failed to bind" because you don't have the port opened. Check the requeriments.

Thank you for the report

I will apply the fix and update you.

I had the previous version where you had it posted on the es forums. It worked fine there. Weird now the port is not open.


Edit:
Updated the plugin. Still does not work. The ports and everything are all open
__________________

Last edited by DruGzOG; 03-11-2019 at 16:37.
DruGzOG is offline
Send a message via AIM to DruGzOG
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:35.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode