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
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

abbreviate names in scripts help

Previous Thread :: Next Thread 
RevolutionXPK is not online. RevolutionXPK
Joined: 28 Oct 2011
Total Posts: 785
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 is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
08 Sep 2015 01:46 PM
Nice free model.


Muad'Dib
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
08 Sep 2015 01:53 PM
Nice free model.
Report Abuse
RevolutionXPK is not online. RevolutionXPK
Joined: 28 Oct 2011
Total Posts: 785
08 Sep 2015 02:08 PM
Not a free model

Bump
Report Abuse
robocu3 is not online. robocu3
Joined: 13 Mar 2009
Total Posts: 6485
08 Sep 2015 02:09 PM
lol nice free model 2015


-=Robo=-
Report Abuse
litalela is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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