Search found 1256 matches
- Sun Oct 17, 2021 8:59 am
- Forum: Plugin Requests
- Topic: HL2DM-cscanner spawned
- Replies: 15
- Views: 12220
Re: HL2DM-cscanner spawned
Replace the following line: self.make_virtual_function( With: self.pointer.make_virtual_function( This is a regression that was introduced into c7825ed which causes CustomType 's, BasePointer 's and Pointer 's attributes to no longer be dynamically resolved. Not really sure this was intended...
- Thu Oct 14, 2021 4:30 pm
- Forum: Plugin Development Support
- Topic: trace attack
- Replies: 6
- Views: 5749
Re: Detect knife attack
from entities.hooks import EntityCondition from entities.hooks import EntityPreHook from core import PLATFORM from core import SOURCE_ENGINE def get_trace_attack_function(entity): offset = { 'orangebox': {'windows': 60, 'linux': 61}, 'csgo': {'windows'...
- Tue Oct 12, 2021 1:21 pm
- Forum: Plugin Development Support
- Topic: Old Code, Do I still need to make these checks?
- Replies: 2
- Views: 2922
Re: Old Code, Do I still need to make these checks?
Hi! It has been a long time, since I was active here. So I was reading through some old code and I was wondering if these try-catch cases are still necessary to prevent crashes and is this still the "correct" way to do this? @EntityPreHook(EntityCondition.equals_entity_classname(&...
- Sat Oct 09, 2021 2:47 am
- Forum: General Discussion
- Topic: Windows 11
- Replies: 4
- Views: 3857
Re: Windows 11
You are probably just missing the VC++ 2010 redistributable.
- Sat Oct 02, 2021 9:51 pm
- Forum: Plugin Development Support
- Topic: Merge Folders
- Replies: 6
- Views: 4888
Re: Merge Folders
SOURCE_PATH.copytree(GAME_PATH) Sadly results in an FileExistsError: NEW_UPDATE_PATH.copytree(GAME_PATH) File "..\addons\source-python\Python3\shutil.py", line 315, in copytree os.makedirs(dst) File "..\addons\source-python\Python3\os.py", line 220, in makedirs mkdir(nam...
- Sat Oct 02, 2021 8:41 am
- Forum: Plugin Development Support
- Topic: Merge Folders
- Replies: 6
- Views: 4888
Re: Merge Folders
Syntax: Select all
SOURCE_PATH.copytree(GAME_PATH)
- Sun Sep 26, 2021 4:38 am
- Forum: Plugin Development Support
- Topic: Send a message in the cs:s chat
- Replies: 3
- Views: 3456
Re: Send a message in the cs:s chat
Syntax: Select all
eventscripts_chatevent 0
- Wed Sep 15, 2021 9:02 pm
- Forum: Plugin Development Support
- Topic: [Cs:s] Menu Key errors
- Replies: 2
- Views: 3244
Re: [Cs:s] Menu Key errors
We could probably silent it, or implement some kind of anti-conflict internally, but otherwise it can be ignored. What likely happens is; SP sends a menu and add it to the user queue, SM overrides that menu with more options enabled causing it to be unknown by SP when such options are selected resul...
- Sat Aug 28, 2021 10:22 pm
- Forum: Plugin Development Support
- Topic: [Cs:s] PreEvent player_hurt crash
- Replies: 1
- Views: 2326
Re: [Cs:s] PreEvent player_hurt crash
Because you cannot kill a player before it gets hurt. Delay the kill on the next frame:
Syntax: Select all
victim.delay(0, victim.client_command, ('kill', True))
- Thu Aug 19, 2021 5:55 pm
- Forum: Plugin Development Support
- Topic: [Cs:s] Zombie Riot potion
- Replies: 4
- Views: 3417
Re: [Cs:s] Zombie Riot potion
That means that by that point: player.cash -= 16000 The player has less than 16k resulting into a negative value being assigned. You really just have to ensure the player have enough cash before performing the purchase. For example: cash = player.cash if cash >= 16000: player.cash = cash - 16000 ......
- Wed Aug 18, 2021 4:59 pm
- Forum: General Discussion
- Topic: Please help!! Trouble downloading SharePoint file into Python environment!
- Replies: 2
- Views: 3506
Re: Please help!! Trouble downloading SharePoint file into Python environment!
You want to read bytes_file_obj, not response.content.
- Thu Aug 12, 2021 11:40 pm
- Forum: General Discussion
- Topic: A way to trigger +attack player command
- Replies: 3
- Views: 3624
Re: A way to trigger +attack player command
If that works, we should add that to the Player class. That's really cool! Not sure if it work on all games, but it works on CS:S. Though, while it work for forcing a single attack, it will cause issues if the given time is greater than the next attack. Many buttons cannot be forced as well, such a...
- Thu Aug 12, 2021 10:06 am
- Forum: General Discussion
- Topic: A way to trigger +attack player command
- Replies: 3
- Views: 3624
Re: A way to trigger +attack player command
def force_buttons(player, buttons, time=0.25): """Forces the given buttons on the given player for the given time.""" # Save the current forced buttons forced_buttons = player.get_datamap_property_int('m_afButtonForced') # Apply the given button...
- Wed Aug 11, 2021 10:50 pm
- Forum: Plugin Development Support
- Topic: [Advanced] Hook CPluginHelpersCheck::CreateMessage
- Replies: 6
- Views: 4148
Re: [Advanced] Hook CPluginHelpersCheck::CreateMessage
Does it work to you? No idea. As previously stated, I haven't tested and only wrote an example to provide some hints. While this function is the convenient wrapper to get Source virtual object interfaces, it seems to lack smart path search, unlike FindBinary does. In this sense, executing server = ...
- Wed Aug 11, 2021 7:24 pm
- Forum: Plugin Development Support
- Topic: [Advanced] Hook CPluginHelpersCheck::CreateMessage
- Replies: 6
- Views: 4148
Re: [Advanced] Hook CPluginHelpersCheck::CreateMessage
Produces: [SP] Caught an Exception: Traceback (most recent call last): File "../addons/source-python/plugins/pluginmessages_helper/pluginmessages_helper.py", line 16, in pre_create_message player = Player(index_from_edict(args[2])) Boost.Python.ArgumentError: Python argument types in _ent...
- Tue Aug 10, 2021 6:24 pm
- Forum: Plugin Development Support
- Topic: [Advanced] Hook CPluginHelpersCheck::CreateMessage
- Replies: 6
- Views: 4148
Re: [Advanced] Hook CPluginHelpersCheck::CreateMessage
Untested, but could give you some hints: # ============================================================================ # >> IMPORTS # ============================================================================ # Source.Python Imports # Core from core import get_interface # Entities from entities i...
- Mon Jul 26, 2021 2:32 am
- Forum: Plugin Development Support
- Topic: [Cs:s] Effects showing certain user
- Replies: 10
- Views: 6730
Re: [Cs:s] Effects showing certain user
Your problem is that you are passing their userid while it should be their index.
- Fri Jul 16, 2021 12:42 am
- Forum: Plugin Development Support
- Topic: [CS:GO] Get inflictor entity in TakeDamageInfo
- Replies: 4
- Views: 3774
Re: [CS:GO] Get inflictor entity in TakeDamageInfo
I want to get the entity index (like independent sentry gun which has owner player which will be the attacker in TakeDamageInfo) My first guess would be that the entity you are passing as weapon index isn't recognized as a known weapon causing this instantiation to fail resulting into no weapon bei...
- Sun Jun 06, 2021 1:14 am
- Forum: Plugin Development Support
- Topic: Error with TraceFilterSimple()
- Replies: 2
- Views: 2654
Re: Error with TraceFilterSimple()
The following: TraceFilterSimple(ignore=(entity.index, )), Should be: TraceFilterSimple(ignore=(entity, )), Seems like the docstring was forgotten, but this was changed into the following commit: https://github.com/Source-Python-Dev-Team/Source.Python/commit/f4884487f...
- Mon May 31, 2021 3:57 pm
- Forum: Plugin Development Support
- Topic: Get/set entity array properties
- Replies: 2
- Views: 2688
Re: Get/set entity array properties
Hi! How to get / set entity properties which are arrays e.g. m_flPoseParameter ? I want to change pose parameters of my entity. It has two of them. my_entity.get_property_float('m_flPoseParameter') # it works for first pose How to get for second pose? If you use the following comman...