English Adding <reason> in HC kick command

2 replies
Goto Page
To the start Previous 1 Next To the start
Up
Man Of Steel
User
Offline Off
Hello guys

I have a command !kick <id> <reason> in HC script,
I just want to add a lua code.
if i forget to type <id> or <reason>
Then a message show "Please enter a ID/Reason"
Example i type !kick <reason>
Then messahe show "Please enter ID"
Or i type !kick <id>
Then message show "Please enter a reason"

Spoiler >


Please help me :V
edited 5×, last 19.04.19 11:13:47 am
FRiendly boYy.
19.04.19 12:14:56 pm
Up
Goo
User
Offline Off
You're less likely to get help when you keep bumping your thread like that.
I almost wanted to help, almost.
30.04.19 10:52:36 pm
Up
phalenkO
User
Offline Off
@user Man Of Steel: If I understand it correctly you want the that code...
Its lua for example. If u ask me questions about the lua I give a few sample cod.

Code:
1
2
3
4
5
6
7
elseif komutlar == "!kick" and svadmin(id) then 
if not args[2] then msg2(id,"ID?") return 1 end
if not args[3] then msg2(id,"REASON?") return 1 end
if not player(tonumber(args[2]),"exists") then msg2(id,"PLAYER?") return 1 end
parse("kick "..args[2])
msg("sksksksksk") 
return 1


> komutlar&args:
Code:
1
2
3
4
5
6
7
8
9
10
11
function string:split(sep)
    local sep, fields = sep or ":", {}
    local pattern = string.format("([^%s]+)", sep)
    self:gsub(pattern, function(c) fields[#fields+1] = c end)
  return fields
end

if txt:sub(1,1) == "!" then
     local args = txt:split(" ")
     local komutlar = args[1] ---
          if komutlar == "any code" then


Code:
1
function string:split(sep)
I not made, I take at by my friend. My friend take at the enternet.
IMG:https://media.giphy.com/media/1ymoA4quTygCABwIr9/giphy.gif
To the start Previous 1 Next To the start