English Adminvote - action

3 replies
Goto Page
To the start Previous 1 Next To the start
29.08.15 02:50:45 pm
Up
AtomKuh
User
Offline Off
Hello,

is it possible to change the action of this script:

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
adminlist = {86415}

addhook("vote","antivote")
function antivote(id,modus,votedplayer) 
     if modus == 1 then
          for _,adminUSGN in pairs(adminlist) do
               if adminUSGN == player(votedplayer,"usgn") then
                    parse("kick "..id.." Don't vote admins!")
                    msg("Don't vote "..player(votedplayer,"name").." or you will get kicked")
               end
          end
     end
end


The person who is voting me should not be able to vote me. The script just kicks him but I still get voted.
29.08.15 03:00:32 pm
Up
TimeQuesT
User
Offline Off
try cs2d lua hook parse to omit the actual vote parse.
I have no idea if this works, but just give it a try.
Muh
29.08.15 03:04:13 pm
Up
Talented Doge
User
Offline Off
Set cs2d cmd mp_kickpercent to 0 and instead count the votes yourself, this can ignore the votes voting administrators.
Talented Doge
29.08.15 08:02:48 pm
Up
omg
User
Offline Off
it doesnt really matter if u get voted because theyre kicked afterwards so their vote disappears. unless it doesnt!?
will code for food
To the start Previous 1 Next To the start