Quote:
Originally Posted by HamletEagle
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
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_forward( FM_SetModel, "@SetModel_Pre", 0 );
}
public @Touch( iEnt, id )
{
new iRarity = pev( iEnt, pev_iuser2 );
GlowWeapon( iEnt, iRarity );
}
public @SetModel_Pre( iEnt, const szModel[ ] )
{
new iRarity = pev( iEnt, pev_iuser2 );
if( iRarity )
{
// ?
}
}
__________________