|
| 10 Apr 2014 05:11 PM |
| How do I make a command that when I say ":give all gpr" it gives all players the gpr used in RCL. |
|
|
| Report Abuse |
|
|
Delones
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 1703 |
|
|
| 10 Apr 2014 05:12 PM |
Use kohls put gpr in lighting bam
Time is a tool you can put on a wall, or wear it on your rizd. |
|
|
| Report Abuse |
|
|
MrYouChew
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 4326 |
|
|
| 10 Apr 2014 05:16 PM |
If you want to do it with kohls admin, or any other admin:
1. Get a kohl's admin script from your toolbox or catalog (Kohl's admin V2 works best for most people) 2. Get a GPR and PSTL from your toolbox or catalog. They have to be TOOLS, not models. 3. Place the tools in lighting, along with any other tools 4. When you make your admin so you are the owner, say ':give all GPR' to give them the GPR tool, stored in lighting.
If you want an actual command:
function onChatted(msg, recipient, speaker)
local source = string.lower(speaker.Name) -- Converts name of speaker to lowercase msg = string.lower(msg)
if (msg == ":give all gpr") then game.Lighting.GPR:MoveTo(game.StarterPack) end
end
function onPlayerEntered(newPlayer) newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end) end
game.Players.ChildAdded:connect(onPlayerEntered)
|
|
|
| Report Abuse |
|
|
devRaver
|
  |
| Joined: 08 Apr 2013 |
| Total Posts: 531 |
|
|
| 10 Apr 2014 05:17 PM |
local admins = {"UsernameHere"}
function Admin(t, value) for _, v in pairs(t) do if v == value then return true end end return false end
function Command(message, player) if message:sub(1, 12) == "give all gpr" and Admin(admins, player.Name) then give = findPlayer(message:sub(13)) if give then gpr = PathToGPRHere:clone() gpr.Parent = give.Backpack end end end
game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(message) onChatted(message, player) end) end)
I'm not sure if this would work, but I basically took an admin script tutorial from the wiki and altered it. I'm not the most competent scripter, but hey, at least I tried. ;3 |
|
|
| Report Abuse |
|
|
devRaver
|
  |
| Joined: 08 Apr 2013 |
| Total Posts: 531 |
|
|
| 10 Apr 2014 05:18 PM |
give = findPlayer(message:sub(13))
Change to:
give = findPlayer(message:sub(14)) |
|
|
| Report Abuse |
|
|
NeonRiver
|
  |
| Joined: 12 Feb 2013 |
| Total Posts: 4936 |
|
| |
|
NeonRiver
|
  |
| Joined: 12 Feb 2013 |
| Total Posts: 4936 |
|
| |
|
NeonRiver
|
  |
| Joined: 12 Feb 2013 |
| Total Posts: 4936 |
|
| |
|
|
| 10 Apr 2014 06:08 PM |
gawd ppl..
put the tool in lighting (make sure its named "gpr")
Lighting -gpr
admins = {"yournamehere","maybeanothername","etc"}
function check(name) for I,v in pairs(admins) do if v == name then return true end end return false end end
game.Players.PlayerAddded:connect(function(p) if check(p.Name) then
p.Chatted:connect(function(msg) if msg:sub(1,10) == ":give all" then gear = msg:sub(11) for I,v in pairs(game.Players:children()) do ypcall(function() game.Lighting[gear]:clone().Parent = v.Backpack end) end end end)
end
end)
|
|
|
| Report Abuse |
|
|
|
| 10 Apr 2014 06:09 PM |
oop,change this if msg:sub(1,10) == ":give all" then gear = msg:sub(11)
to this
if msg:sub(1,11) == ":give all " then gear = msg:sub(12)
|
|
|
| Report Abuse |
|
|