View Single Post
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-21-2018 , 12:06   Re: Hide custom entity, Game not loading functions first time, Entity ID problems
Reply With Quote #7

Quote:
Originally Posted by HamletEagle View Post
Now I get it. What you don't know is that once a weaponbox is picked up that box is gone and the next time you drop the weapon a new weaponbox is being created. The only thing that remains the same is the weapon entity.
My bad, didn't know that.

I didn't quite understand this part:

Quote:
Originally Posted by HamletEagle View Post
when player tries to drop check if the item that's being dropped contains the pev_iuser2 flag and if that's true apply the flag to the new weaponbox.
PHP Code:
public plugin_init( )
{
    
register_touch"weaponbox""player""@Touch" );

    
register_forwardFM_SetModel"@SetModel_Pre");
}

public @
TouchiEntid )
{
    new 
iRarity peviEntpev_iuser2 );

    
GlowWeaponiEntiRarity );
}

public @
SetModel_PreiEnt, const szModel[ ] )
{
    new 
iRarity peviEntpev_iuser2 );

    if( 
iRarity )
    {
        
// ?
    
}

__________________

Last edited by edon1337; 07-21-2018 at 12:06.
edon1337 is offline