Raised This Month: $ Target: $400
 0% 

[HELP] Problem with Putting Recoil on Glock


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 07-04-2017 , 00:17   Re: [HELP] Problem with Putting Recoil on Glock
Reply With Quote #2

I've never witnessed Ham_PrimaryAttack written in this way...

Use this.
Code:
public fw_PrimaryAttack_Post(entity) {     if (!pev_valid(entity))        return;     new id = get_pdata_cbase(entity, 41, 4)     if (!is_user_alive(id))       return;        set_pev(id, pev_punchangle, get_pcvar_float(cvar_glock_recoil)); }

Returning values in a forward-type post will not result in anything, so I guess you don't need it.

Another observation, if you want to block the attack if the weapon does not have ammunition, you must register ham attack again but pre (0), run the Ammo check and return HAM_SUPERCEDE if the value is less than 1.
__________________









Last edited by CrazY.; 07-04-2017 at 00:18.
CrazY. 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 23:09.


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