|
| 11 Apr 2012 04:59 PM |
Basically Reset the server? I need to find all the players and Delete all their tools.. and Need to change a few items in the PLayer. How could i get every player in the Players tab?
~Working towards that PSTF..~ |
|
|
| Report Abuse |
|
|
MrNicNac
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 26567 |
|
|
| 11 Apr 2012 05:01 PM |
for i,player in pairs(Game.Players:GetPlayers()) print(player.Name) end |
|
|
| Report Abuse |
|
|
|
| 11 Apr 2012 05:02 PM |
| Explain, if you want to reset the server you could always click "Shutdown" :3 |
|
|
| Report Abuse |
|
|
|
| 11 Apr 2012 05:05 PM |
@MrNicNac How would I implicate that so that i could go into the player's backpack or PlayerGui or something? would it be
i.Backpack.Tool?
~Working towards that PSTF..~ |
|
|
| Report Abuse |
|
|
MrNicNac
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 26567 |
|
|
| 11 Apr 2012 05:06 PM |
.........No......
*in the for loop*
table.foreach(player.Backpack:GetChildren(), function(i,v) v:Destroy() end) |
|
|
| Report Abuse |
|
|
|
| 11 Apr 2012 05:07 PM |
Ok, thanks
~Working towards that PSTF..~ |
|
|
| Report Abuse |
|
|
Phellem
|
  |
| Joined: 04 Aug 2011 |
| Total Posts: 1984 |
|
|
| 11 Apr 2012 05:14 PM |
"table.foreach(player.Backpack:GetChildren(), function(i,v) v:Destroy() end)"
Why does the wiki told us this: "This item is deprecated; use the pairs() function instead!" |
|
|
| Report Abuse |
|
|
MrNicNac
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 26567 |
|
|
| 11 Apr 2012 05:15 PM |
| Yes, it's deprecated, but I used it anyways to avoid more looping confusing - obviously he's a bit new to the generic for loops. |
|
|
| Report Abuse |
|
|
|
| 11 Apr 2012 05:19 PM |
Im not good with 'for i,v in pairs' and tables.
~Working towards that PSTF..~ |
|
|
| Report Abuse |
|
|
Phellem
|
  |
| Joined: 04 Aug 2011 |
| Total Posts: 1984 |
|
|
| 11 Apr 2012 05:22 PM |
Learn the 'for loop' first. It will help you with the pairs() function and stuff. |
|
|
| Report Abuse |
|
|