1

Scoreboard help please?

1 emerald 6 replies 60 views | started 09/12/2017 11:29 pm by T-R-S
so im trying to make a coins scoreboard, and i made it with an offline player that i dont know. (player=coins)
so i do a testfor @p[score_Coins_min=100] it doesnt work because i need to make it player specific. does any1 know how to do this?
Posted by avatar
T-R-S
Level 1 : New Miner
0

6 replies

1
09/13/2017 2:13 pm
Level 53 Grandmaster Cyborg
Pepijn
avatar
You are using what is called a "fake player" if I'm correct. Which basically means you're assigning a score to a non-existent player. This is totally fine but it comes with some limitations.

The main limitation is that you CAN'T test for fake-player scores using normal target selectors (like @a[score_Coins_min=1].

If you did:
scoreboard players set EXAMPLE Coins 1
You can test for the score from the fake-player Example using this:
scoreboard players test EXAMPLE coins 1 1
1
09/13/2017 6:06 am
Level 9 Apprentice Miner
pyrotrooper14
avatar
Ok, so basically you want to give or do something while you are testing for a command..
So, lets us visualise the basics.

Here is your coin scoreboard

/scoreboard objectives add Coins
/scoreboard objectives setdisplay Coins sidebar

Now that you have made your scoreboard,
Let us add a few points to the scoreboard.

/scoreboard players add Coins 1

If we do a repetitive command as above , you will end up using a lot of time.

The idea you have mentioned above wont work if u are making a shop.. as it is no longer supported in 1.12 plus.

So u will have to give the player a balance.

/scoreboard players add Coins 500

You could take any amount.. I'll take 500.
So now that the player has a balance..
He could fill it up again. [set a contraption for that]

Now you want to make the player teleport / buy / sell

So if you want him to teleport, make a button teleporting to the xyz coordinates.
and deduct coins from him.
/scoreboard players set Coins 450
[do the same with the shop if u make it]

OR

if you are testing for his score,
then ..

/testfor @p[score_Coins_min=1_max=100

or on a server,

/testfor @rscore_Coins_min=1_max=100]

Done!

For more help,
Subscribe to me and ya..
follow me :=]

Bye,
pyro
1
09/13/2017 5:20 am
Level 5 Apprentice Crafter
Void_Strider_
avatar
Wait so like.. are you trying to give every player a score e.g. PlayerCoins = 0?
Then I assume you get coins some how then you want to test to see if they have the required amount (100) before doing something? (e.g. /give /teleport etc.)?



If you are trying @p you will need to test the closet player you need to run the command through a command block. (Not just type it in or use the server console). On yourself (the one executing the command) use @s. Hope this helps, I'll try to be more useful when I get a better idea of what you doing :)
-Void
1
09/13/2017 2:15 am
Level 1 New Miner
T-R-S
avatar
i did the player for the color and i used the basic scoreboard commands
1
09/13/2017 6:07 am
Level 9 Apprentice Miner
pyrotrooper14
avatar
add the player to a team

and give option for color
1
09/12/2017 11:46 pm
Level 3 Apprentice Mage
TheGalaxyCat
avatar
Well I need more details. Like why did you make a player for it what is it for and commands you used to set up your coin system.

Search

Browse

Site

© planetminecraft.com

Welcome