AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Remove punchangle (https://forums.alliedmods.net/showthread.php?t=341287)

ChillerX 01-15-2023 10:21

Remove punchangle
 
I am trying to remove punch angles but the screen animation is jumping up abruptly and forces no-recoil.

Code:

#include<amxmodx>
#include<engine>

public plugin_init(){
        register_event("CurWeapon","hook_curweapon","be","1=1","3>0")
        register_plugin("No Punch","0.1beta","Chillblaze")
        register_cvar("no_punch", "1")
}

public hook_curweapon(id){
        if(get_cvar_num("no_punch"))
        {
                entity_set_vector (id,EV_VEC_punchangle,Float:{0.0,0.0,0.0})
        }
}

Can anybody fix it or offer similar plugin which won`t affect recoil or the animations?

McTavish 01-15-2023 11:12

Re: Remove punchangle
 
Quote:

Originally Posted by ChillerX (Post 2797206)
I am trying to remove punch angles but the screen animation is jumping up abruptly and forces no-recoil.

Code:

#include<amxmodx>
#include<engine>

public plugin_init(){
        register_event("CurWeapon","hook_curweapon","be","1=1","3>0")
        register_plugin("No Punch","0.1beta","Chillblaze")
        register_cvar("no_punch", "1")
}

public hook_curweapon(id){
        if(get_cvar_num("no_punch"))
        {
                entity_set_vector (id,EV_VEC_punchangle,Float:{0.0,0.0,0.0})
        }
}

Can anybody fix it or offer similar plugin which won`t affect recoil or the animations?

Removing the punch angles will indeed remove the upward movement of the screen when shooting, but it will also affect the recoil. Removing the recoil animation can cause the gun to appear as if it is not firing at all, or that it's firing in a different direction.

You can try reducing the punch angles to a very small value, such as Float: {0.01,0.01,0.01} rather than completely setting it to 0. This will still remove most of the punch animation but will not completely remove the recoil animation.

Another solution would be to modify the recoil animation itself, so that it does not jump as abruptly, this would make the game experience more realistic and less jarring for the players.

Additionally, you may want to consider implementing a no-recoil feature as a separate script instead of trying to achieve this by modifying the punch angles.

McTavish 01-15-2023 11:21

Re: Remove punchangle
 
Code:

#include<amxmodx>
#include<engine>

public plugin_init(){
    register_event("CurWeapon","hook_curweapon","be","1=1","3>0")
    register_plugin("Reduced Punch","0.1beta","Chillblaze")
}

public hook_curweapon(id){
    entity_set_vector (id,EV_VEC_punchangle,Float:{0.01,0.01,0.01})
}

this will remove the punch angles will remove the upward movement of the screen when shooting, but it will also affect the recoil of the weapon.
To address this issue, one approach you could take is to reduce the punch angles to a very small value, such as Float: {0.01, 0.01, 0.01} instead of setting it to 0. This will still remove most of the punch animation but will not completely remove the recoil animation.

Another approach is to try to reduce the recoil animation itself, so that it does not jump up abruptly. This can be done by adjusting the recoil parameters of the weapon, such as the recoil magnitude and recovery time.

However, these modifications would require more knowledge of the game engine and the way recoil works in the specific game you're working on. Additionally, it is not recommended to implement no-recoil feature as it would be an unfair advantage for the players who use it and would be considered as cheating by the gaming community.

It's important to note that modifying the game in this way may violate the game's terms of service and may result in your account being banned. It's always best to check the game's rules and guidelines before attempting to make any modifications.

deprale 01-15-2023 20:52

Re: Remove punchangle
 
bro what is up with all these guys replying with chatgpt copy pastes...

the shit it spits out is mostly 20year old code with hooks that dont exist since 2006...


just stop and let someone more experienced answer.

ChillerX 01-15-2023 23:49

Re: Remove punchangle
 
I swear this guy have been stalking me for about a week now and providing free topic bumps :D

I don`t think there is a good looking solution to this tho. Punch angles seems to be directly connected to recoil. I can see the punch easily during fps/packet drops on any csdm server even on my newer pc and is pretty annoying once you start to notice it. It seems that in the next cs versions they actually added cvars to disable and fine tune it. I`m finishing work in a bit cya in discord if you are still up.

McTavish 01-16-2023 11:52

Re: Remove punchangle
 
Quote:

bro what is up with all these guys replying with chatgpt copy pastes...

the shit it spits out is mostly 20year old code with hooks that dont exist since 2006...

who said I have experience? I'm still learning, why did you speak shit about me and I don't know you there is no need to say that, and if you made a plugin called anti-family share maybe you stole it from a Russian site or something and you changed the author's name, no one will know use your brain before you attack someone +thank you for sharing with me this bot ^^ and ofc fuck you for insult me :)

McTavish 01-16-2023 11:55

Re: Remove punchangle
 
Quote:

Originally Posted by ChillerX (Post 2797264)
I swear this guy have been stalking me for about a week now and providing free topic bumps :D

I don`t think there is a good looking solution to this tho. Punch angles seems to be directly connected to recoil. I can see the punch easily during fps/packet drops on any csdm server even on my newer pc and is pretty annoying once you start to notice it. It seems that in the next cs versions they actually added cvars to disable and fine tune it. I`m finishing work in a bit cya in discord if you are still up.

I saw no one answer you that's why I answered next time buddy ^^

Celena Luna 01-16-2023 12:46

Re: Remove punchangle
 
Quote:

Originally Posted by ChillerX (Post 2797206)
I am trying to remove punch angles but the screen animation is jumping up abruptly and forces no-recoil.
Can anybody fix it or offer similar plugin which won`t affect recoil or the animations?


PHP Code:

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN  "New Plug-In"
#define VERSION "1.0"
#define AUTHOR  "Author"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    
RegisterHam(Ham_Weapon_PrimaryAttack"weapon_mp5navy""fw_Weapon_PrimaryAttack_Post"1)
}

public 
fw_Weapon_PrimaryAttack_Post(Ent)
{
    new 
id get_pdata_cbase(Ent414)
    
set_pev(idpev_punchanglefloat:{0.00.00.0})


This one is an example for MP5. Could you check if this work?

Also, McTavish, your reply does seem like something that ChatGPT would print out.

Quote:

may violate the game's terms of service",
What it have to do with no recoil ?
Quote:

unfair advantage for the players who use it and would be considered as cheating by the gaming community.
WTF? We have a 15m range melee, a Rocket Launcher, a Cannon with a Dragon Breath, hello?
Quote:

modify the recoil animation itself"
Does it even exist?


TLDR: Using AI is really bad way to "help" people or even learning. So please stop if you are abusing it.

McTavish 01-16-2023 13:54

Re: Remove punchangle
 
Quote:

Also, McTavish, your reply does seem like something that ChatGPT would print out.
well , sorry but I'm not using it mate he just attack me without any kind of proof anyway thank you for a respectful comment :)

HamletEagle 01-17-2023 04:24

Re: Remove punchangle
 
Quote:

Originally Posted by McTavish (Post 2797316)
well , sorry but I'm not using it mate he just attack me without any kind of proof anyway thank you for a respectful comment :)

Well, it is obvious that your reply is from chatgpt. Lying about it makes you look much much much worse than simply admitting that you used chatgpt. It isn't a big deal, no reason to be dishonest about it.


All times are GMT -4. The time now is 02:14.

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