Search found 114 matches

by InvisibleSoldiers
Mon Dec 23, 2019 3:11 pm
Forum: Plugin Development Support
Topic: PlayerDictionary vs CachedPlayer
Replies: 36
Views: 20719

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 =...
by InvisibleSoldiers
Sun Dec 22, 2019 9:13 pm
Forum: Plugin Releases
Topic: [CS:S] JumpStats
Replies: 29
Views: 33139

Re: [CS:S] JumpStats

Ok, thank you for this long correspondence! I hope everything will work well now on Windows and Linux!
by InvisibleSoldiers
Sun Dec 22, 2019 8:55 pm
Forum: Plugin Releases
Topic: [CS:S] JumpStats
Replies: 29
Views: 33139

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...
by InvisibleSoldiers
Sun Dec 22, 2019 8:47 pm
Forum: Plugin Releases
Topic: [CS:S] JumpStats
Replies: 29
Views: 33139

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...
by InvisibleSoldiers
Sun Dec 22, 2019 8:32 pm
Forum: Plugin Releases
Topic: [CS:S] JumpStats
Replies: 29
Views: 33139

Re: [CS:S] JumpStats

Well, are you trying that on windows? Remember, .so = linux, .dll = windows.

I use Linux for the server.
by InvisibleSoldiers
Sun Dec 22, 2019 8:30 pm
Forum: Plugin Releases
Topic: [CS:S] JumpStats
Replies: 29
Views: 33139

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...
by InvisibleSoldiers
Sun Dec 22, 2019 8:27 pm
Forum: Plugin Releases
Topic: [CS:S] JumpStats
Replies: 29
Views: 33139

Re: [CS:S] JumpStats

L'In20Cible wrote:Try without _srv suffix.


Still the error.
by InvisibleSoldiers
Sun Dec 22, 2019 8:18 pm
Forum: Plugin Releases
Topic: [CS:S] JumpStats
Replies: 29
Views: 33139

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...
by InvisibleSoldiers
Sun Dec 22, 2019 8:08 pm
Forum: Plugin Releases
Topic: [CS:S] JumpStats
Replies: 29
Views: 33139

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...
by InvisibleSoldiers
Sun Dec 22, 2019 8:00 pm
Forum: Plugin Releases
Topic: [CS:S] JumpStats
Replies: 29
Views: 33139

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...
by InvisibleSoldiers
Sun Dec 22, 2019 7:45 pm
Forum: Plugin Releases
Topic: [CS:S] JumpStats
Replies: 29
Views: 33139

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'...
by InvisibleSoldiers
Sun Dec 22, 2019 7:33 pm
Forum: Plugin Releases
Topic: [CS:S] JumpStats
Replies: 29
Views: 33139

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...
by InvisibleSoldiers
Sun Dec 22, 2019 7:08 pm
Forum: Plugin Releases
Topic: [CS:S] JumpStats
Replies: 29
Views: 33139

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]
by InvisibleSoldiers
Sun Dec 22, 2019 6:56 pm
Forum: Plugin Releases
Topic: [CS:S] JumpStats
Replies: 29
Views: 33139

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...
by InvisibleSoldiers
Sun Dec 22, 2019 6:42 pm
Forum: Plugin Releases
Topic: [CS:S] JumpStats
Replies: 29
Views: 33139

Re: [CS:S] JumpStats

L'In20Cible wrote:

Syntax: Select all

'_binary': 'server',


Should be:

Syntax: Select all

'binary': 'server',

Edit
by InvisibleSoldiers
Sun Dec 22, 2019 6:30 pm
Forum: Plugin Releases
Topic: [CS:S] JumpStats
Replies: 29
Views: 33139

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...
by InvisibleSoldiers
Sun Dec 22, 2019 8:45 am
Forum: Plugin Releases
Topic: [CS:S] JumpStats
Replies: 29
Views: 33139

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...
by InvisibleSoldiers
Thu Dec 19, 2019 6:47 pm
Forum: Plugin Releases
Topic: [CS:S] JumpStats
Replies: 29
Views: 33139

[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 ...
by InvisibleSoldiers
Sat Dec 14, 2019 10:07 am
Forum: Plugin Development Support
Topic: Repeat timers with cached player instances
Replies: 6
Views: 5174

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...
by InvisibleSoldiers
Sat Dec 14, 2019 8:33 am
Forum: Plugin Development Support
Topic: Repeat timers with cached player instances
Replies: 6
Views: 5174

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...

Go to advanced search