hill20go
(LIQW8_hazem)
March 8, 2021, 10:01pm
#1
Hi, I am a new scripter and have a question on basic admin essentials 2.0.
The issue is I have been trying to make it possible to run /e in front of a command. Example: /e :kick hill
I have tried to script it and none of which has worked. I also tried to make plugins and that didn’t work.
I have also looked it up and have had no success.
If would be happy if you could give me some support.
Velliaan
(Milenda Foranzi)
March 8, 2021, 10:31pm
#2
The second it detects " :" (With a space before the command) it should automatically assume that you’re running a command, and then run your normal checks to see what command is being ran.
hill20go
(LIQW8_hazem)
March 8, 2021, 11:38pm
#3
I have tried that, it has not worked. Basic admin only detects the command if the prefix is the first thing.
hill20go
(LIQW8_hazem)
March 8, 2021, 11:40pm
#4
But I have seen games that allow you to use /e so I know it’s possible.
Velliaan
(Milenda Foranzi)
March 8, 2021, 11:40pm
#5
Are you sure you are doing a proper sequence check for each char?
hill20go
(LIQW8_hazem)
March 8, 2021, 11:40pm
#6
Sorry I am a new scripter and don’t know what you mean by that.
https://www.lua.org/pil/20.2.html
Hey, I want to know how I’d make a chat argument kinda thing.
Basically I want to detect what the message is after the players name is said. I believe string.sub() is an option but I simply don’t know how to use it very efficiently, and the wiki didn’t make much sense either.
My code:
local function kick(target, message)
target:Kick('You have been kicked. Reason: ' .. message)
end
game.Players.PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(msg)
if msg:sub(1,6):l…
Also if you are new I recommend you learn the basics
hill20go
(LIQW8_hazem)
March 9, 2021, 2:12am
#8
Thank you, that helped but I still am having trouble with making it possible to use /e.
hill20go
(LIQW8_hazem)
March 9, 2021, 11:23pm
#9
This is my code if it helps:
if string.tab(message,1,3) == "/e " then
message = string.tab(message,4)
end