Search found 114 matches
- Mon Dec 23, 2019 3:11 pm
- Forum: Plugin Development Support
- Topic: PlayerDictionary vs CachedPlayer
- Replies: 36
- Views: 21179
PlayerDictionary vs CachedPlayer
After L'In20Cible's commits with Cached player instances, an obvious question is brewing. Is there a difference between the two now? from players.dictionary import PlayerDictionary PLAYERS = PlayerDictionary() player = PLAYERS[1] from players.entity import Player # Cached by default player =...
- Sun Dec 22, 2019 9:13 pm
- Forum: Plugin Releases
- Topic: [CS:S] JumpStats
- Replies: 29
- Views: 33869
Re: [CS:S] JumpStats
Ok, thank you for this long correspondence! I hope everything will work well now on Windows and Linux!
- Sun Dec 22, 2019 8:55 pm
- Forum: Plugin Releases
- Topic: [CS:S] JumpStats
- Replies: 29
- Views: 33869
Re: [CS:S] JumpStats
Use 'instance_attribute' instead of 'pointer_attribute'. [SP] Caught an Exception: Traceback (most recent call last): File "../addons/source-python/plugins/jumpstats/jumpstats.py", line 44, in pre_airaccelerate wishdir = make_object(Vector, stack_data[1]) IndexError: Index out of range. p...
- Sun Dec 22, 2019 8:47 pm
- Forum: Plugin Releases
- Topic: [CS:S] JumpStats
- Replies: 29
- Views: 33869
Re: [CS:S] JumpStats
Use 'instance_attribute' instead of 'pointer_attribute'. [SP] Caught an Exception: Traceback (most recent call last): File "../addons/source-python/plugins/jumpstats/jumpstats.py", line 44, in pre_airaccelerate wishdir = make_object(Vector, stack_data[1]) IndexError: Index out of range. p...
- Sun Dec 22, 2019 8:32 pm
- Forum: Plugin Releases
- Topic: [CS:S] JumpStats
- Replies: 29
- Views: 33869
Re: [CS:S] JumpStats
Well, are you trying that on windows? Remember, .so = linux, .dll = windows.
I use Linux for the server.
- Sun Dec 22, 2019 8:30 pm
- Forum: Plugin Releases
- Topic: [CS:S] JumpStats
- Replies: 29
- Views: 33869
Re: [CS:S] JumpStats
manager = TypeManager() gamemovement = { 'binary': 'server', 'function': { 'AIRACCELERATE': { 'identifier': aa_signature, 'args': (DataType.POINTER, DataType.POINTER, DataType.FLOAT, DataType.FLOAT), 'return_type': DataType.VOI...
- Sun Dec 22, 2019 8:27 pm
- Forum: Plugin Releases
- Topic: [CS:S] JumpStats
- Replies: 29
- Views: 33869
Re: [CS:S] JumpStats
L'In20Cible wrote:Try without _srv suffix.
Still the error.
- Sun Dec 22, 2019 8:18 pm
- Forum: Plugin Releases
- Topic: [CS:S] JumpStats
- Replies: 29
- Views: 33869
Re: [CS:S] JumpStats
@PreHook(GameMovement.AIRACCELERATE) def pre_airaccelerate(stack_data): game_movement = make_object(GameMovement, stack_data[0]) index = index_from_pointer(game_movement.player_pointer) player = PLAYERS[index] [SP] Caught an Exception: Traceback (most recent call...
- Sun Dec 22, 2019 8:08 pm
- Forum: Plugin Releases
- Topic: [CS:S] JumpStats
- Replies: 29
- Views: 33869
Re: [CS:S] JumpStats
Btw you don't know what's wrong? print(get_interface('server_srv.so', 'GameMovement001')) File "../addons/source-python/plugins/jumpstats/config/__init__.py", line 186, in <module> print(get_interface('server_srv.so', 'GameMovement001...
- Sun Dec 22, 2019 8:00 pm
- Forum: Plugin Releases
- Topic: [CS:S] JumpStats
- Replies: 29
- Views: 33869
Re: [CS:S] JumpStats
The this pointer register is being reused during the call, making your game_movement invalid because stack_data[0] is a local pointer that has been freed when exiting the original function call. Mostly why you are crashing, actually. Either store the this pointer from the pre hook and use it in the...
- Sun Dec 22, 2019 7:45 pm
- Forum: Plugin Releases
- Topic: [CS:S] JumpStats
- Replies: 29
- Views: 33869
Re: [CS:S] JumpStats
Btw you don't know what's wrong? print(get_interface('server_srv.so', 'GameMovement001')) File "../addons/source-python/plugins/jumpstats/config/__init__.py", line 186, in <module> print(get_interface('server_srv.so', 'GameMovement001'...
- Sun Dec 22, 2019 7:33 pm
- Forum: Plugin Releases
- Topic: [CS:S] JumpStats
- Replies: 29
- Views: 33869
Re: [CS:S] JumpStats
Full traceback? [SP] Caught an Exception: Traceback (most recent call last): File "../addons/source-python/plugins/jumpstats/jumpstats.py", line 51, in post_friction player = PLAYERS[index_from_pointer(game_movement.player_pointer)] ValueError: Conversion from "Pointe...
- Sun Dec 22, 2019 7:08 pm
- Forum: Plugin Releases
- Topic: [CS:S] JumpStats
- Replies: 29
- Views: 33869
Re: [CS:S] JumpStats
L'In20Cible wrote:InvisibleSoldiers wrote:AttributeError: 'DataType' object has no attribute 'upper'[/syntax]Syntax: Select all
'POINTER'
Syntax: Select all
ValueError: Conversion from "Pointer" (<_memory.Pointer object at 0xeced29e0>) to "Index" failed.
Early i did it through Player() object to get index: PLAYERS[Player().index]
- Sun Dec 22, 2019 6:56 pm
- Forum: Plugin Releases
- Topic: [CS:S] JumpStats
- Replies: 29
- Views: 33869
Re: [CS:S] JumpStats
[pointer_attribute] [[player_pointer]] type = POINTER offset = 4 'pointer_attribute': { 'player_pointer': { 'type': DataType.POINTER, 'offset': 0x4 } } File "../addons/source-python/packages/source-python/memory/helpers.py", line 63, in is_native return has...
- Sun Dec 22, 2019 6:42 pm
- Forum: Plugin Releases
- Topic: [CS:S] JumpStats
- Replies: 29
- Views: 33869
Re: [CS:S] JumpStats
L'In20Cible wrote:Syntax: Select all
'_binary': 'server',
Should be:Syntax: Select all
'binary': 'server',
Edit
- Sun Dec 22, 2019 6:30 pm
- Forum: Plugin Releases
- Topic: [CS:S] JumpStats
- Replies: 29
- Views: 33869
Re: [CS:S] JumpStats
To be honest, there is absolutely no reason not to use TypeManager.create_type_from_dict or even better from a file and let it to its work instead. :wink: Can you explain how to properly create the type using this, it is a bit hard to read for me, i tried: manager = TypeManager() gamemoveme...
- Sun Dec 22, 2019 8:45 am
- Forum: Plugin Releases
- Topic: [CS:S] JumpStats
- Replies: 29
- Views: 33869
Re: [CS:S] JumpStats
Question to L'In20Cible or Ayuto. Why the windows signatures CGameMovement::AirAccelerate ('55 8B EC 51 56 8B F1 8B 46 04') and CGameMovement::Friction ('55 8B EC F3 0F 10 1D ? ? ? ? 83 EC 08 56 8B F1 8B 4E 04') lead to server crash. I pass these raw strings to the binary 'server' and create functio...
- Thu Dec 19, 2019 6:47 pm
- Forum: Plugin Releases
- Topic: [CS:S] JumpStats
- Replies: 29
- Views: 33869
[CS:S] JumpStats
Improved version of SSJ with various bug fixes and new features. Reogranized menu Reorganized menu for comfortable tweeking chat preferences. Better configuration Server owners can easily configure almost all options in one single file. Fixes Fixed printing jump stats to spectators when a spectator ...
- Sat Dec 14, 2019 10:07 am
- Forum: Plugin Development Support
- Topic: Repeat timers with cached player instances
- Replies: 6
- Views: 5257
Re: Repeat timers with cached player instances
You could simply use something like this: from listeners.tick import Repeat from players.dictionary import PlayerDictionary class CustomPlayer(Player): def __init__(self, index): super().__init__(index) self.sex = 'female' self.age = 16 self.is_dead = False s...
- Sat Dec 14, 2019 8:33 am
- Forum: Plugin Development Support
- Topic: Repeat timers with cached player instances
- Replies: 6
- Views: 5257
Re: Repeat timers with cached player instances
from listeners.tick import Repeat from players.dictionary import PlayerDictionary class CustomPlayer(Player): def __init__(self, index): super().__init__(index) self.sex = 'female' self.age = 16 self.is_dead = False self.aging_timer = Repeat(aging, (s...