Raised This Month: $ Target: $400
 0% 

Body bug v_ primaryattack


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
batmanishere
New Member
Join Date: Jun 2019
Old 06-23-2019 , 16:20   Body bug v_ primaryattack
Reply With Quote #1

Hello guys, i have a probleme, i use v_ with submodels(body) and is work ok but on fire(+attack) body is set to 2.I want your help to stop changing body on fire, i try with postframe+preframe+etc not work.. the same probleme
Probleme: https://im3.ezgif.com/tmp/ezgif-3-b31f001e2ea2.gif
Code:
#include <amxmodx>
#include <reapi>
#include <hamsandwich>
#include <fakemeta>

public plugin_init()
{
	register_plugin("Cloak Test", "1.0", "Crazy");

	RegisterHam(Ham_Item_Deploy, "weapon_m4a1", "CKnife_Deploy")
	RegisterHam(Ham_Item_PreFrame, "weapon_m4a1", "CKnife_Deploys")
	RegisterHam(Ham_Item_PostFrame, "weapon_m4a1", "CKnife_Deploys")
	register_forward(FM_CanSkipPlayer, "CBasePlayer_CanSkip");
}

public CBasePlayer_CanSkip(this)
{
	if (!is_user_alive(this))
		return FMRES_IGNORED;

	if (get_user_weapon(this) != CSW_KNIFE)
		return FMRES_IGNORED;

	forward_return(FMV_CELL, false);
	return FMRES_OVERRIDE;
}

public CKnife_Deploys(this)
{
	set_entvar(this, var_weaponanim, 0);
	set_entvar(this, var_body, 4);
	set_entvar(this, var_skin, 4);
	set_entvar(this, var_sequence, 0);
	set_entvar(get_pdata_cbase(this, 41, 4), var_weaponanim, 0);
}
public CKnife_Deploy(this)
{
	set_entvar(this, var_weaponanim, 0);
	set_entvar(this, var_body, 4);
	set_entvar(this, var_skin, 4);
	set_entvar(this, var_sequence, 0);
	set_entvar(get_pdata_cbase(this, 41, 4), var_weaponanim, 0);
}

Last edited by batmanishere; 06-24-2019 at 03:25.
batmanishere is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 06-24-2019 , 08:57   Re: Body bug v_ primaryattack
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?t=287260
Btw, where do you downloaded that plugin?
__________________









Last edited by CrazY.; 06-24-2019 at 08:58.
CrazY. is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 06-24-2019 , 09:24   Re: Body bug v_ primaryattack
Reply With Quote #3

Quote:
Originally Posted by CrazY. View Post
https://forums.alliedmods.net/showthread.php?t=287260
Btw, where do you downloaded that plugin?
https://dev-cs.ru/threads/3139/
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 06-24-2019 , 14:02   Re: Body bug v_ primaryattack
Reply With Quote #4

For knife you can get better results, as knife doesn't have client prediction. However, it will glitch a bit on deploy, so all you have to do to fix this(and without causing any side effect) is to set CD_ID to 0(only when the active item is knife) in UpdateClientData.
__________________
HamletEagle is offline
batmanishere
New Member
Join Date: Jun 2019
Old 06-25-2019 , 03:57   Re: Body bug v_ primaryattack
Reply With Quote #5

Quote:
Originally Posted by HamletEagle View Post
For knife you can get better results, as knife doesn't have client prediction. However, it will glitch a bit on deploy, so all you have to do to fix this(and without causing any side effect) is to set CD_ID to 0(only when the active item is knife) in UpdateClientData.
And for the other weapons what you recomand me?Is ok this plugin https://forums.alliedmods.net/showthread.php?t=287260 / https://forums.alliedmods.net/showthread.php?t=287754 ?
batmanishere is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 06-25-2019 , 05:39   Re: Body bug v_ primaryattack
Reply With Quote #6

For other weapons there is no good way. The idea is mainly the same, disable client prediction by setting CD_ID to 0, but you will have to recode some parts of the weapon and it will mess with hit registration when there is lag.
__________________
HamletEagle 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 11:09.


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