Would it be possible to make a SP for me in my hl2dm server for alphaprops ( https://forums.alliedmods.net/showthread.php?p=2362847)(its for the things when you pick them up,like barrels,crate and you can see through them)

Thank you.
Syntax: Select all
# ../alpha_props/alpha_props.py
# Source.Python
from entities.constants import RenderMode
from listeners import OnEntityOutput
# Transparency of the picked up object. (0 - 255)
PICKED_UP_ALPHA = 120
# Outputs that are fired when a player picks up and drops an object.
hooked_outputs = ('OnPlayerPickup', 'OnPhysGunDrop')
@OnEntityOutput
def on_entity_output(output, activator, caller, value, delay):
if output not in hooked_outputs:
return
if 'prop_physics' not in caller.classname:
return
caller.render_mode = RenderMode.TRANS_ALPHA
caller.call_input(
'Alpha', PICKED_UP_ALPHA if output == 'OnPlayerPickup' else 255)
VinciT wrote:Hi daren, I think this should do the trick:Syntax: Select all
# ../alpha_props/alpha_props.py
# Source.Python
from entities.constants import RenderMode
from listeners import OnEntityOutput
# Transparency of the picked up object. (0 - 255)
PICKED_UP_ALPHA = 120
# Outputs that are fired when a player picks up and drops an object.
hooked_outputs = ('OnPlayerPickup', 'OnPhysGunDrop')
@OnEntityOutput
def on_entity_output(output, activator, caller, value, delay):
if output not in hooked_outputs:
return
if 'prop_physics' not in caller.classname:
return
caller.render_mode = RenderMode.TRANS_ALPHA
caller.call_input(
'Alpha', PICKED_UP_ALPHA if output == 'OnPlayerPickup' else 255)
Users browsing this forum: No registered users and 52 guests