|
| 24 May 2017 09:56 AM |
I want to make some admin commands. I know there are already some but I want to do it for learning experience. Where do I start off with? I already know the basics but I want to achieve multiple commands at once like ":kill player :kick player" and etc,.
|
|
|
| Report Abuse |
|
|
|
| 24 May 2017 10:00 AM |
First start off with your admins. I suggest making a script like "plr= game.Players.LocalPlayer" "if plr.UserId= 'userid 1', 'user id 2' then local accepted= true" "if accepted= true then (admin stuff here)" Admin stuff here should include functions of your admin and on player chat functions. Hope that helped c; |
|
|
| Report Abuse |
|
|
|
| 24 May 2017 10:01 AM |
I already know how to make it so if your name is in the list... I just need the commands part. But thanks for trying.
|
|
|
| Report Abuse |
|
|
|
| 24 May 2017 10:03 AM |
gmatch incoming command to a table of commands and use the remaining parts of the commands to gmatch to players or relevant information for the execution
|
|
|
| Report Abuse |
|
|
|
| 24 May 2017 12:04 PM |
How would I convert string.gmatch into a number for positioning with sub?
|
|
|
| Report Abuse |
|
|
|
| 24 May 2017 12:11 PM |
wiki.roblox.com/index.php?title=String_pattern
|
|
|
| Report Abuse |
|
|
|
| 24 May 2017 12:12 PM |
if you wanna go a step beyond any of the current admin scripts. Build a function that searches through a string that was a chatted that identifies all the key elements regardless of order.
|
|
|
| Report Abuse |
|
|
|
| 24 May 2017 12:12 PM |
you'll need a lot of error checking however. Which within the chat you can just return something to the player saying "nuh uh mate not everything was there."
|
|
|
| Report Abuse |
|
|
|
| 24 May 2017 05:13 PM |
| string.pattern, big help but how do I skip to a sub. Say like to get to the second ##### like this in sub ":string :string :string" the second :string it takes to sub it. So it would be amountofchars to reach the ##### within sub. |
|
|
| Report Abuse |
|
|