Raised This Month: $168 Target: $400
 42% 

Hostage Protection[ V 1.8 ]


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay        Approver:   Arkshine (90)
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 06-27-2014 , 09:12   Hostage Protection[ V 1.8 ]
Reply With Quote #1


Hostage Protection 1.8
Release: 27.06.2014 | Last Update: 20.02.2015

Table of Contents

Description top

This plugin has a simple purpose, to stop players from killing hostages. It will work only in hostage maps. You can set punishments ( with cvars ) for players that kill hostages. It will also block any damage on a hostage, this mean he won't die but you will think more next time when you want to kill one.

Feature:
  • pause plugin when you don't run a hostage map
  • block damage, not just punish the player
  • more cvars to customize it
  • you can punish a player in many ways, you decide how

Installation top

To install the plugin:
  1. Download the resources from this post.
  2. Put hostage_protection.amxx in addons/amxmodx/plugins
  3. Open addons/amxmodx/configs/plugins.ini and add at the end of this file hostage_protection.amxx
  4. You can put the sma file into addons/amxmodx/sources but this is not mandatory.
  5. Put hostage_protection.txt in addons/amxmodx/data/lang
  6. Restart the server/change map.
Cvars top

This cvars allow you to turn on/off most of the features and to control the way in which the plugin works.
  • hp_punishment:
    • Allow you to decide in which way a player will be punished.
      To enabled damage on hostages you have to disable this plugin, read the cvar above.
    • 0 - just block damage | 1 - slap with x damage | 2 - slay | 3 - ban | 4 - random stuffs

    • Random stuffs: he lose 50% of his health/money or he lose all weapons.
  • hp_slap_value | hp_ban_time:
    • You can decide slap value/ban time
    • Slap: If it's 100 player will die | If it's 0 it will have no effect
    • Ban:Time that a player remain banned | 0 mean permanent
  • hp_showblood:
    • Determines if the blood will be show when attacking a hostage.
    • 1 - show blood | 0 don't show blood.
  • hp_blockteam:
    • Determines what team can't attack hostages
    • t - tero | c - ct | b - both
ChangeLog top
  • V 0.1:
    • Initial release
  • V 0.2:
    • Removed an useless variable.
      Added a new option to the punishment cvar: no punishment ( 0 value )
  • V 0.3:
    • Removed display cvar+message
    • Plugin is now working on cs_assault too
    • Block he grenade damage.
    • Remove constant for entities
  • V 0.4:
    • Arranged the code
    • Little optimizations
  • V 0.5:
    • Remove hp_status cvar
    • Added some check in CHostage::TakeDamage
  • V 0.6:
    • Optimized the code and fixed some potential bugs.
Downloads top
  • 0.1 version: 18 downloads
  • 0.2 version: 37 downloads
  • 0.3 version: unknow downloads
  • 0.4 version: 69 downloads
  • 0.5 version: 24 downloads
  • 0.7 version: 180 downloads
Attached Files
File Type: sma Get Plugin or Get Source (hostage_protection.sma - 1359 views - 5.5 KB)
File Type: txt hostage_protection.txt (2.7 KB, 815 views)

Last edited by HamletEagle; 08-31-2017 at 11:48.
HamletEagle is offline
EthicalHacker007
Veteran Member
Join Date: May 2014
Location: India
Old 06-27-2014 , 09:17   Re: You won't kill hostages anymore
Reply With Quote #2

Nice, but I think it's been made before or something like this.
__________________

Last edited by EthicalHacker007; 06-27-2014 at 09:20. Reason: Fixed.
EthicalHacker007 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 06-27-2014 , 09:17   Re: You won't kill hostages anymore
Reply With Quote #3

Quote:
Originally Posted by EthicalHacker007 View Post
Nice, but I think it's been made before or something like this.
Idk if it was done before, but I was needing it so I made it.

Searched a bit, and this is the difference between mine and others:
  • pause plugin when you don't run a hostage map
  • block damage, not just punish the player
  • more cvars to customize it
  • you can punish a player in many ways, you decide how

