Jump to content

[Score]


Numinex97

Recommended Posts

Posted

Hello,

I want to make some script like when I kill another player I will get some score, and I can buy some things (weapons, heal...) with that score... Is possible to save that score for every player after thay log off and log in...

If somebody can help me i will be very happy...

Sorry for my bad English.

Posted

Well, if you wanna create the "Score" column on scoreboard, you can use

exports [ "scoreboard" ]:addScoreboardColumn ( "Score" ) 

and If you wanna save the scores on the account

You must use

setAccountData 
getAccountData 

If you wanna use 'scores' to buy ammo etc, i think you'll need to create your own functions like getPlayerScore etc.

Posted
Well, if you wanna create the "Score" column on scoreboard, you can use
exports [ "scoreboard" ]:addScoreboardColumn ( "Score" ) 

and If you wanna save the scores on the account

You must use

setAccountData 
getAccountData 

If you wanna use 'scores' to buy ammo etc, i think you'll need to create your own functions like getPlayerScore etc.

You're missing that scoreboard will only display Element Data "Score", it will not get the account data.

Posted
He wanted to save the scores when player leaves/joins. setAccountData for him to store it into his account.

And make the scoreboard thingy. That will only add it, not set any value in it to any player.

Posted

Ah my bad, i forgot to add setElementData xD

To: Numinex97

You can use setElementData to set a value for the scores.

setElementData 

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.
×
×
  • Create New...