If not shooting gun/Punish v1.2
Description:
This plugin punishes everyone who does not make a shot in the game after a certain time elapsed.
Quote:
Originally Posted by mlibre
It is not necessary to target an enemy , you just have to shoot the gun before the set time runs out, not to be punished (With the new cvar "amx_enemy_attack" omit this option, forcing the player to attack the enemy). This I think helps encourage the player to use his gun, serious as a supplement to fight the players without activity.
|
Cvars:
PHP Code:
amx_time_no_shoot "90" // seconds left
amx_warning_time "15" // seconds remaining to see the warning
amx_warning_type "5" // 0 = none / 1 = console / 2 = console dev / 3 = chat / 4 = center / 5 = hud
amx_punish_type "4" // 1 = kick / 2 = ban / 3 = slay / 4 = slap
amx_ban_time "15" // 0 = permanent
amx_slap_dmg "10" // slap damage
amx_knife_attack "1" // 0 = off / 1 = on (restart seconds left)
amx_immunity_flags "abcdefghijklmnopqrst"
amx_omit_punish "1" // 0 = off / 1 = on (omit punishment , if there is X amount of enemies specified in amx_num_players)
amx_num_players "1 1" /* specify the number of players (TE/CT) if the amx_omit_punish is set to 1
example: amx_num_players "17 9" = 17 terrorists and 9 counter-terrorists
(always leave a space between the two numbers and must be in quotes) */
amx_enemy_attack "0" // punish if you do not attack the enemy
Modules:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>
Credits:
Copper -
idea
Brad - get_playersnum, has_flag
Bugsy - IN_ATTACK
totopizza - formatex, clamp
meTaLiCroSS - for cvars
Arkshine - Ham_TakeDamage
Changelog:
- v1.2
-Added cvar amx_enemy_attack to punish if it does not attack the enemy Ham_TakeDamage
-Added mp_friendlyfire check in case of being in 1 the friend attack takes it as enemy
-Added for cvars in plugin_init
-Replaced some else if a else
-Removed all conditions of automatic reset of cvars, it is considered unnecessary server_cmd (fix clamp)
-Removido cvar amx_warning_lang, amx_warning_msg, amx_kick_msg, amx_ban_msg, amx_c4_attack, amx_grenade_attack
-Removed g_bImmunity in fw_CmdStart
- v1.1b / views 41
-Added cvar amx_num_players to specify the number of players (TE/CT) if the amx_omit_punish is set to 1 example: amx_num_players "17 9" = 17 terrorists and 9 counter-terrorists (always leave a space between the two numbers and must be in quotes)
-Replaced some conditions cvars to clamp
-Moved register_dictionary to plugin_cfg more check file existence lang
-Removed some unnecessary FORMATEX and duplicate lines
- v1.1a / views 31
-Replaced value cvar amx_warning_lang <1/2> to <0/1>
- v1.1 / views 2
-Added identify cvars
-Added cvar amx_warning_lang, to activate lang support or use the cvars msg
-Added conditions if not properly set the cvar, to auto reset to a correct value
-Removed idOfTask, remove_task
-Replaced several formatex to use only one
-Cvar bImmunity now is global
- v1.0.2 / views 10
-Added cvar amx_omit_punish
- v1.0.1 / views 4
-Removed client_disconnect, hamsandwich
-Replaced fakemeta_util to fakemeta
- v1.0 / views 8
-Release 17/Jul/2016
This plugin running in: [here]
Note:
If you find an bug or can optimize the code, all suggestions are welcome.