|
| 01 Aug 2011 07:21 PM |
How Would This Work And Would It? And If It Doesn't How Would I Make It Work?
Thanks, JesseMcCullough9292 |
|
|
| Report Abuse |
|
|
Ulla42
|
  |
| Joined: 14 Dec 2009 |
| Total Posts: 1774 |
|
| |
|
|
| 01 Aug 2011 07:24 PM |
OMG I FORGOT THE CODE xD if string.sub(msg,1,2) == "m/" then--Message z = game.Workspace:GetChildren() for i = 1,#z do if z[i].className == "Message" then z[i]:Remove() end end m = Instance.new("Message") m.Parent = game.Workspace m.Text = me.Name..": "..string.sub(msg,3) wait(string.sub(msg,3)) m:Remove() end |
|
|
| Report Abuse |
|
|
|
| 01 Aug 2011 07:26 PM |
| No, you can't wait strings as long as I know. o: |
|
|
| Report Abuse |
|
|
Ulla42
|
  |
| Joined: 14 Dec 2009 |
| Total Posts: 1774 |
|
|
| 01 Aug 2011 07:26 PM |
Thank you. Check into Person299's admin script about commands and it should give the basic run-out over it. I don't remember indexing msg,3 |
|
|
| Report Abuse |
|
|
| |
|
Ulla42
|
  |
| Joined: 14 Dec 2009 |
| Total Posts: 1774 |
|
|
| 01 Aug 2011 07:27 PM |
@Electric Roblox indexes values and strings strangely, opposed to the .NET framework, theres no need for ToNumber, so it should work... |
|
|
| Report Abuse |
|
|
|
| 01 Aug 2011 07:28 PM |
Ulla, why would he message this:
m/3
To have "ElectricAxel : 3" for 3 seconds on screen? Thats obviously not what he wants. -.- |
|
|
| Report Abuse |
|
|
Ulla42
|
  |
| Joined: 14 Dec 2009 |
| Total Posts: 1774 |
|
|
| 01 Aug 2011 07:28 PM |
Person299's admin script has commands for stuff
if message things I forgot then [code] [/code]
Look at that and compare it to your code, if they're similar it should work fine. |
|
|
| Report Abuse |
|
|
|
| 01 Aug 2011 07:28 PM |
| So would I say m/Testing/20 or what> |
|
|
| Report Abuse |
|
|
Ulla42
|
  |
| Joined: 14 Dec 2009 |
| Total Posts: 1774 |
|
|
| 01 Aug 2011 07:29 PM |
| Did he specify what he wants, or if the script would work? |
|
|
| Report Abuse |
|
|
|
| 01 Aug 2011 07:29 PM |
| If you want to have it like that, you need a little bit more of pattern matching ... |
|
|
| Report Abuse |
|
|
|
| 01 Aug 2011 07:29 PM |
See I know it will work if I put wait(2)
But I want to make it wait as long as I want it to
(e.x)
m/Hello World/5--It waits 5 seconds until :Remove() |
|
|
| Report Abuse |
|
|
Ulla42
|
  |
| Joined: 14 Dec 2009 |
| Total Posts: 1774 |
|
|
| 01 Aug 2011 07:30 PM |
No, That wouldn't work. It would try to wait("T") You have to do something Person299 has in his admin script that is much more complicated then that. Look it over and it should be simple enough to see how it works, then incorporate that to what you want.
|
|
|
| Report Abuse |
|
|
|
| 01 Aug 2011 07:31 PM |
| I don't know if I can TEACH you how to do it, but I could do it, just that you won't understand a word of it... Is that ok? |
|
|
| Report Abuse |
|
|
|
| 01 Aug 2011 07:36 PM |
@Axel. Thats fine go ahead Ill learn from it. |
|
|
| Report Abuse |
|
|
|
| 01 Aug 2011 07:41 PM |
good luck:
local cmd, tex, tim = msg:match("^(%w+)/(.*)/(%d+)$")
if cmd == "m" then for i, v in pairs(workspace:children()) do if v.className == "Message" then v:remove() end end local m = Instance.new("Message", workspace) m.Text = me.Name..":"..tex wait(tonumber(tim)) m:remove() end |
|
|
| Report Abuse |
|
|
| |
|
|
| 01 Aug 2011 07:45 PM |
| What do you mean MasterMind? o: |
|
|
| Report Abuse |
|
|