Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # =============================================================================
- # >> IMPORTS
- # =============================================================================
- # Python
- from random import randint
- # EventScripts
- import es
- # binutils
- import custom_types
- # =============================================================================
- # >> TESTS
- # =============================================================================
- te = custom_types.server_tools.GetTempEntsSystem()
- def player_jump(ev):
- x, y, z = es.getplayerlocation(ev['userid'])
- # Allocate memory for a new Vector instance
- center = custom_types.Vector()
- # Initialize it by setting the x, y and z values
- center.Init(x, y, z)
- # Allocate memory for a new CRecipientFilter instance
- recipients = custom_types.CRecipientFilter()
- # We have to call the constructor to initialize the virtual function table
- recipients.constructor()
- # Add all players for testing purpose
- recipients.AddAllPlayers()
- # Precache the model
- index = es.precachemodel('sprites/laser.vmt')
- # Now create the BeamRingPoint effect
- te.BeamRingPoint(
- recipients, # filter
- 0, # delay
- center, # center
- 0, # fStartRadius
- 500, # fEndRadius
- index, # szModelPath
- 0, # iHaloIndex
- 0, # iStartFrame
- 255, # iFrameRate
- 3, # fLife
- 3, # fWidth
- 0, # iSpread
- 0, # fAmplitude
- randint(0, 255), # iRed
- randint(0, 255), # iGreen
- randint(0, 255), # iBlue
- 255, # iAlpha
- 1, # iSpeed
- 0, # iFlags
- )
- # Call the destructor for <recipients>
- recipients.destructor()
- # Deallocate <center> and <recipients>
- center.dealloc()
- recipients.dealloc()
Advertisement
Add Comment
Please, Sign In to add comment