|
| 08 Sep 2015 01:28 PM |
how do you abbreviate names in scripts like when admin is used you can say: admin/revo not admin/revolutionxpk
i have a script here that i made for my jail system it would be nice to do abbreviated names but i dont know how too do it. how can i make it so i can say jail/revo and not have to use my full name spelled out.
Below is the script............. edit my script to do so and repost it please, dont just say add this line....
print("Revo jail script loaded")
jail = script.Parent
permission = { "RevolutionXPK" }
function check(name) if table.maxn(permission) == 0 then return true end for i = 1,#permission do if (string.upper(name) == string.upper(permission[i])) then return true end end return false end
function Jail(name) local player = game.Players:FindFirstChild(name) local torso = player.Character:FindFirstChild("Torso") if torso == nil then return end local location = {jail.Position} local i = 1
local x = location[i].x local y = location[i].y local z = location[i].z
x = x + math.random(-1, 1) z = z + math.random(-1, 1) y = y + math.random(2, 3)
local cf = torso.CFrame local lx = 0 local ly = y local lz = 0
torso.CFrame = CFrame.new(Vector3.new(x,y,z), Vector3.new(lx,ly,lz)) end
function onChatted(msg, recipient, speaker)
local source = string.lower(speaker.Name) msg = string.lower(msg)
if not check(source) then return end
if string.match(msg, "jail/") then local players=game.Players:GetChildren() for i=1, #players do if string.match(msg, string.lower(players[i].Name)) then Jail(players[i].Name) return end end end end
function onPlayerEntered(newPlayer) newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end) end
game.Players.ChildAdded:connect(onPlayerEntered) |
|
|
| Report Abuse |
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
| |
| |
| |
robocu3
|
  |
| Joined: 13 Mar 2009 |
| Total Posts: 6485 |
|
|
| 08 Sep 2015 02:09 PM |
lol nice free model 2015
-=Robo=- |
|
|
| Report Abuse |
|
litalela
|
  |
| Joined: 30 Mar 2010 |
| Total Posts: 6267 |
|
|
| 08 Sep 2015 02:09 PM |
if you had written this yourself
you'd have the ability to answer your own question
leave
➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ |
|
|
| Report Abuse |
|