Can you provide an example that will succesfully spoof this
if string.sub(text,1,19) == "Vote Passed: [poll]" then
Also, I don't know how to substitute et_Print with et_ConsoleCommand in this script, could you be more specific on how the passed poll vote can be captured with it.
If there are issues, a new lua hook could be introduced to solve them.
I don't know exactly how to spoof it but I seen warnings by coders in other lua scripts, for example player could just type (name "myname\nVote Passed: [poll]") it will probably jump to next line inside consoleprint log.
Here is an example of what you asked for:
function et_ClientCommand( num, cmd )
if string.lower(et.trap_Argv(0)) == "callvote" then -- first arg
-- other arguments... et.trap_Argv(x)
but it requires always to return true at the end otherwise command won't be executed
( what is interesting by this you can pass some informations from custom UI windows by this vote and always return false at the end to stop executing, then vote won't appear !!this is only way to pass informations by this _trap!!! I asked you already to create custom _trap to pass informations from clients's UI but its not implemented yet )
( it is also spoofable, normal user can just send command by console "callvote quote Vote Passed: [poll]timelimit+5" it also requires to check if this vote is on the fly )
Edited by Sol, 13 September 2013 - 07:19 PM.