Raised This Month: $32 Target: $400
 8% 

voteban


Post New Thread Reply   
 
Thread Tools Display Modes
hjvl
Member
Join Date: Oct 2005
Location: Almere
Old 02-24-2007 , 04:31   Re: voteban
Reply With Quote #51

To disable admins from banning each other, change in the function "public ChooseMenu" the following:
From:
Code:
    default:
    {
      gi_Sellection=gi_MenuPosition+key
      new Now=get_systime(gi_SysTimeOffset)
      set_pcvar_num(gi_LastTime, Now)

      run_vote()
      return 0
    }
To:
Code:
    default:
    {
      gi_Sellection=gi_MenuPosition+key
      new TempID = ga_PlayerID[gi_Sellection]
      if( !is_user_admin(TempID))
      {
        new Now=get_systime(gi_SysTimeOffset)
        set_pcvar_num(gi_LastTime, Now)
        run_vote()
      }
      else  
      {
        client_print(id,print_chat,"Your not allowed to ban a admin!")
      }
      return 0
    }
regard,
Jeroen
hjvl is offline
draft
Senior Member
Join Date: Jul 2007
Location: Russia, Saint-Petersburg
Old 07-10-2007 , 19:31   Re: voteban
Reply With Quote #52

Hi! You should change ActualBan to this one:

Quote:
public ActualBan(Selected)
{
new Type = get_pcvar_num(gi_BanType)
switch(Type)
{
case 1:
server_cmd("amx_banip %d #%d Voteban", get_cvar_num("amxx_voteban_bantime"), get_user_userid(ga_PlayerID[Selected]))
case 2:
server_cmd("amx_ban %d #%d Voteban", get_cvar_num("amxx_voteban_bantime"), get_user_userid(ga_PlayerID[Selected]))
default:
server_cmd("Kick #%d kick", get_user_userid(ga_PlayerID[Selected]))
}
return 0
}

Last edited by draft; 07-10-2007 at 19:48.
draft is offline
hjvl
Member
Join Date: Oct 2005
Location: Almere
Old 07-24-2007 , 08:11   Re: voteban
Reply With Quote #53

Why?
hjvl is offline
neogeo
Senior Member
Join Date: Jul 2005
Old 07-24-2007 , 08:47   Re: voteban
Reply With Quote #54

hi hjvl
can you add a votekick fonction too ?
thx
neogeo is offline
hjvl
Member
Join Date: Oct 2005
Location: Almere
Old 07-31-2007 , 06:48   Re: voteban
Reply With Quote #55

Quote:
Originally Posted by draft View Post
Hi! You should change ActualBan to this one:
The userid is cached to avoid people from not being banned by disconnecting.

The native hl commands, banid and addip, are used to avoid unnessecary resources consumption.

So why should it be changed?
hjvl is offline
hjvl
Member
Join Date: Oct 2005
Location: Almere
Old 07-31-2007 , 06:49   Re: voteban
Reply With Quote #56

Quote:
Originally Posted by neogeo View Post
hi hjvl
can you add a votekick fonction too ?
thx
I look into it in a few days.
hjvl is offline
neogeo
Senior Member
Join Date: Jul 2005
Old 07-31-2007 , 06:51   Re: voteban
Reply With Quote #57

Quote:
Originally Posted by hjvl View Post
I look into it in a few days.
thx man
neogeo is offline
hjvl
Member
Join Date: Oct 2005
Location: Almere
Old 08-01-2007 , 15:33   Re: voteban
Reply With Quote #58

Please test this, can't do it myself because i moved over to source.

added
say /votekick
cvar amxx_votekick_disable
Attached Files
File Type: sma Get Plugin or Get Source (voteban1_2_kick.sma - 692 views - 7.7 KB)
hjvl is offline
neogeo
Senior Member
Join Date: Jul 2005
Old 08-02-2007 , 05:21   Re: voteban
Reply With Quote #59

thx , i'll try.

edit :
it seems to work ,but can you add :
amxx_votekick_delaytime
amxx_votekick_ratio
amxx_votekick_minvoters
amxx_votekick_bf_ratio Back

thanks

Last edited by neogeo; 08-02-2007 at 06:52.
neogeo is offline
hjvl
Member
Join Date: Oct 2005
Location: Almere
Old 08-04-2007 , 05:03   Re: voteban
Reply With Quote #60

Please test it gain

added:
amxx_votekick_delaytime
amxx_votekick_ratio
amxx_votekick_minvoters
amxx_votekick_bf_ratio
Attached Files
File Type: sma Get Plugin or Get Source (voteban1_2_kick2.sma - 748 views - 8.8 KB)
hjvl is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:43.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode