|
| 07 May 2014 08:21 PM |
| I wanna sort of save the names of players who enter my game? Would that be possible? |
|
|
| Report Abuse |
|
|
|
| 07 May 2014 08:22 PM |
Yes.
You could use an ordered data store to count their visits. I would have no problem making that for you if you want. |
|
|
| Report Abuse |
|
|
|
| 07 May 2014 08:25 PM |
| That would be great o.o Can you do it? I'm not good with data stuff. |
|
|
| Report Abuse |
|
|
|
| 07 May 2014 08:28 PM |
| How do you want it? Top 10 Most Visits per Visitor, or just save the times they visited on a leaderboard, both, or/and just save their names? |
|
|
| Report Abuse |
|
|
|
| 07 May 2014 08:29 PM |
| Just the names and how many times they visited. That would be GREAT. :D |
|
|
| Report Abuse |
|
|
|
| 07 May 2014 08:33 PM |
| im looking for same thing too, a who visited and how much leaderboard |
|
|
| Report Abuse |
|
|
|
| 07 May 2014 08:45 PM |
try this and let me know if it fails
local ds = game:GetService("DataStoreService"):GetDataStore("visits")
function n(player) player:WaitForDataReady() local save = player.Name local ls, visits = Instance.new("IntValue", player), Instance.new("IntValue", ls) ls.Name, visits.Name = "leaderstats", "Visits" -- Their names are in the data store, and the times visited is if they are in game -- I can do a global leaderboard though if ds:GetAsync(save) ~= nil then visits.Value = ds:GetAsync(save) else visits.Value = 0 wait(2.5) ds:IncrementAsync(save, 1) end end
game.Players.PlayerAdded:connect(n) |
|
|
| Report Abuse |
|
|
| |
|
|
| 07 May 2014 09:01 PM |
| Jimmy has the right idea though. |
|
|
| Report Abuse |
|
|
|
| 07 May 2014 09:01 PM |
| replace DataStoreService with ServerStorage |
|
|
| Report Abuse |
|
|
|
| 07 May 2014 09:09 PM |
This one works if you put it inside a script in Workspace, do not modify it before you test it out.
-- @ JimmyChance
local store = game:GetService("DataStoreService"):GetOrderedDataStore("Visited")
game.Players.PlayerAdded:connect(function(player) player:WaitForDataReady() local ls = Instance.new("IntValue", player) ls.Name = "leaderstats" local visits = Instance.new("IntValue", ls) visits.Name = "Visits" -- pl0x local k = player.Name.." visits" if store:GetAsync(k) ~= nil then visits.Value = store:GetAsync(k) else visits.Value = 0 end store:IncrementAsync(k, 1) end) |
|
|
| Report Abuse |
|
|
|
| 07 May 2014 09:11 PM |
Jimmy, you look like a good scripter. Can you fix this? D:
http://www.roblox.com/Forum/ShowPost.aspx?PostID=133011500 |
|
|
| Report Abuse |
|
|
|
| 07 May 2014 09:18 PM |
| Jimmy, that one didn't work either. :P |
|
|
| Report Abuse |
|
|
|
| 07 May 2014 10:08 PM |
| Yes it does, you are doing something that is messing it up then. |
|
|
| Report Abuse |
|
|
TxOreo1
|
  |
| Joined: 13 Apr 2014 |
| Total Posts: 34 |
|
|
| 07 May 2014 10:32 PM |
Strangest thing
Jimmy
Chance
WHite boy name
Black avatar
Can code, wtf since when black ppl code |
|
|
| Report Abuse |
|
|
|
| 08 May 2014 02:52 PM |
| ._. Trying to be racist? I know a lot of BLACK people who can program. I know white people who can program too. There isn't much of a difference other than the color. They can both program. It's not that rare. -.- |
|
|
| Report Abuse |
|
|
|
| 08 May 2014 03:03 PM |
| brb i am going to create a free model |
|
|
| Report Abuse |
|
|
|
| 08 May 2014 03:17 PM |
| Can someone help make a leaderboard for a score? |
|
|
| Report Abuse |
|
|
|
| 08 May 2014 03:26 PM |
local ods = game:GetService("DataStoreService"):GetOrderedDataStore("Visits")
game.Players.PlayerAdded:connect(function(p) if not ods:GetAsync(p.userId.."Visits")then ods:SetAsync(p.userId.."Visits")end wait(1) ods:UpdateAsync(p.userId.."Visits",function(old)return old+1 end) end)
this have to be in workspace and will count visits(you just have to create a gui that will show all those ) |
|
|
| Report Abuse |
|
|