generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

What's wrong with my new admin commands? (SHORT)

Previous Thread :: Next Thread 
SN0X is not online. SN0X
Joined: 24 Oct 2011
Total Posts: 7277
09 Dec 2012 08:47 AM
local Admins = {"SN0X"}

local function GetArguements(string)
local s = string .. '/'
local args = {}
repeat
args[#args+1] = s:sub(1, s:find('/')-1)
s = s:sub(s:find('/')+1, s:len())
until not s:find('/')
return args
end

local commands = {}

function commands.ADMINTEST(c, a)
local hint = Instance.new("Hint")
if a[2]:lower() == "me" then
hint.Parent = Workspace
hint.Text= "admin yay"
end
end

Game.Players.PlayerAdded:connect(function(p)
if Admins[p.Name] ~= nil then
local args = {}
p.Chatted:connect(function(c)
args = GetArguements(c)
if commands[args[1]:upper()] ~= nil then
commands[args[1]:upper()](p, args)
end
end)
end
end)

When I chat "admintest/me", nothing happens :/
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image