View Single Post
SpirT
Senior Member
Join Date: Sep 2018
Location: Portugal
Old 06-18-2020 , 17:46   Re: [SM] Exception reported: Entity 1 (1) is invalid
Reply With Quote #3

Hey!

PHP Code:
DisarmPlayer(client)
{
    for(new 
05i++)
    {
        new 
weapon = -1;
        while((
weapon GetPlayerWeaponSlot(clienti)) != -1)
        {
            if(
IsValidEntity(weapon))
            {
                
RemovePlayerItem(clientweapon);
            }
        }
    }
    
SetEntProp(clientProp_Send"m_bHasDefuser"0);
    
SetEntProp(clientProp_Send"m_bHasHeavyArmor"0);
    
SetEntProp(clientProp_Send"m_ArmorValue"0);
    
SetEntProp(clientProp_Send"m_bHasHelmet"0);

I usually use this to disarm players. Try that! And the problem might not be with your custom void but yes where it is being used...

Contact me on steam or, for better purposes, post your .sp here.

Best Regards,

SpirT.
__________________

Last edited by SpirT; 06-18-2020 at 17:46.
SpirT is offline