Raised This Month: $32 Target: $400
 8% 

Solved Send third person animation to player


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
gabuch2
AlliedModders Donor
Join Date: Mar 2011
Location: Chile
Old 04-14-2020 , 00:04   Send third person animation to player
Reply With Quote #1

Hello

I'm trying to re-create a weapon attack from scratch, but I have a problem where I have to set the "player" third person animation.

Any idea what's going on?

Code:
RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_medkit", "heal_pre", 0);

Code:
public heal_pre(weaponID) {     new id = get_pdata_ehandle(weaponID, 404, 16);     new target;     get_user_aiming(id, target);     if(ExecuteHam(Ham_SC_IsMonster, target))         return HAM_IGNORED;     new tempid = -1;     new Float:v_Player[3];     pev(id, pev_origin, v_Player)     while((tempid = find_ent_in_sphere(tempid, v_Player, 100.0)))     {         if(tempid == 0         || tempid > MaxClients         || pev(tempid, pev_max_health) <= pev(tempid, pev_health)         || pev(tempid, pev_deadflag) & DEAD_DYING         || pev(tempid, pev_deadflag) & DEAD_DEAD         || tempid == id)             continue;         new key[3];         num_to_str(weaponID,key,charsmax(key));         if(!TrieKeyExists(g_tcBusyHealthkits, key))         {             ExecuteHam(Ham_Weapon_SendWeaponAnim, weaponID, 3, 0, 0);             set_pev(id, pev_frame, 1.0);             set_pev(id, pev_animtime, 100.0);             set_pev(id, pev_framerate, 1.0);             if(pev(id, pev_flags) & FL_DUCKING)                 set_pev(id, pev_sequence, 46);             else                 set_pev(id, pev_sequence, 43);             TrieSetCell(g_tcBusyHealthkits, key, 0, true);             healgroup(id, weaponID);             set_task(1.0, "remove_from_busy_hk", TASK_NUM+weaponID);             break;         }     }         return HAM_SUPERCEDE; }

Thanks in advance.
__________________

Last edited by gabuch2; 05-18-2020 at 23:12.
gabuch2 is offline
 


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 23:32.


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