Search found 416 matches
- Wed Apr 11, 2018 9:39 am
- Forum: Plugin Development Support
- Topic: Fall/Damage Slowdown
- Replies: 7
- Views: 7974
Re: Fall/Damage Slowdown
Just came across http://wiki.sourcepython.com/developing/modules/entities.entity.html?highlight=damage_filter#entities.entity.BaseEntity.damage_filter . This is actually perfect for this, but how can I set it to https://developer.valvesoftware.com/wiki/Damage_types#Fall ?
- Wed Apr 11, 2018 9:13 am
- Forum: Plugin Development Support
- Topic: Block Player Buttons
- Replies: 10
- Views: 9954
Re: Block Player Buttons
Hey, I can remember when checking players net properties, that theres m_flNextSecondaryAttack. So you could literally replace the prevent buttons more to sending m_flNextSecondaryAttack + 0.1 secs which would lead to an endless loop of never being able to press button attack 2. @OnPlayerRunCommand d...
- Tue Apr 10, 2018 11:02 am
- Forum: Code examples / Cookbook
- Topic: Making certain entities invisible to certain players
- Replies: 9
- Views: 52055
Re: Making certain entities invisible to certain players
Sorry for my miss-leading questions, kind of weird to understand what I kind of want to achieve with it. To activate or deactivate it, I can simply just do a if else statement in the PreHook? like if player.index not in set_transmit_dict: return and It would only hide if the index is in set_transmit...
- Mon Apr 09, 2018 6:44 am
- Forum: Code examples / Cookbook
- Topic: Making certain entities invisible to certain players
- Replies: 9
- Views: 52055
Re: Making certain entities invisible to certain players
Thanks,
so it gets called automatically, but how do I know when/how it gets called? I mean I can debug print it and see it myself, but kind of want to understand it. What does it call and will it just print in an endless loop every frame?
so it gets called automatically, but how do I know when/how it gets called? I mean I can debug print it and see it myself, but kind of want to understand it. What does it call and will it just print in an endless loop every frame?
- Mon Apr 09, 2018 2:57 am
- Forum: Code examples / Cookbook
- Topic: Making certain entities invisible to certain players
- Replies: 9
- Views: 52055
Re: Making certain entities invisible to certain players
Sorry for bumping older threads, but I'm curerently working with it.
How do I actually call "set_transmit"? Or does it get automatically called?
Also in the Hooks, which returns can you use which has effect on the hook? Like "return False", "return None"?
How do I actually call "set_transmit"? Or does it get automatically called?
Also in the Hooks, which returns can you use which has effect on the hook? Like "return False", "return None"?
- Tue Apr 03, 2018 11:35 pm
- Forum: Plugin Development Support
- Topic: Reproduce trigger_push
- Replies: 2
- Views: 3498
Re: Reproduce trigger_push
Hey, Thanks. I tried to convert it somehow to source.python, and this is my work so far: from listeners import OnPlayerRunCommand from entities.constants import EntityStates from entities.constants import MoveType from players.constants import PlayerStates from mathlib import Vector @OnPlayerRunComm...
- Tue Apr 03, 2018 4:47 pm
- Forum: Plugin Development Support
- Topic: Reproduce trigger_push
- Replies: 2
- Views: 3498
Reproduce trigger_push
Hey, I'm currently trying to find out, how I can reproduce the trigger_push entity. My idea is, to create a clean trigger and make it useable for all in one, like teleport, gravity, push, etc, but I'm stuck on the push part. The first approach I did was, that I simply set the base velocity to the bo...
- Sun Apr 01, 2018 6:27 pm
- Forum: Plugin Development Support
- Topic: Calculate Vector by giving angles and velocity
- Replies: 1
- Views: 2487
Calculate Vector by giving angles and velocity
Hey, as stated in the title, I need a function which returns me a Vector with the given angles and velocity. Its similar to creating a trigger_push trigger, where you enter the "pushdir" and speed, for example "0 -90 0" and "1250". I think it would look most likely like...
- Mon Mar 19, 2018 12:09 pm
- Forum: Plugin Development Support
- Topic: def load() doesnt work across multiple files?
- Replies: 4
- Views: 4601
Re: def load() doesnt work across multiple files?
Hey,
Thank you for your answer! Makes sense what you wrote, and also checked out your plugin. (Awesome to see my Idle Manager in it :D)
I havent fully understood it out of the plugin, but you are creating a "on load" function in the import files and call them from the main file load()?
Thank you for your answer! Makes sense what you wrote, and also checked out your plugin. (Awesome to see my Idle Manager in it :D)
I havent fully understood it out of the plugin, but you are creating a "on load" function in the import files and call them from the main file load()?
- Mon Mar 19, 2018 8:55 am
- Forum: Plugin Development Support
- Topic: def load() doesnt work across multiple files?
- Replies: 4
- Views: 4601
def load() doesnt work across multiple files?
Hey, Just noticed that my function on load, which is not the main project file, doesnt get called. test.py from . import test_file def load(): print('Hello World') test_file.py def load(): print('Hello Server') When I try to load the plugin.. [SP] Load...
- Sat Mar 17, 2018 10:18 pm
- Forum: Plugin Development Support
- Topic: Draw box around bomb zone
- Replies: 5
- Views: 5214
Re: Draw box around bomb zone
Some time ago I had problems with drawing many beams at once. I did it the exact same way as you, but I noticed that the game has a kind of limit of how many beams can be shown in one tick. (I suppose?) The trick for me was, to draw them on the next tick with Delay(0, do_box, (st,end)). Not sure if ...
- Sun Feb 25, 2018 7:04 pm
- Forum: API Design
- Topic: Anti-spam on Typed*Command
- Replies: 5
- Views: 40624
Re: Anti-spam on Typed*Command
Not sure if implementing an anti-spam directly into the decorator is the right thing here. Anti-Spam can be used much more than just adding a cooldown in seconds. Like using it once a round, once every XX seconds or maybe even once every day. (I know it doesnt realy relate towards Doldol's request) ...
- Fri Oct 20, 2017 2:50 pm
- Forum: Plugin Development Support
- Topic: Customize Decorator Class
- Replies: 2
- Views: 3535
Re: Customize Decorator Class
Hey,
I was thinking about this too last night, but if you say this is the most readable approach, where I agree, I'll go with it.
Thank you for the help!
I was thinking about this too last night, but if you say this is the most readable approach, where I agree, I'll go with it.
Thank you for the help!
- Fri Oct 20, 2017 12:04 am
- Forum: Plugin Development Support
- Topic: Customize Decorator Class
- Replies: 2
- Views: 3535
Customize Decorator Class
Hey, I'm currently building a project and which has different classes and I want to add "class" shortcuts for SayCommands and so more. Instead of adding 10 SayCommands with each shortcut, and splitting the command[0] to "guess" the meant class, I thought theres probably an easier...
- Sun Sep 10, 2017 12:25 am
- Forum: Plugin Development Support
- Topic: Stop players from changing clan tags
- Replies: 1
- Views: 3086
Stop players from changing clan tags
As Title says,
I know you can do it with the name by hooking player_changename event and reset it, but how with clan tags?
I know you can do it with the name by hooking player_changename event and reset it, but how with clan tags?
- Thu Sep 07, 2017 6:11 pm
- Forum: Plugin Development Support
- Topic: Hiding radar in csgo?
- Replies: 5
- Views: 6461
Re: Hiding radar in csgo?
Somehow only works for me when using it 1 tick after the player_spawn event.
- Thu Aug 17, 2017 7:06 pm
- Forum: General Discussion
- Topic: Performance problems with SP at HL2DM
- Replies: 20
- Views: 21813
Re: Performance problems with SP at HL2DM
You should rather try to host a clean server with sp only, we see that you have some addons loaded which otherwise could cause that.
- Wed Jun 28, 2017 9:04 pm
- Forum: Plugin Releases
- Topic: Dissolver v1.3
- Replies: 23
- Views: 31100
Re: Dissolver v1.2
Could also be fixed easily by retrieving the ragdoll into your player_death event and use Entity.delay on it passing it to the dissolve method instead of passing the player so the delay gets cancelled if the ragdoll entity itself gets removed. This would also fix an exception into Player.from_useri...
- Wed Jun 21, 2017 1:04 pm
- Forum: General Discussion
- Topic: Python 3.6 support?
- Replies: 13
- Views: 15396
Re: Python 3.6 support?
satoon101 wrote:You might need to yum or apt-get install libffi on your Linux system.
So this is currently the only fix for that? Guess python 3.7 wont come tht quick?
- Tue Jun 20, 2017 11:03 pm
- Forum: General Discussion
- Topic: Python 3.6 support?
- Replies: 13
- Views: 15396
Re: Python 3.6 support?
Sorry [SP] Caught an Exception: Traceback (most recent call last): File "../addons/source-python/packages/source-python/__init__.py", line 58, in load setup_sqlite() File "../addons/source-python/packages/source-python/__init__.py", line 343, in setup_sqlite import ctypes File &q...