Blocks: ------------------------------------------------------------------------- LoadHighScore: Put all players in the HighScore list (NOTE: look at lineFormat variable) RegisterHighScore <PlayerName> <Score>: Add a player and his score to the list NOTE if maxplayer variable limits the list and player score is smaller than the lowest rank, player's score won't be saved. Throws ERR_GUEST if player didn't logged in ChangePlayerScore <PlayerName> <NewScore>: Change the score of a player. Throws ERR_PLAYER_NOT_FOUND event if player does not exist DeletePlayerRecord <PlayerName>: Removes a player and his score from the hish score list. Throws ERR_PLAYER_NOT_FOUND event if player does not exist. GetPlayerRank <PlayerName>: Returns the rank of the player. This method writes on the out variable. Returns -1 if player does not exist. GetPlayerScore <PlayerName>: Returns the score of the player. This method writes on the out variable. Returns -1 if player does not exist. GetPlayerNameByRank <RankNum> Returns the name of the player who has the rank entered (ex. RankNum:1 returns the first player) if player does not exist returns -1. Output is saved in the out variable. GetCloudUsage: Returns how much space cloud variable is using. Methods you don't have to use: SaveHighScore - Do NOT use this LoadCloudToTemp AddFormatLine ------------------------------------------------------------------------- Variables: HIGHSCORES: Variable which holds player names and scores. maxPlayers: Limits how many players can be on the high score list. Set it to 0 for no limit. lineFormat: Layout for each line on the high score list. IMPORTANT: Put space between each symbol \p: Name of the player \r: Rank of the player \s: Score of the player \fp, fr, fs: Same as others but puts chars before them to list them on the same order. <text>: Writes text Preferred format: \fs < > \fp <: > \s FixScorePrefix, FixRankPrefix, FixPlayerPrefix: String to put in \fs, \fp, \fr symbols. Out: Output for Get... methods. ------------------------------------------------------------------------- Lists: High Scores: List where scores will be exported Temp lists/vars: Additional memory for method variables and arrays. Do NOT delete these lists
Thx to JIF 4 -1 iq. Read the instructions before using. If you are using this library on your project please don't forget to credit.