Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is it possible to make seprate player lists For diffrent gamemodes and How?

Asked by 10 years ago

How would i go about making Seprate playerlists for the diffrent gametypes i will make on my game?

3 answers

Log in to vote
1
Answered by
adark 5487 Badge of Merit Moderation Voter Community Moderator
10 years ago

Like juzzby, I don't fully understand what it is you want. For your future reference, in newer questions you should include every little detail you can think of. If you get complaints that some info in extraneous, but all of what is needed is there, good.

Anyway, basically you want to use Tables to hold the player lists. Like so:

gameModes = {
    TDM = {};
    CTF = {};
    --etc.
}

You'll have to manually add players when they enter or leave the specific mode, but that's easily done using table.remove() and table.insert().

To access all players currently in a specific gameMode, use a loop like this:

for i, v in pairs(gameModes.TDM) do
    --code
end
Ad
Log in to vote
0
Answered by 10 years ago

The question is not quite clear to me, but I suppose you wish to manipulate the leaderboards?

This can be done by inserting a value inside the player called "leaderstats" any value you add to that will be added to your leaderboard.

You can also remove values from it, so I suppose you could remove / insert the correct values for each game mode then.

Log in to vote
0
Answered by 10 years ago

First, to do something like this, you would need to remove the player's leaderboard. This is the Wiki for CoreGui, I would recommend going through it.

Anyway, like I said, we will need to remove the leaderboard. That can be done with something such as (in a LocalScript):

for _,v in pairs(game.CoreGui:GetChildren()) do
    if string.lower(v.Name) == string.lower("leaderboard") then
        v:Destroy() --NEVER use Remove. (1)
    else
        return end
    end
end

After that, you SHOULD be able to disable the leaderboard, and be able to create your own leaderboard with GUIs.

NOTE: I will try to read up more on CoreGui, and see if there is another way.

(1) Click here to understand why you never want to use Remove

Answer this question