|
| 06 Aug 2012 06:49 PM |
So, I'm scripting admin commands. Currently, I have no idea to make it so I can abbreviate.
with person 299's, you can say kill/Mass Instead of having to say, kill/MassiveGman
How do I make it so I can just abbreviate the name? I have a feeling it is a simple fix..
Thanks for any help!
-:MassiveGman |
|
|
| Report Abuse |
|
|
Dr01d3k4
|
  |
| Joined: 11 Oct 2007 |
| Total Posts: 17916 |
|
|
| 06 Aug 2012 06:50 PM |
Look into the string.find function.
http://wiki.roblox.com/index.php/Function_Dump/String_Manipulation#string.find |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2012 06:51 PM |
| Hmm... Look at Person299's Commands very good |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2012 06:54 PM |
I understand the string.find,
but I still do not understand how to apply it to this certain situation..
-:Massive |
|
|
| Report Abuse |
|
|
Dr01d3k4
|
  |
| Joined: 11 Oct 2007 |
| Total Posts: 17916 |
|
|
| 06 Aug 2012 06:58 PM |
function returnLikelyPlayer(nm) for _, p in pairs(game.Players:GetChildren()) do if (p.Name:lower():find(nm:lower()) then return p; end end end |
|
|
| Report Abuse |
|
|
| |
|
Dr01d3k4
|
  |
| Joined: 11 Oct 2007 |
| Total Posts: 17916 |
|
| |
|