IDKBlox
|
  |
| Joined: 05 Apr 2013 |
| Total Posts: 1304 |
|
|
| 01 May 2015 04:38 PM |
How would i make it where when people say for example :change IDKBlox c 50000 how would i do that? i know its a lot to ask i mean i know how to do change me c 50000 but not getting they're names, if you would help me out, if its necessary ill pay you:) thanks |
|
|
| Report Abuse |
|
|
|
| 01 May 2015 04:40 PM |
http://wiki.roblox.com/index.php?title=Function_dump/String_manipulation
http://wiki.roblox.com/index.php?title=String_patterns |
|
|
| Report Abuse |
|
|
IDKBlox
|
  |
| Joined: 05 Apr 2013 |
| Total Posts: 1304 |
|
| |
|
IDKBlox
|
  |
| Joined: 05 Apr 2013 |
| Total Posts: 1304 |
|
|
| 01 May 2015 05:42 PM |
How would i get this to work?
if message:sub(1, 5) == "kill/"..("Welcome to the Wiki"):match(game.Players:GetChildren()) then end
im trying to make it where when people go kill/(PLAYERSNAMEHERE) then that person will die
|
|
|
| Report Abuse |
|
|
|
| 01 May 2015 05:58 PM |
local ExampleText = "message/Everyone/Luna is best pony" local Temp = "" local Spot = string.find(ExampleText,"message/") if not Spot then return end --Would be nil because the text it was looking for was not found, implying that the chat isnt a whatever command. In this case, "message/" is there Temp = string.sub(ExampleText,Spot+1) --This gets the part of the text after the message/ local TargetSpot = string.find(Temp,"/") if not TargetSpot then print("Target not specified") return end local Target = string.sub(Temp,1,TargetSpot-1) -- Gets the letters before the next slash, which should be the target name
if Target == "Me" then --stuff elseif Target== "Everyone" then --stuff else local person = game.Players:FindFirstChild(Target) if not person then print("Player not found") return end
It should look like that. That was ridiculously tedious typing on an iPad. |
|
|
| Report Abuse |
|
|
IDKBlox
|
  |
| Joined: 05 Apr 2013 |
| Total Posts: 1304 |
|
|
| 01 May 2015 06:02 PM |
| oh thanks man thats very confusing lol, and HAHA about the ipad part |
|
|
| Report Abuse |
|
|
|
| 01 May 2015 06:10 PM |
| Point out parts you want clarified |
|
|
| Report Abuse |
|
|
IDKBlox
|
  |
| Joined: 05 Apr 2013 |
| Total Posts: 1304 |
|
|
| 01 May 2015 07:35 PM |
| well, what i wanted was for there to be a person selected not 'me' or 'everyone' |
|
|
| Report Abuse |
|
|
|
| 01 May 2015 10:51 PM |
| Didnt you see what it was doing? If it isnt a predefined selection, it checks the players for someone with the name. |
|
|
| Report Abuse |
|
|