Advertisement
Guest User

Untitled

a guest
Dec 19th, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.33 KB | None | 0 0
  1. function et_ClientCommand( cno, cmd )
  2.     local entered_command = string.lower(et.trap_Argv(0))
  3.     local entered_argument = string.lower(et.trap_Argv(1))
  4.    if entered_command == "callvote" then
  5.    if tonumber(et.gentity_get(cno, "pers.voteCount")) >= max_votes then return end
  6.       if entered_argument == "config" then
  7.         if vote_config == 0 then
  8.             vote_config = 1
  9.             vote_counter_config = cancel_timer
  10.         elseif vote_config > 1 then
  11.         et.trap_SendConsoleCommand( et.EXEC_APPEND, "cancelvote ; qsay ^7Voting has been disabled! To vote again wait ^1"..vote_counter__config.." ^7seconds\n")
  12.         end
  13.       end
  14.      
  15.       if entered_argument == "maprestart" then
  16.         if vote_maprestart == 0 then
  17.           vote_maprestart = 1
  18.           vote_counter_maprestart = cancel_timer
  19.         elseif vote_maprestart > 1 then
  20.         et.trap_SendConsoleCommand( et.EXEC_APPEND, "cancelvote ; qsay ^7Voting has been disabled! To vote again wait ^1"..vote_counter_maprestart.." ^7seconds\n")
  21.         end
  22.       end
  23.      
  24.       if entered_argument == "map" then
  25.         if vote_map == 0 then
  26.         vote_map = 1
  27.         vote_counter_map = cancel_timer
  28.         elseif vote_map > 1 then
  29.         et.trap_SendConsoleCommand( et.EXEC_APPEND, "cancelvote ; qsay ^7Voting has been disabled! To vote again wait ^1"..vote_counter_map.." ^7seconds\n")
  30.           end
  31.      end
  32.       if entered_argument == "matchreset" then
  33.         if vote_matchreset == 0 then
  34.         vote_matchreset = 1
  35.         vote_counter_matchreset = cancel_timer
  36.         elseif vote_matchreset > 1 then
  37.         et.trap_SendConsoleCommand( et.EXEC_APPEND, "cancelvote ; qsay ^7Voting has been disabled! To vote again wait ^1"..vote_counter_matchreset.." ^7seconds\n")
  38.       end
  39.      end
  40.       if entered_argument == "nextmap" then
  41.         if vote_nextmap == 0 then
  42.         vote_nextmap = 1
  43.         vote_counter_nextmap = cancel_timer
  44.         elseif vote_nextmap > 1 then
  45.         et.trap_SendConsoleCommand( et.EXEC_APPEND, "cancelvote ; qsay ^7Voting has been disabled! To vote again wait "..vote_counter_nextmap.." ^7seconds\n")
  46.       end
  47.      end
  48.  
  49.       if entered_argument == "surrender" then
  50.        if vote_surrender == 0 then
  51.         vote_surrender = 1
  52.         vote_counter_surrender = cancel_timer
  53.         elseif vote_surrender > 1 then
  54.         et.trap_SendConsoleCommand( et.EXEC_APPEND, "cancelvote ; qsay ^7Voting has been disabled! To vote again wait "..vote_counter_surrender.." ^7seconds\n")
  55.       end
  56.      end
  57.  
  58.    end
  59.    end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement