Raised This Month: $ Target: $400
 0% 

[CS:GO] Trace attack not called on knife


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Pyro_
Senior Member
Join Date: Oct 2013
Old 02-20-2015 , 03:38   [CS:GO] Trace attack not called on knife
Reply With Quote #1

I have:
PHP Code:
for(new 1MaxClientsi++)
    {
        if(
IsClientInGame(i))
        {
            
SDKHook(iSDKHook_TraceAttackOnTraceAttack);
        }
    } 
in event_start hook.

And
PHP Code:
public Action:OnTraceAttack(victim, &attacker, &inflictor, &Float:damage, &damagetype, &ammotypehitboxhitgroup)
{
    if(
IsValidEntity(victim))
    {
        if(
shouldntgethit[victim])
        {
            
PrintToChat(victim"You were attacked");
            return 
Plugin_Handled;
        }
    }
    return 
Plugin_Continue;

And if you are shot, the chat message is displayed. But if you are knifed, it isn't and the attack isn't blocked.

NOTE: I am not after invincibility against knives, I want the knife to pass through the player, so if two players are in same place, (one that shouldn't get hit), then the one that should will get knifed

Is there a workaround?

Last edited by Pyro_; 02-20-2015 at 03:38.
Pyro_ 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 07:59.


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