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

Map Vote GUI system?

Asked by
lomo0987 250 Moderation Voter
10 years ago

I am looking to create a map vote gui system within the next few weeks. (Depending on how hard it is to create)

What is the most efficient way to do this and what will I need to know? (Wiki links would be very helpful if you don't want to explain everything yourself)

The general idea I had behind this was a main script in workspace that would find the maps in lighting using 'game.Lighting.Maps:GetChidlren' then to randomly pick 3 to vote on. (There would be 3 IntValue's located as a child of the main script 'MapVote1','MapVote2' and 'MapVote3').. Each time a player clicks the gui, it would run a check to see if the player has already voted, if not.. then it would award the IntValue of that map +1 and it will update using .Changed event. It would have a 25 second countdown and after that's up, it would find what one has the highest vote and it would clone that map, delete the old one and the new one would get made. It would then reset all votes for the 'Maps' and the 'Voted' IntValue inside the player.

Would that idea be efficient? Or is there a better way of setting this up?

0
It's not *inefficient* in any way that I can see. Try to write code for this yourself, and edit your question to include it; we'll help you get it working if you run into any problems. :) adark 5487 — 10y
0
Well, I don't even know where to start :/ that's the problem. What I would need to learn to even start to put all of this together :/ lomo0987 250 — 10y
0
I can help because I get your idea and will help in un-organized chunks. HexC3D 830 — 10y
0
But remember I answered your question so please say I answered it on the website :). HexC3D 830 — 10y

1 answer

Log in to vote
0
Answered by
HexC3D 830 Moderation Voter
10 years ago
Map  = game.Lighting.Map:GetChildren()
maps = {}
for i = 1,#Map do
table.insert(Map[i].Name,maps)-- Inserts name
end
for i,v in pairs(game.Players:GetPlayers()) do
v:WaitForDataReady("StarterGui").ScreenGui.z.Text = maps[math.random(1,#maps] -- z is the TextLabel do it for yourself
-- You can get creative :) edit this to your choosing.

This is a basic layout you can work on for your self

-- You can work make multiple makes by increase this number
print(maps[math.random(2,#maps]) -- This will print 2 random maps.

I'm guessing you can work your way around this and get createive, best wishes HexC3D. :)

0
Hmm... I believe this is everything I need. I can do the gui buttons for voting myself... lomo0987 250 — 10y
Ad

Answer this question