Raised This Month: $51 Target: $400
 12% 

Dr. Hax


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 09-04-2015 , 09:05   Dr. Hax
Reply With Quote #1

Dr. Hax
- v1.1, last updated : 08 september 2015

I know, it's a bit late to release this kind of plugin, this meme is old after all... but i'm surprised it was never done on CS 1.6, so here it is!

Remember this creepy guy from
Garry's Mod Idiot Box ?



This plugin allow admins (or players) to feel like him throwing deadly computer monitors where they aim. Of course this is overpowered. Use with caution.


Contents :

Requirements top
CS 1.6, CZ.
AMX Mod X 1.8.x or higher.
Steam server.

Command top
  • amx_hax
Tips: it's more convenient to bind this command.

Usage (Cvars) top

  • drhax_screen_speed <speed>
Speed at which the screen is launched (Max speed is 2000).

The value by default : "1500.0".

  • drhax_damage <damage>
Damage done by the screen attack.

The value by default : "1337.0".

  • drhax_required_flags <flag(s)>
Flag(s) required to use amx_hax command.
No flags mean that everybody can use it.
The value by default : "d".

  • drhax_can_kill_teammate <0|1>
Disable/Enable the kill of teammate.
The value by default : "1".

  • drhax_destroy_screen_delay <seconds>
Delay before screen is removed after an hit.
0: removed on hit | -1: stay permanently until the end of the round
The value by default : "60.0".

  • drhax_need_to_be_alive <0|1>
Disable/Enable the need to be alive to use amx_hax command.
The value by default : "0"

  • drhax_screen_health <health>
Damage needed to destroy a screen in fly or on ground.
0: any hit destroy it | -1: indestructible
The value by default : "100.0"

