Raised This Month: $ Target: $400
 0% 

[CS:GO] Damage being done to weapon_shield


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ImACow
AlliedModders Donor
Join Date: Feb 2015
Old 12-12-2019 , 12:43   Re: [CS:GO] Damage being done to weapon_shield
Reply With Quote #10

I'm trying to raytrace towards a shield, but its not hitting as an entity?

Any weapon on the back of a player is not getting traced, what am I missing here?

PHP Code:
HookEvent("weapon_fire"OnWeaponFire);

public 
Action OnWeaponFire(Event event, const char[] namebool dontBroadcast)
{
    
int client GetClientOfUserId(event.GetInt("userid"));
    
float vecAngles[3];
    
float vecOrigin[3];
    
GetClientEyePosition(clientvecOrigin);
    
GetClientEyeAngles(clientvecAngles);
    
TR_EnumerateEntities(vecOriginvecAnglesfalseRayType_InfiniteTraceEntityEnumerator_ShieldGetClientSerial(client));
}

public 
bool TraceEntityEnumerator_Shield(int entityany data)
{
    
int client GetClientFromSerial(view_as<int>(data));
    if(!
IsValidClient(client))
        return 
true;
    if(
client == entity)
        return 
true;
    
char cTemp[64];
    if(!
GetEntityClassname(entitycTempsizeof(cTemp)))
        return 
true;
    
PrintToConsole(client"TraceEntityFilter_Shield ------------> %s was hit by %N"cTempclient);
    return 
true;

How can you trace items on the back of a player? is this even possible?
__________________
ImACow 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 13:12.


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