Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function et_ClientCommand( cno, cmd )
- local entered_command = string.lower(et.trap_Argv(0))
- local entered_argument = string.lower(et.trap_Argv(1))
- if entered_command == "callvote" then
- if tonumber(et.gentity_get(cno, "pers.voteCount")) >= max_votes then return end
- if entered_argument == "config" then
- if vote_config == 0 then
- vote_config = 1
- vote_counter_config = cancel_timer
- elseif vote_config > 1 then
- et.trap_SendConsoleCommand( et.EXEC_APPEND, "cancelvote ; qsay ^7Voting has been disabled! To vote again wait ^1"..vote_counter__config.." ^7seconds\n")
- end
- end
- if entered_argument == "maprestart" then
- if vote_maprestart == 0 then
- vote_maprestart = 1
- vote_counter_maprestart = cancel_timer
- elseif vote_maprestart > 1 then
- et.trap_SendConsoleCommand( et.EXEC_APPEND, "cancelvote ; qsay ^7Voting has been disabled! To vote again wait ^1"..vote_counter_maprestart.." ^7seconds\n")
- end
- end
- if entered_argument == "map" then
- if vote_map == 0 then
- vote_map = 1
- vote_counter_map = cancel_timer
- elseif vote_map > 1 then
- et.trap_SendConsoleCommand( et.EXEC_APPEND, "cancelvote ; qsay ^7Voting has been disabled! To vote again wait ^1"..vote_counter_map.." ^7seconds\n")
- end
- end
- if entered_argument == "matchreset" then
- if vote_matchreset == 0 then
- vote_matchreset = 1
- vote_counter_matchreset = cancel_timer
- elseif vote_matchreset > 1 then
- et.trap_SendConsoleCommand( et.EXEC_APPEND, "cancelvote ; qsay ^7Voting has been disabled! To vote again wait ^1"..vote_counter_matchreset.." ^7seconds\n")
- end
- end
- if entered_argument == "nextmap" then
- if vote_nextmap == 0 then
- vote_nextmap = 1
- vote_counter_nextmap = cancel_timer
- elseif vote_nextmap > 1 then
- et.trap_SendConsoleCommand( et.EXEC_APPEND, "cancelvote ; qsay ^7Voting has been disabled! To vote again wait "..vote_counter_nextmap.." ^7seconds\n")
- end
- end
- if entered_argument == "surrender" then
- if vote_surrender == 0 then
- vote_surrender = 1
- vote_counter_surrender = cancel_timer
- elseif vote_surrender > 1 then
- et.trap_SendConsoleCommand( et.EXEC_APPEND, "cancelvote ; qsay ^7Voting has been disabled! To vote again wait "..vote_counter_surrender.." ^7seconds\n")
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement