IceOrb
|
  |
| Joined: 02 May 2010 |
| Total Posts: 1206 |
|
|
| 16 Mar 2013 05:56 AM |
How would I make the message get the name of the player who chatted the command to create the message?
e.g.
Let's say I have me as the admin
admin = {"IceOrb"}
then if I say the words "hello computer"
it will make a msg like this
makeGui(" Hello "..script to gain players name here!.." ",5)
What goes in the "script to gain players name here" bit? so that it will collect the name of the person who chatted that message, and put it there? |
|
|
| Report Abuse |
|
|
getkoed
|
  |
| Joined: 18 Feb 2010 |
| Total Posts: 2298 |
|
|
| 16 Mar 2013 06:07 AM |
I don't know what your command system looks like, but if it's something like this:
function chat(msg, player)
it would be:
makeGui("Hello " .. player.Name .. "!", 5) |
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 16 Mar 2013 06:33 AM |
| http://wiki.roblox.com/index.php/How_To:_Admin_Commands |
|
|
| Report Abuse |
|
|
IceOrb
|
  |
| Joined: 02 May 2010 |
| Total Posts: 1206 |
|
|
| 16 Mar 2013 06:51 AM |
game.Players.PlayerAdded:connect(function(newPlayer) for i = 1,#trainers do if newPlayer.Name == trainers[i] then newPlayer.Chatted:connect(onSpeakDo) break end end end)
so will it be ..newPlayer.Name.. |
|
|
| Report Abuse |
|
|
einsteinK
|
  |
| Joined: 22 May 2011 |
| Total Posts: 1015 |
|
| |
|