English kick command

7 replies
Goto Page
To the start Previous 1 Next To the start
19.08.13 04:15:43 pm
Up
vanyok2011
User
Offline Off
Code:
1
2
3
4
elseif string.sub(txt,1,5)=="!kick" then
     local kickid=tonumber(string.sub(txt,7,8))
     kick(kickid)
end

When i'm using !kick 2 it's don't work
Why?
in console is
LUA ERROR: attempt to call a nil value
why?
19.08.13 04:22:55 pm
Up
Avo
User
Offline Off
Is "kick" function declared?
19.08.13 04:27:28 pm
Up
Me Gusta
User
Offline Off
Code:
1
kick(kick,id)
no this?
19.08.13 04:27:43 pm
Up
vanyok2011
User
Offline Off
yes,with parse('kick'..kickid)don't work too
19.08.13 04:31:09 pm
Up
Avo
User
Offline Off
Post whole code.
19.08.13 04:32:57 pm
Up
Me Gusta
User
Offline Off
paste the full script pls...
19.08.13 04:37:01 pm
Up
vanyok2011
User
Offline Off
i understand why it don't work... it was end before elseif
19.08.13 04:44:24 pm
Up
IRAN TOWN
User
Offline Off
• With Hook
Code:
1
2
3
4
5
6
addhook('say','say_hook')
function say_hook(id,txt)
if string.sub(txt,1,6)=="!kick " then
parse('kick '..(math.floor(string.sub(txt,7,8)))..' "Kick By Admin"')
end
end


• Without hook
Code:
1
2
3
if string.sub(txt,1,6)=="!kick " then
parse('kick '..(math.floor(string.sub(txt,7,8)))..' "Kick By Admin"')
end


> Format, For example : !kick 12
To the start Previous 1 Next To the start