Search found 155 matches

by VinciT
Fri Apr 17, 2020 5:34 pm
Forum: Plugin Requests
Topic: [HL2:DM] Crossbow
Replies: 44
Views: 23052

Re: [HL2:DM] Crossbow

For future reference in regards to default arguments in Python: https://docs.quantifiedcode.com/python-anti-patterns/correctness/mutable_default_value_as_argument.html Thank you for the link. Can't believe I hadn't seen this site before. So far so good, I need some more help. I'd like to apply it t...
by VinciT
Fri Apr 17, 2020 5:23 pm
Forum: Plugin Releases
Topic: [CSGO] Floating Damage Numbers
Replies: 13
Views: 22375

Re: [CSGO] Floating Damage Numbers

Thank you ^_^ I will inform about bugs, first 10 min works fine Good! :grin: L'In20Cible, my man.. I love it when you give me suggestions! I'll update the code later tonight. Why not make a PR ? You could then remove your PlayerFDN class entirely, and updating would be automated by pushing the new ...
by VinciT
Fri Apr 17, 2020 2:34 pm
Forum: Plugin Requests
Topic: [HL2:DM] Crossbow
Replies: 44
Views: 23052

Re: [HL2:DM] Crossbow

The problem is there: recipients=RecipientFilter()): Only the players that are connected at the time the plugin was loaded will ever see the effect (nobody if it was loaded on server start). Oooh, so default arguments are only evaluated once? Good to know. I've updated the code in my pr...
by VinciT
Fri Apr 17, 2020 4:22 am
Forum: Plugin Releases
Topic: [CSGO] Floating Damage Numbers
Replies: 13
Views: 22375

Re: [CSGO] Floating Damage Numbers

https://i.imgur.com/N7wbwgp.png Added a way to create damage numbers for damage caused by the world (falling, drowning). To enable this feature, load the latest version of the plugin on your server once to first generate the config file. After doing that, head over to ../csgo/cfg/source-python/fdn/...
by VinciT
Thu Apr 16, 2020 6:39 pm
Forum: Plugin Requests
Topic: [HL2:DM] Crossbow
Replies: 44
Views: 23052

Re: [HL2:DM] Crossbow

That's strange. Here's the script I used: # ../ball_impact/ball_impact.py # Source.Python from colors import Color from effects.base import TempEntity from effects.hooks import TempEntityPreHook from filters.recipients import RecipientFilter from stringtables import string_tables EFFECT_COLOR = Colo...
by VinciT
Wed Apr 15, 2020 10:57 pm
Forum: Plugin Requests
Topic: [HL2:DM] Crossbow
Replies: 44
Views: 23052

Re: [HL2:DM] Crossbow

Whoops, my bad. Change the create_dynamic_light() function to this: def create_dynamic_light( origin, color, radius, life_time, exponent, decay, recipients=RecipientFilter()): """Creates a dynamic light effect at the specified origin. Args: origin (Vector): Spa...
by VinciT
Wed Apr 15, 2020 6:11 pm
Forum: Plugin Requests
Topic: [HL2:DM] Crossbow
Replies: 44
Views: 23052

Re: [HL2:DM] Crossbow

That would work for the npc_grenade_frag, but for the prop_combine_ball, I think we'd need to hook either VPhysicsCollision() or DispatchEffect() . Since DispatchEffect is already available to us, try adding this to the script: from effects.hooks import TempEntityPreHook from stringtables import str...
by VinciT
Wed Apr 15, 2020 4:51 am
Forum: Plugin Releases
Topic: [CSGO] Floating Damage Numbers
Replies: 13
Views: 22375

Re: [CSGO] Floating Damage Numbers

zloykif wrote:Its possible, add showing damage (for all) from envirement\falling damage etc? For deathrun server
Sure thing. I'll try to add it in later today or tomorrow.
by VinciT
Tue Apr 14, 2020 3:54 am
Forum: Plugin Requests
Topic: [HL2:DM] amount of Health to give per broken Prop
Replies: 2
Views: 8661

Re: [HL2:DM] amount of Health to give per broken Prop

Here you go mate: # ../prop_orbs/prop_orbs.py # Python import random # Source.Python from effects.base import TempEntity from engines.precache import Model from entities.entity import BaseEntity from events import Event from filters.recipients import RecipientFilter from messages import SayText2 fro...
by VinciT
Mon Apr 13, 2020 9:17 pm
Forum: Plugin Requests
Topic: [HL2:DM] Crossbow
Replies: 44
Views: 23052

Re: [HL2:DM] Crossbow

I'm assuming you want the effect to appear when the crossbow bolt hits something, give this a shot: # ../bolt_impact/bolt_impact.py # Source.Python from colors import Color from effects.base import TempEntity from entities.entity import BaseEntity from entities.hooks import EntityPreHook, EntityCond...
by VinciT
Sat Apr 11, 2020 3:06 pm
Forum: Plugin Requests
Topic: Killcam
Replies: 9
Views: 13125

Re: Killcam

It seems your Source.Python is outdated. Try running the sp update server command or update it manually . Edit: If you don't feel like updating for some reason, you can just change the __init__() function to this: def __init__(self, index): """Initializes the object."&quo...
by VinciT
Fri Apr 10, 2020 9:36 pm
Forum: Plugin Requests
Topic: Killcam
Replies: 9
Views: 13125

