ID:273274
 
Well, i know how to do the Scores but now i need to set a limit there is any way to set it?

-Gohan
You limit the scores in-game so that scores beyond the limit are never sent to the hub.
In response to Nadrew
Ok, how do i set the Limit in game?? Something Like This?


var/maxscores=50
var/addedscores=0

mob/verb/Update_Scores()
set name = "Update Scores"
world<<"<font color = green><b><font face = tahoma>GM: </font></font></b><b><font face = tahoma>Updating Scores"
sleep(30)
world<<"<font color = green><b><font face = tahoma>GM: </font></font></b><b><font face = tahoma>Scores Updated"
for(var/mob/M in world)
if(M.client)
if(addedscores >= maxscores)
usr<<"Sorry, but the Hub Has Reached Score Limit"
else

params = list("Score"=src.Score)
world.SetScores("[src.key]", list2params(params), "GohanGames.DragonBallZUltimateWarriors", "NEVER GIVE YOUR HUB PASSWORD =O")
addedscores+=1


-Gohan
In response to Gohan Games
I'm not sure what you mean by limiting scores, so that's the real question. The code you have here will allow only the first 50 players to update their scores, and then it will stop updating altogether. If you have 11 players it would get through this routine only four full times and fail partway through the fifth. That probably isn't what you want.

Two side notes: In your HTML, avoid putting spaces between an attribute and the value. Use face=tahoma instead of face = tahoma. And for security, in SetScores() and similar procs I recommend not including your hub path and password at all; they will use the correct values by default.

Lummox JR
In response to Lummox JR
Yea, Limit Scores, because all players will be in the Ranking of the hub. I need to do something like this: Set a Limit of Scores, and if a player Reach the Last Player Score in HUB That Player in the HUB Score Dissapear and enter the player who reached hes score.