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

Ham_CS_Weapon_SendWeaponAnim Possible Bug?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 04-29-2021 , 09:18   Ham_CS_Weapon_SendWeaponAnim Possible Bug?
Reply With Quote #1

Hello,
I am registering the Ham_CS_Weapon_SendWeaponAnim as a post function, when I am retrieving the player's index using get_pdata_cbase and sending the animation only for spectators, when a player is spectating a CT Player, it is refreshing the animation once to 10 seconds ~, spectating a Terrorist player, seems to working as intended ( refreshing every second ).

Here is the registered function:
PHP Code:
RegisterHam(Ham_CS_Weapon_SendWeaponAnim"weapon_usp""Ham_CS_Weapon_SendWeaponAnim_Post"1); 
And here is the function:
PHP Code:
public Ham_CS_Weapon_SendWeaponAnim_Post(iEntiAnimSkiplocal)
{
    if(
pev_valid(iEnt) != 2)
        return 
HAM_IGNORED;

    new 
iPlayerweapon;
    
// OFFSET_WEAPONOWNER 41
    // XO_WEAPON 4
    
iPlayer get_pdata_cbase(iEntOFFSET_WEAPONOWNERXO_WEAPON);

    if(!
is_user_alive(iPlayer))    return HAM_IGNORED;
    
    
client_print(get_user_index("Adi"), print_chat"iPlayer: %d"iPlayer)
    
client_print(get_user_index("Adi"), print_chat"mWFCiKpHoelOqyWXDkqQcdWKTigEmGl's index: %d"get_user_index("mWFCiKpHoelOqyWXDkqQcdWKTigEmGl"))
    
    return 
HAM_IGNORED;

Screenshot: http://prntscr.com/1296hlq ( Player mWFCiKpHoelOqyWXDkqQcdWKTigEmGl is CT and player with index 6 is Terrorist )
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]

Last edited by Shadows Adi; 04-29-2021 at 14:46.
Shadows Adi is offline
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 05-05-2021 , 08:14   Re: Ham_CS_Weapon_SendWeaponAnim Possible Bug?
Reply With Quote #2

Up, could it be from harden pev validation?
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]
Shadows Adi is offline
Reply


Thread Tools
Display Modes

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 01:21.


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