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

Ham_CS_Weapon_SendWeaponAnim Possible Bug?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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 18:17.


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