|
| 13 Apr 2015 07:00 AM |
so I save the players id and accountage when he joins to a datastore, how would I get his/hers specific data?
for i2, v2 in pairs(agedictionary) do ds:SetAsync("Player data: ",{"Player ID: "..d.userId,"Player age: "..agedictionary[d.Name]}) end print(ds:GetAsync("Player data: ")[2])
"Oh yeah? You think I care? Who needs ya! Go on, write what you want! I'm bulletproof, baby!" |
|
|
| Report Abuse |
|
|
DevVince
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 9245 |
|
|
| 13 Apr 2015 07:01 AM |
ew...
Saving it each time for every value???!?!
EW
GG getting data limit every 60 secs from one guy XD
(Use Tables to save..) |
|
|
| Report Abuse |
|
|
DevVince
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 9245 |
|
|
| 13 Apr 2015 07:03 AM |
So you plan to make it save the persons data for one day? 'AccountAge' |
|
|
| Report Abuse |
|
|
|
| 13 Apr 2015 07:04 AM |
agedictionary = { }
game.Players.PlayerAdded:connect(function(d) table.insert(agedictionary,d.userId) agedictionary[d.userId] = d.AccountAge print(d.userId,agedictionary[d.Name]) for i2, v2 in pairs(agedictionary) do ds:SetAsync("Player data: ",{"Player ID: "..d.userId,"Player age: "..agedictionary[d.userId]}) end print(ds:GetAsync("Player data: ")[2]) end)
im saving the data to a table then getting the stuff from the table. am I supposed to save the entire table or something?
am I supposed to use
"Oh yeah? You think I care? Who needs ya! Go on, write what you want! I'm bulletproof, baby!" |
|
|
| Report Abuse |
|
|
DevVince
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 9245 |
|
|
| 13 Apr 2015 07:10 AM |
Well the way DataStore works is:
DatStores = {}
So with that in mind now you must name it the new table you add into it something you can always pull up.
(Save the table with the userId. (NEVER USE PLAYERS NAMES.) )
DataStores = {
Save_1343232 = { gold = 4324 silver = 4535 xp = 54354 level = 434 money = 543 --Get it? }
Save_1 = { --:O roblox's save file umg accounttype = 1337 robux = inf admin = true noob = true canbannoobs = true }
}
--get it? |
|
|
| Report Abuse |
|
|
DevVince
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 9245 |
|
|
| 13 Apr 2015 07:12 AM |
But the best thing about how data store works is you can open and edit someones save file in studio. :D
So if they are an exploiter you can easily reset stats and or make banned true and much more. :o |
|
|
| Report Abuse |
|
|
vacha
|
  |
| Joined: 06 Jan 2011 |
| Total Posts: 1993 |
|
|
| 13 Apr 2015 07:15 AM |
| whaaat? How do you open them in studio? |
|
|
| Report Abuse |
|
|
DevVince
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 9245 |
|
|
| 13 Apr 2015 07:33 AM |
| Same way you load it to a player pretty much. |
|
|
| Report Abuse |
|
|