Installation top
1. Install amx_hax.amxx in addons/amxmodx/plugins
2.
In your plugins.ini file, amx_hax.amxx where you want
3. Extract the content of drhax_required_files.zip in your game folder (ie: it's cstrike for Counter-Strike)
Installation Files top
Attached Files
File Type: sma Get Plugin or Get Source (amx_hax.sma - 655 views - 8.3 KB)
File Type: zip drhax_required_files.zip (258.1 KB, 168 views)

Last edited by Fr33m@n; 09-08-2015 at 12:40. Reason: Update to v1.1
Fr33m@n is offline
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 09-04-2015 , 09:07   Re: Dr. Hax (Topic in build)
Reply With Quote #2

Change Log top
v1.1 : [ 8 sep 2015 ]
- Fix a bug related to a badly written condition
- Now take count of player velocity and punch angle for screen launching
- Screens are now breakable, in fly or on ground
- Damage sounds are associated to screen damaging
- Remaining screens of previous round are now removed at start of the round
v1.0 : [ 4 sep 2015 ]
Initial release.

Demonstration Video top
This video is the CSS like of my plugin but it's pretty much the same in CS 1.6.
http://www.youtube.com/watch?v=WHTy4kDb2NM

Last edited by Fr33m@n; 09-08-2015 at 12:05.
Fr33m@n is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 09-04-2015 , 09:54   Re: Dr. Hax (Topic in build)
Reply With Quote #3

I think this would be a funny extra item for zombie plague.
__________________
Jhob94 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 09-04-2015 , 10:13   Re: Dr. Hax (Topic in build)
Reply With Quote #4

Haha, I was not able to stop throwing pc's, that's a cool ideea. What I don't quite like is how you throw the entity, it just appear suddenly from the player chest, and if you are moving while throwing it looks like you are getting into the entity.

Right now what you do is to calculate direction based on v_angle(like velocity_by_aim does). You should also take into account the punch angle and also player velocity. I don't know if current effect is wanted or not, but it does not look right. IMO it will be better in the grenade style.

You can try something as this:
PHP Code:
new Float:ViewAngle[3]; pev(idpev_v_angleViewAngle)
new 
Float:PunchAngle[3]; pev(idpev_punchanglePunchAngle)
xs_vec_add(ViewAnglePunchAngleViewAngle)
    
if(
ViewAngle[0] < 0)
{
    
ViewAngle[0] = -10 ViewAngle[0] * ((90 10) / 90.0)
}
else 
{
    
ViewAngle[0] = -10 ViewAngle[0] * ((90 10) / 90.0)
}

new 
Float:Direction[3]
engfunc(EngFunc_MakeVectorsViewAngle)
global_get(glb_v_forwardDirection)
    
new 
Float:Origin[3]
new 
Float:PlayerOrigin[3]; pev(idpev_originPlayerOrigin)
new 
Float:PlayerViewOfs[3]; pev(idpev_view_ofsPlayerViewOfs)
    
xs_vec_add(PlayerOriginPlayerViewOfsOrigin)
xs_vec_mul_scalar(Direction16.0Direction)
xs_vec_add(OriginDirectionOrigin)
    
new 
Float:Velocity[3]
new 
Float:PlayerVelocity[3]; pev(idpev_velocityPlayerVelocity)
    
xs_vec_div_scalar(Direction16.0Direction)
xs_vec_mul_scalar(Directionget_pcvar_float(PcvarSpeed), Direction)
xs_vec_add(DirectionPlayerVelocityVelocity)
    
set_pev(screen_entpev_originOrigin)
set_pev(screen_entpev_velocityVelocity
Ofc, use your style. Also check if you like more like this.

In screen_touch:
  • Use new, no static.
  • PHP Code:
     if ( get_user_team(id) == get_user_team(owner) )
                {
                    
    ExecuteHamB(Ham_TakeDamageidscreen_entscreen_entget_pcvar_float(PcvarDamage), DMG_ALWAYSGIB)
                }
                else if ( 
    get_pcvar_num(PcvarCanKillTeam) )
                {
                    
    ExecuteHamB(Ham_TakeDamageidscreen_entownerget_pcvar_float(PcvarDamage), DMG_ALWAYSGIB)
                } 
    That's wrong, the first check should be !=. In your way you always deal damage to friends, but you deal damage to enemies only if drhax_can_kill_teammate is 1.
  • PHP Code:
    if ( remove_screen_delay 0.0 
    Consider the values lower than 0 being 0, so you would remove always the entity. Now, if someone puts -1 your ent won't be ever removed.

Checking pev_valid in remove_screen is useless, you will go there only if you would have a valid entity.

One last thing, you could hook RoundEnd and manually remove all entities. Or it's wanted to remain from one round to another ?

As a suggestion, make the ents shootable so player can protect by shooting them.
__________________

Last edited by HamletEagle; 09-04-2015 at 10:14.
HamletEagle is offline
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 09-04-2015 , 10:36   Re: Dr. Hax (Topic in build)
Reply With Quote #5

Quote:
Originally Posted by Jhob94 View Post
I think this would be a funny extra item for zombie plague.
People are free to port it to ZP if done properly.
Fr33m@n is offline
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 09-04-2015 , 10:42   Re: Dr. Hax (Topic in build)
Reply With Quote #6

Quote:
Originally Posted by HamletEagle View Post
That's wrong, the first check should be !=. In your way you always deal damage to friends, but you deal damage to enemies only if drhax_can_kill_teammate is 1.
Oh my... damm mistake. this what happens when you implement feature too fast .

I will watch for the rest.

Last edited by Fr33m@n; 09-04-2015 at 10:43.
Fr33m@n is offline
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 09-08-2015 , 12:13   Re: Dr. Hax (Topic in build)
Reply With Quote #7

Version 1.1 is out.

Quote:
Originally Posted by fr33m@n View Post
v1.1 : [ 8 sep 2015 ]
- fix a bug related to a badly written condition
- now take count of player velocity and punch angle for screen launching
- screens are now breakable, in fly or on ground
- damage sounds are associated to screen damaging
- remaining screens of previous round are now removed at start of the round
This version is based on suggestion made by HamletEagle

To HamletDeagle:

PHP Code:
if(ViewAngle[0] < 0)
{
    
ViewAngle[0] = -10 ViewAngle[0] * ((90 10) / 90.0)
}
else 
{
    
ViewAngle[0] = -10 ViewAngle[0] * ((90 10) / 90.0)

I didn't used this because it doesn't match the effect i want.
I kept the rest with a different scalar value, 32.0 instead of 16.0.

Last edited by Fr33m@n; 09-08-2015 at 12:22.
Fr33m@n is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 09-08-2015 , 14:24   Re: Dr. Hax
Reply With Quote #8

Btw, it's "eagle" not "deagle", why peoples add a "d" ? I don't know.

1.When setting pev_takedamage can use this definitions(that are already in amxx), for readability.
PHP Code:
#define DAMAGE_NO                       0.0
#define DAMAGE_YES                      1.0
#define DAMAGE_AIM                      2.0 
2.
PHP Code:
else if ( remove_screen_delay == 0.0 
that should be just else, for anything lower than 0 you can consider that the entity should be removed immediately. Some admins are stupid.
3.In the command, when user is dead and it should be alive to use the command printing a message to let the admin knows why the command failed could be welcomed.

Some suggestions:

I am not sure that break effects are welcomed on an unbreakable entity. That will confuse players, they will think it can be destroyed. IMO, it should be truly unbreakable(which is just a matter of dispatching "material" key with value "7" - unbreakable glass or setting pev_takedamage to DAMAGE_NO).
" pev_owner due to unwanted solid properties" I think you mean that entity it's not solid for it's owner, this could be welcomed at the end, you could get stuck in your own entities if you aim too close to the body, or something reflect the entity.
__________________

Last edited by HamletEagle; 09-09-2015 at 04:23.
HamletEagle is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 09-16-2015 , 04:38   Re: Dr. Hax
Reply With Quote #9

Quote:
Originally Posted by Fr33m@n View Post
People are free to port it to ZP if done properly.
I'll for this plugin to be approved before modify it into extra item in ZP. ;)

By the way, nice and funny plugin. I love its sound. \o/

Last edited by zmd94; 09-16-2015 at 04:38.
zmd94 is offline
Dr Zayd
Senior Member
Join Date: Jun 2014
Location: forums.alliedmods.net
Old 09-16-2015 , 16:29   Re: Dr. Hax
Reply With Quote #10

Quote:
1. Install amx_hax.amxx in addons/amxmodx/plugins
To
Code:
 1. Copy/Paste amx_hax.amxx in addons/amxmodx/plugins
nice PLugin i like it ^^
__________________
Invisible System | 100%
ـــــــــــــــــــــــــــــ
Anti setinfo check | Ez Plugin and lite
ـــــــــــــــــــــــــــــ
[ZP] Free VIP Menu | Free VIP menu | ZP-Mod |
Dr Zayd 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 07:04.


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