#Creating a General Scoreboard

1 messages · Page 1 of 1 (latest)

soft crane
#

i want to create a general scorebaord that displays for all players and showhow much time they've played

on join:
    set title of fastboard of player to "Timer"

every second in "world":
    set {_count} to 1
    loop all players:
        set line {_count} of fastboard of loop-player to "%loop-player% | %time%"  
        add 1 to {_count}

somthing like that but with the list of all players

worthy hare
soft crane
#

after a lot of try i do this but 2 problem comes

1 : i don't like how the date is showing like how it show "0:0:0" and i want "00:00:00"

2 : i don't see all the online players time

on join:
    set {time::%player%} to 0
    set title of all players' fastboard to "Timer"

function fastboardTimer(p: player):
    add 2 to {time::_p}  # Ajoute 2 secondes au compteur
    set {_m::_p} to 0
    set {_h::_p} to 0

    if {time::_p} > 60:
        set {time::_p} to 0
        add 1 to {_m::_p}

    if {_m::_p} > 60:
        set {_m::_p} to 0
        add 1 to {_h::_p}

    set line 15 of fastboard of {_p} to "Time Played: %{_h::_p}%:%{_m::_p}%:%{time::_p}%"

every 2 second in "world":
    loop all players:  
        fastboardTimer(loop-player)
#

maybe this is not bad :

on join:
    set {time::%player%} to 0
    set title of all players' fastboard to "Timer"

function fastboardTimer(p: player):
    set {_t} to time played of {_p}
    set line 15 of fastboard of {_p} to "Time Played: %{_t}%"

every 2 second in "world":
    loop all players:  
        fastboardTimer(loop-player)
median kayak
#

just remove the function and do it on the on join event update the scoreboard to update the time played