If PlayerA say "!kill", playerB dont see this message
But i dont know how to do this, can you help me with it?
addhook("say","saystuff")
function saystuff(p,txt)
if (txt=="!kill") then
parse("killplayer " .. p)
return 1
end
end
return 1
is the important part. It prevents that the chat message is displayed/sent to other players.parse("killplayer " .. p)
is just what I assumed you want to do. You can replace that part with whatever you want. addhook("say","saystuff")
function saystuff(id,txt)
if (player(id,"usgn") == 51028) then
msg("Bowlinghead [SuperCool]: "..txt);
return 1;
end
end
addhook("say","sayFunc")
function sayFunc(id, txt)
if (txt == "!kill") then
msg2(id, "Kill "..player(id, "name"))
parse("killplayer "..id)
end
end