if msgcontains(msg, "kill") and talkState[talkUser] == 0 then
selfSay("Please tell me the name of the person you want to kill.", cid)
talkState[talkUser] = 1
elseif talkState[talkUser] == 1 then
for _, pid in ipairs(getPlayersOnline()) do
if msg:lower() == getCreatureName(pid):lower() then
doCreatureAddHealth(pid, -(getCreatureHealth(pid)))
selfSay("Player " .. msg:lower() .. " has been killed.", cid)
talkState[talkUser] = 2
break
end
end
if talkState[talkUser] == 1 then
selfSay("Player " .. msg:lower() .. " cannot be found.", cid)
end
talkState[talkUser] = 0
end