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

Solved Bug with hegrenade exploding


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
farawayf
Senior Member
Join Date: Jan 2019
Old 03-22-2019 , 16:12   Bug with hegrenade exploding
Reply With Quote #1

Hello.
That plugin sets targets punch angle and ignites him if attacker uses knife. But have bug: when someone throwing a grenade and changing to a knife, the plugin works like player attacks with knife.
How to solve this bug ?
PHP Code:
if(StrEqual(weapon"weapon_knife"))
{
     new 
buttons GetClientButtons(attacker);
     if (!(
buttons IN_ATTACK2))
     {
          new 
Float:punch[3];
    
          
punch[0] = GetRandomFloat(1.015.0); 
          
punch[1] = GetRandomFloat(1.015.0); 
          
punch[2] = GetRandomFloat(1.015.0); 
          
IgniteEntity(victimkfire_time);
          
SetEntPropVector(victimProp_Send"m_vecPunchAngle"punch); 
     }    
     else if (!(
buttons IN_ATTACK))
     {
         new 
Float:punch2[3];             
    
         
punch2[0] = GetRandomFloat(1.0100.0); 
         
punch2[1] = GetRandomFloat(1.0100.0); 
         
punch2[2] = GetRandomFloat(1.0100.0); 
         
SetEntPropVector(victimProp_Send"m_vecPunchAngle"punch2); 
     }


Last edited by farawayf; 03-23-2019 at 15:44.
farawayf 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 08:04.


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