Re: Killcam

I noticed you also asked for the screen to go black and white in your original request. I've added that.. and rewrote the plugin, here you go :smile: : # ../killcam/killcam.py # Source.Python from events import Event from players.entity import Player from players.dictionary import PlayerDictionary K...
by VinciT
Fri Apr 10, 2020 3:49 pm
Forum: Plugin Requests
Topic: Killcam
Replies: 9
Views: 13125

Re: Killcam

Changing the _player_death() function to this should fix that: def _player_death(game_event): userid = game_event.get_int('userid') attacker = game_event.get_int('attacker') if attacker not in (userid, 0): Delay(0.5, activate_cam, (userid, atta...
by VinciT
Tue Apr 07, 2020 10:28 pm
Forum: Code examples / Cookbook
Topic: [ANY] Make entities bounce (or hop)
Replies: 4
Views: 21000

Re: [ANY] Make entities bounce (or hop)

Oh wow, thank you for the amazing suggestions, I would've never thought to use PhysicsObject. I went ahead and changed everything you mentioned.
I solved the force issue by multiplying the new velocity with the mass of the object.
L'In20Cible wrote:That's funny! :smile:
Glad you liked it. :tongue:
by VinciT
Thu Apr 02, 2020 10:05 pm
Forum: Plugin Development Support
Topic: Hook Player Spray
Replies: 2
Views: 11108

Re: Hook Player Spray

I believe you can use the player_decal event for that.

Syntax: Select all

from events import Event
from players.entity import Player


@Event('player_decal')
def player_spray(event):
player = Player.from_userid(event['userid'])
by VinciT
Thu Apr 02, 2020 9:17 pm
Forum: Code examples / Cookbook
Topic: [ANY] Make entities bounce (or hop)
Replies: 4
Views: 21000

[ANY] Make entities bounce (or hop)

To make entities bounce (or hop), something needs to act upon the entities with a certain amount of force in order to change their velocity. With Source.Python, the easiest way to accomplish this is to change their velocity directly with the teleport virtual function. entity.teleport(origin, ang...
by VinciT
Thu Apr 02, 2020 12:49 am
Forum: Whatever
Topic: Free games!!
Replies: 41
Views: 62690

Re: Free games!!

Rayman Legends on Uplay.
by VinciT
Wed Mar 25, 2020 4:24 pm
Forum: Plugin Development Support
Topic: [CSGO] CBaseGrenade::BounceSound() offset
Replies: 1
Views: 11045

Re: [CSGO] CBaseGrenade::BounceSound() offset

Took a while, but I found it! If anyone needs the offset, add this to your CBaseGrenade.ini: [virtual_function] [[bounce_sound]] offset_linux = 240 offset_windows = 239 And here's how you'd block the flashbang bounce sound: # ../flash_bounce/flash_bounce.py # Source.Python from entities.hooks import...
by VinciT
Wed Mar 25, 2020 3:38 am
Forum: Plugin Development Support
Topic: [CSGO] CBaseGrenade::BounceSound() offset
Replies: 1
Views: 11045

[CSGO] CBaseGrenade::BounceSound() offset

I know it's a long shot, since they stripped the symbols from the binaries. But does anyone know the offset for this virtual function?
by VinciT
Sat Mar 21, 2020 10:44 pm
Forum: Plugin Development Support
Topic: [CSGO] Transparent character with action on "e"
Replies: 1
Views: 8708

Re: [CSGO] Transparent character with action on "e"

Give this a shot: # ../transparent_model/transparent_model.py # Source.Python from colors import Color from commands import CommandReturn from commands.client import ClientCommand from entities.constants import RenderMode, SolidType from entities.entity import Entity from listeners import OnEntityOu...

Go to advanced search