Scoreboard error

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Brok3nmind

Active Member
Feb 3, 2017
66
1
8
Germany
darkvoid.eu
I made a scoreboard, but the coins are for every one need. It try to explain my problem when i give player 1 $1000 and player 2 $100 will the scoreboard show $1000 for everyone how can i fix this ? but when i type the command /coins will that show the right ammount of money

Scoreboard:
code_language.skript:
function Scoreboard(p: player):
    wipe {_p}'s sidebar
    set name of sidebar of {_p} to "&6&lCreepCraft&8.&6&lnet"
    set score "&6Server&8:" in sidebar of {_p} to 11
    set score "&a%{_p}'s world%" in sidebar of {_p} to 10
    set score "&2" in sidebar of {_p} to 9
    set score "&bOnline&8:" in sidebar of {_p} to 8
    set score "%number of all players% / 1500" in sidebar of {_p} to 7
    set score "&1" in sidebar of {_p} to 6
    set score "&eCoins&8:" in sidebar of {_p} to 5
    set score "&a$%{coins::%{_p}%}%" in sidebar of {_p} to 4
    set score "&0" in sidebar of {_p} to 3
    set score "&3Shop&8:" in sidebar of {_p} to 2
    set score "&fCreepCraft.net" in sidebar of {_p} to 1
 
on join:
    wait 4 ticks
    Scoreboard(player)
 
on load:
    loop all players:
        Scoreboard(loop-player)
Money Skript:
code_language.skript:
#Money

options:
    noperms: &8[&eMoney&8] &cYou don't have enough permissions.
   
variables:
    {money.%player%} = 0
every 3 ticks:
    loop all players:
        if {money.%loop-player%} > 1000000000:
            set {money.%loop-player%} to 1000000000
            send "&6&lSystem&8: &7You can't have more than &a$1000000000" to loop-player
command /coins [<text>] [<offlineplayer>] [<integer>]:
    aliases: money, balance
    trigger:
        if arg-1 is not set:
            send "&6&lSystem&8: &7You have &a$%{money.%player%}%"
            stop
        if player has permission "modify.coins":
            if arg-1 is "remove":
                if arg 2 is set:
                    if arg 3 is set:
                        if arg 3 is 0:
                            send "&6&lSystem&8: &7You can't remove &2%arg-2% &a$0" to sender
                        else:
                            remove arg 3 from {money.%arg 2%}
                            send "&6&lSystem&8: &7You removed &a$%arg 3% from &2%arg 2%" to sender
                            send "&6&lSystem&8: &7Your account balance has been reduced by &a$%arg 3%" to arg-2
                            stop
                    else:
                        send "&6&lSystem&8: &7/Coins remove &7player &cammount"
                else:
                    send "&6&lSystem&8: &7/Coins remove &cplayer &7ammount"
            if arg-1 is "add":
                if arg 2 is set:
                    if arg 3 is set:
                        if arg 3 is 0:
                            send "&6&lSystem&8: &7You can't give &2%arg-2% &a$0" to sender
                        else:
                            add arg 3 to {money.%arg 2%}
                            send "&6&lSystem&8: &7You added &a$%arg 3% &7to &2%arg 2%" to sender
                            send "&6&lSystem&8: &7You became &a$%arg 3% &7your new balance is &a$%{money.%arg-2%}%" to arg-2
                            stop
                    else:
                        send "&6&lSystem&8: &7/Coins add &7player &cammount"
                else:
                    send "&6&lSystem&8: &7/Coins ad &cplayer &7ammount"
            if arg-1 is "set":
                if arg 2 is set:
                    if arg 3 is set:
                        set {money.%arg 2%} to arg 3
                        send "&6&lSystem&8: &7You have set the money from &2%arg 2% &7to &a$%arg 3%&7." to sender
                        send "&6&lSystem&8: &7Your balance has been set to &a$%{money.%arg-2%}%" to arg-2
                        stop
                    else:
                        send "&6&lSystem&8: &7/Coins set &7player &cammount"
                else:
                    send "&6&lSystem&8: &7/Coins set &cplayer &7ammount"
            if arg-1 is "delete":
                if arg 2 is set:
                    set {money.%arg 2%} to 0
                    send "&6&lSystem&8: &7You have set the money from &2%arg 2% &7to &a$%arg 3%&7." to sender
                    send "&6&lSystem&8: &7Your balance has been set to &a$%{money.%arg-2%}%" to arg-2
                    stop
                else:
                    send "&6&lSystem&8: &7/Coins &7delete &cplay"
        else:
            send "&6&lSystem&8: &cYou don't have the permission" to sender
               

#command /pay [<player>] [<integer>]:
#    trigger:
#        if arg 1 is not set:
#            send "&6&lSystem&8: &cUsage: /pay <player> <amount>" to sender
#            stop
#        if arg 1 is "%sender%":
#            send "&6&lSystem&8: &cYou can not send yourself money." to sender
#            stop
#        if arg 2 is not set:
#            send "&6&lSystem&8: &cUsage: /pay <player> <amount>" to sender
#            stop
#        if arg 2 is set:
#            if arg 2 is less than 1:
#                send "&6&lSystem&8: &cYou can not send less than 0 money to someone." to sender
#            if arg 2 is bigger than 0:
#                if arg 2 is less than {money.%sender%} +1:
#                    add arg 2 to {money.%arg 1%}
#                    remove arg 2 from {money.%sender%}
#                    send "&6&lSystem&8: &7You have paid &c%arg 1% $%arg 2%&7." to sender
#                    send "&6&lSystem&8: &c%sender% &7has paid you &c$%arg 2%&7." to arg 1
#                else:
#                    send "&6&lSystem&8: &cYou can not send more money to someone like you." to sender
 
You're using different variables for the player's money in the two scripts...
 
The {money.%player%} one probably
 
Try toggling fast scoreboards in the config
 
Might work, but this isn't Skript's problem
[doublepost=1533705138,1533668359][/doublepost]You can try Skore (very new)
 
Ok i'll try it
[doublepost=1534017494][/doublepost]
It dont works its on minecraft version 1.12
Do you have TitleManager? If not, install it. If you do have it, does it start? Do you get any console errors?
 
Status
Not open for further replies.