Last edited by HamletEagle; 06-27-2014 at 13:43.
HamletEagle is offline
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 06-27-2014 , 16:58   Re: You won't kill hostages anymore
Reply With Quote #4

Quote:
Originally Posted by EthicalHacker007 View Post
Nice, but I think it's been made before or something like this.
maybe do you mean this: Stop Killing The %&#ing Hostages.
__________________
ANTICHRISTUS is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 06-27-2014 , 20:52   Re: You won't kill hostages anymore
Reply With Quote #5

This plugin has a much better alternative in my opinion. Good job.
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
EthicalHacker007
Veteran Member
Join Date: May 2014
Location: India
Old 06-28-2014 , 00:21   Re: You won't kill hostages anymore
Reply With Quote #6

Yeah, yours is better.
__________________
EthicalHacker007 is offline
red_bull2oo6
Senior Member
Join Date: Mar 2012
Location: Braila, Romania
Old 06-28-2014 , 09:10   Re: You won't kill hostages anymore
Reply With Quote #7

PHP Code:
public plugin_cfg ( ) {
    
    
    if ( 
get_pcvar_num Cvars [  CVAR_STATUS ] ) == ) {
        
        
log_amx "Plugin paused" )
        
pause "a" )
        
    }
    

what happens if server starts with the cvar value 0 than i want to change it to 1.
for example i want it always deactivated and only when i need/want, to activate it.

i think you could return FMRES_IGNORED; in TraceAttack forward if the cvar is 0.


also i saw this ( you always declare a new variable to use it in one switch.. )

PHP Code:
new iNum random_num )    
switch ( 
iNum ) {
    
-->
    
switch ( 
random_num ) ) { 
__________________

My PC Themes . .
red_bull2oo6 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 06-28-2014 , 09:28   Re: You won't kill hostages anymore
Reply With Quote #8

Quote:
Originally Posted by red_bull2oo6 View Post
PHP Code:
public plugin_cfg ( ) {
    
    
    if ( 
get_pcvar_num Cvars [  CVAR_STATUS ] ) == ) {
        
        
log_amx "Plugin paused" )
        
pause "a" )
        
    }
    

what happens if server starts with the cvar value 0 than i want to change it to 1.
for example i want it always deactivated and only when i need/want, to activate it.

i think you could return FMRES_IGNORED; in TraceAttack forward if the cvar is 0.


also i saw this ( you always declare a new variable to use it in one switch.. )

PHP Code:
new iNum random_num )    
switch ( 
iNum ) {
    
-->
    
switch ( 
random_num ) ) { 
1. Cvar is default 1, no problem in this.
2. FMRES_INGORED in a ham forward ? Are you serious ? Anyway, it's better to pause it, we avoid that some code to execute when it shouldn't.
3. Where do you saw that "I always declare a new variable to use it in one switch" ? But, you are right here, updated.

Edit: fw is not a fakemeta tag. I understand what you want to say with plugin_cfg but it's ok, because it will be auto-disabled on non-hostage maps, you don't need to care to activate/deactivate it and you have no reason to keep the cvar to 0 if you want to run it into current map.

Last edited by HamletEagle; 06-28-2014 at 09:47.
HamletEagle is offline
red_bull2oo6
Senior Member
Join Date: Mar 2012
Location: Braila, Romania
Old 06-28-2014 , 09:43   Re: You won't kill hostages anymore
Reply With Quote #9

uops, my bad, i confused the ham with forward ( because u called it fw_HostageTraceAttack ) ;;).
return HAM_IGNORED; then.

it seems that you have not understood what i mean about that 'little story' from plugin_cfg.
that feature does not allow me to instantly activate/deactivate the plugin via cvar. it requires sv rr/ map change

nvm.
__________________

My PC Themes . .

Last edited by red_bull2oo6; 06-28-2014 at 09:45.
red_bull2oo6 is offline
ArabicMan
Veteran Member
Join Date: Feb 2014
Location: مصر
Old 06-28-2014 , 10:29   Re: You won't kill hostages anymore
Reply With Quote #10

Good to make them when some one hit them form T or CT team no damage done to them punishment not good. Good job
ArabicMan 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 18:28.


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