zaniac10
|
  |
| Joined: 18 Aug 2009 |
| Total Posts: 10000 |
|
|
| 16 Nov 2014 10:52 AM |
local admins = {} local cmds = { "kill all", "invincible all", "kill me", "invincible me" }
game.Players.PlayerAdded:connect(function(plr) plr.Chatted:connect(function(msg) for i,v in pairs(admins) do if plr.Name == v then if msg == cmds[1]:lower() then for i,v in pairs(game.Players:GetChildren()) do v.Character.Humanoid.Health = 0 end end end end end) end)
it should be making it so only if im in the table it kills everyone, but i was able to run the command even though i wasn't in the table |
|
|
| Report Abuse |
|
|
zaniac10
|
  |
| Joined: 18 Aug 2009 |
| Total Posts: 10000 |
|
| |
|
DevUndead
|
  |
| Joined: 24 Jul 2014 |
| Total Posts: 558 |
|
|
| 16 Nov 2014 11:15 AM |
| Turn off the scrub setting in the Config of ur brain ;) try removing the pairs and stick with I, I don't see why you would need and array |
|
|
| Report Abuse |
|
|
zaniac10
|
  |
| Joined: 18 Aug 2009 |
| Total Posts: 10000 |
|
|
| 16 Nov 2014 11:18 AM |
thanks, this works now:
local admins = {}
game.Players.PlayerAdded:connect(function(plr) plr.Chatted:connect(function(msg) for i = 1,#admins do if plr.Name == i and msg == "kill all" then for index,players in pairs(game.Players:GetChildren()) do players.Character:BreakJoints() end end end end) end)
|
|
|
| Report Abuse |
|
|
|
| 16 Nov 2014 11:18 AM |
| @Dev: What are you talking about? |
|
|
| Report Abuse |
|
|
DevUndead
|
  |
| Joined: 24 Jul 2014 |
| Total Posts: 558 |
|
|
| 16 Nov 2014 11:20 AM |
| Yeah typically arrays are for werid stuff with stuff I don't know or care to learn about but yeah. Stick to on varible unless you have to do something funky leik ur mom |
|
|
| Report Abuse |
|
|
DevUndead
|
  |
| Joined: 24 Jul 2014 |
| Total Posts: 558 |
|
| |
|
|
| 16 Nov 2014 11:22 AM |
Lua does not really have an array, unless you count an indexed table.
Tables are really, REALLY useful data structures. |
|
|
| Report Abuse |
|
|
DevUndead
|
  |
| Joined: 24 Jul 2014 |
| Total Posts: 558 |
|
|
| 16 Nov 2014 11:24 AM |
| Shhh Python is cooler than you |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2014 11:26 AM |
| I don't really like python, because of the indentation blocks. |
|
|
| Report Abuse |
|
|
DevUndead
|
  |
| Joined: 24 Jul 2014 |
| Total Posts: 558 |
|
|
| 16 Nov 2014 11:27 AM |
| One day you'll get eaten by a snake, I just cursed you homie gg |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2014 11:28 AM |
| Do you actually know Lua or Python? |
|
|
| Report Abuse |
|
|
DevUndead
|
  |
| Joined: 24 Jul 2014 |
| Total Posts: 558 |
|
|
| 16 Nov 2014 11:32 AM |
Python for complex data structures and well as matrix rendering, C++,C# for visuals and for matrix rendering and shading. Lua for roblox and for simple games on the iPad. And HTML ruby cas etc for website design for my online portfolio where I recently published a procedural rock generator that generates normals based on vertex placement.
No I don't know ethier sorry |
|
|
| Report Abuse |
|
|
WishNite
|
  |
| Joined: 11 Feb 2009 |
| Total Posts: 15828 |
|
|
| 16 Nov 2014 11:35 AM |
"Lua for simple games"
>LA Noire >WoW >The Guild 2 |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2014 11:36 AM |
"Python for complex data structures and well as matrix rendering, C++,C# for visuals and for matrix rendering and shading."
Ok, what are you talking about? "Matrix rendering"? That would be hardware, although the drivers for the hardware are probably written in C.
"Lua for roblox and for simple games on the iPad."
Lua is actually used very commonly (especially in UIs, it would seem. I hear that the XBox UI is written in Lua for example, as well as the obvious WoW UI is in Lua.)
"And HTML ruby cas etc for website design"
HTML is a markup language, Ruby is, like Lua, a scripting language, so I don't know why you group it with HTML. |
|
|
| Report Abuse |
|
|
DevUndead
|
  |
| Joined: 24 Jul 2014 |
| Total Posts: 558 |
|
|
| 16 Nov 2014 06:06 PM |
| Matrix rendering meaning taking a table of vertices and rendition them throught directx or c++ or OpenGL for Python, that's all I use LUA for is roblox and games on the iPad. And hmtl and ruby makes some nice websites and Uis. Chill dawg |
|
|
| Report Abuse |
|
|
|
| 16 Nov 2014 06:30 PM |
You are aware that both DirectX and OpenGL can be used in whatever language they have support for, right?
DirectX is not "for C++" and OpenGL is not "for Python". |
|
|
| Report Abuse |
|
|