View Single Post
King_OXO
Senior Member
Join Date: Dec 2020
Location: Brazil
Old 07-28-2022 , 18:55   Re: [L4D2]Remove attached entities
Reply With Quote #3

Quote:
Originally Posted by Marttt View Post
You can try using the function made by Silvers in [ANY] Dev Cmds

Test first using "sm_attachments <client>" and check the output, if it does work the code is based on the snipper below.

Note: You may filter other stuff like weapons etc that may be attached as well.

PHP Code:
void GetAttachments(int clientint target)
{
    
char classname[64];

    for( 
int i 12048i++ )
    {
        if( 
IsValidEntity(i) && HasEntProp(iProp_Send"moveparent") && GetEntPropEnt(iProp_Send"moveparent") == target )
        {
            
GetEdictClassname(iclassnamesizeof(classname));
            if( 
target <= MaxClients )
            {
                
ReplyToCommand(client"Attachment %N: %d %s"targeticlassname);
            } else {
                
ReplyToCommand(client"Attachment %d: %d %s"targeticlassname);
            }
        }
    }

thank you, you always help me
__________________
My Noob Plugins

Discord:WhiteFire#1301
Steam:WhiteFire
Youtube
King_OXO is offline