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

If not shooting gun/Punish v1.2


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay       
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 07-17-2016 , 02:10   If not shooting gun/Punish v1.2
Reply With Quote #1

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 View Post
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> 
Languages:


Installation:


Credits:


Changelog:


This plugin running in: [here]

Note:
If you find an bug or can optimize the code, all suggestions are welcome.
Attached Images
File Type: jpg img.jpg (6.7 KB, 539 views)
Attached Files
File Type: sma Get Plugin or Get Source (if_not_shooting_punish.sma - 20451 views - 11.3 KB)
File Type: txt if_not_shooting_punish.txt (888 Bytes, 259 views)
__________________

Last edited by mlibre; 06-15-2017 at 10:11. Reason: updated v1.2 (fix compile -.-)
mlibre is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: Sγo Paulo, Brasil
Old 07-17-2016 , 14:52   Re: If not shooting gun/Punish v1.0
Reply With Quote #2

It is only for fun, right?
Because if you dont found a enemy?? How will be? You need to shoot in a clean area only for not receive punishment, '--'
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 07-17-2016 at 14:53.
EFFx is offline
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 07-17-2016 , 15:55   Re: If not shooting gun/Punish v1.0
Reply With Quote #3

Quote:
Originally Posted by EFFx View Post
It is only for fun, right?
Because if you dont found a enemy?? How will be? You need to shoot in a clean area only for not receive punishment, '--'
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. This I think helps encourage the player to use his gun, serious as a supplement to fight the players without activity.
mlibre is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: Sγo Paulo, Brasil
Old 07-17-2016 , 17:26   Re: If not shooting gun/Punish v1.0.1
Reply With Quote #4

Yes, is how i said, if you not found a enemy? You will be forced to shoot on who?
Explain this part.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 07-17-2016 at 17:27.
EFFx is offline
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 07-17-2016 , 18:46   Re: If not shooting gun/Punish v1.0.1
Reply With Quote #5

Quote:
Originally Posted by EFFx View Post
Yes, is how i said, if you not found a enemy? You will be forced to shoot on who?
Explain this part.
He will be forced to fire the weapon randomly otherwise I will be punished, although I think I can skip punishment if not there is an enemy, can be considered for the next version.

Last edited by mlibre; 07-17-2016 at 20:13.
mlibre is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: Sγo Paulo, Brasil
Old 07-17-2016 , 21:34   Re: If not shooting gun/Punish v1.0.1
Reply With Quote #6

Yes, do it, because will got no reason using without it.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 07-17-2016 , 22:55   Re: If not shooting gun/Punish v1.0.1
Reply With Quote #7

Quote:
Originally Posted by EFFx View Post
Yes, do it, because will got no reason using without it.
Quote:
Originally Posted by mlibre View Post
Code:
  • v1.0.2 -Added cvar amx_omit_punish
now should not punish the player if you do not have an enemy.
mlibre is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: Sγo Paulo, Brasil
Old 07-18-2016 , 00:03   Re: If not shooting gun/Punish v1.0.2
Reply With Quote #8

You think that it isnt hardcoded?
And a suggest, add

PHP Code:
enum _:Pcvars
{
         
CVAR_1,
         
CVAR_2
}

new 
iCvars[Pcvars
And register your cvars with that
Example

PHP Code:
iCvars[CVAR_1] = register_cvar("cvar_1",""
Will be more readable, [1] [2] [3] how i know if is the cvar what i want?
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-18-2016 , 04:22   Re: If not shooting gun/Punish v1.0.2
Reply With Quote #9

That's not reliable, if there is a big map(or even a normal one) and few enemies there are good chances that you won't encounter one and you would need to fire randomly(possible reveal your position to an enemy and be killed).

It looks like an afk manager, but detection method is poor and could produce many false positive. It's simply not practical to use.
Unapproved.
__________________
HamletEagle is offline
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 07-20-2016 , 16:44   Re: If not shooting gun/Punish v1.0.2
Reply With Quote #10

Quote:
Originally Posted by EFFx View Post
You think that it isnt hardcoded?
And a suggest, add

PHP Code:
enum _:Pcvars
{
         
CVAR_1,
         
CVAR_2
}

new 
iCvars[Pcvars
And register your cvars with that
Example

PHP Code:
iCvars[CVAR_1] = register_cvar("cvar_1",""
Will be more readable, [1] [2] [3] how i know if is the cvar what i want?
if it is a bit confusing that I use , just because I seemed simpler and guided me through the sequence of numbers. this method besides taking value also takes the name of the cvar you think is better than the last...

PHP Code:
new const g_cvars[][][] = 
{
    { 
"cvar_1""1" },
    { 
"cvar_2""0" }
}
enum _:cvars
{
    
CVAR_1,
    
CVAR_2
}
new 
g_Cvarscvars ];

public 
plugin_init() {

    
g_CvarsCVAR_1 ] = register_cvar(g_cvars[0][0], g_cvars[0][1])
    
g_CvarsCVAR_2 ] = register_cvar(g_cvars[1][0], g_cvars[1][1])

    
register_srvcmd("y","test")
}
public 
test() {
    
server_print("%s = %d (%s)"g_cvars[0][0], get_pcvar_num(g_CvarsCVAR_1 ]), get_pcvar_num(g_CvarsCVAR_1 ]) == "ON" "OFF")
    
    
server_print("%s = %d (%s)"g_cvars[1][0], get_pcvar_num(g_CvarsCVAR_2 ]), get_pcvar_num(g_CvarsCVAR_2 ]) == "ON" "OFF")

Quote:
Originally Posted by HamletEagle View Post
That's not reliable, if there is a big map(or even a normal one) and few enemies there are good chances that you won't encounter one and you would need to fire randomly(possible reveal your position to an enemy and be killed).

It looks like an afk manager, but detection method is poor and could produce many false positive. It's simply not practical to use.
Unapproved.
in the case that the map is large, the administrator can set the time longer wait before taking the penalty , if the player does not find the enemy can use the knife to reset the time , but even so both are circling in Cirules on the map without finding the enemy ,at least this plugin when the time of punishment comes, forces them to disclose your position as you said and so finally meet.

with respect to potential false positives, although it has not happened, if it comes to pass, i search the solicion.
mlibre is offline
Reply



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 09:52.


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