Search found 114 matches
- Sat Dec 14, 2019 7:51 am
- Forum: Plugin Development Support
- Topic: Repeat timers with cached player instances
- Replies: 6
- Views: 5264
Repeat timers with cached player instances
What is best way to do Repeat timers when you should get player variables there. I know I can't pass a self player object, only a player index because the object won't utilize when player will disconnect from a server. Does it mean that only conveni3nt way is taking it from PlayerDictionary by index...
- Mon Dec 09, 2019 1:47 pm
- Forum: Plugin Development Support
- Topic: Getting player index from THIS pointer inside AirAccelerate hook
- Replies: 3
- Views: 3314
Re: Getting player index from THIS pointer inside AirAccelerate hook
L'In20Cible wrote:InvisibleSoldiers wrote:THIS contains pointer to CBasePlayer, but how i can get index from it.
Try:Syntax: Select all
stack_data[0].get_pointer(4)
Ok. It works...
- Sun Dec 08, 2019 11:03 pm
- Forum: Plugin Development Support
- Topic: Getting player index from THIS pointer inside AirAccelerate hook
- Replies: 3
- Views: 3314
Getting player index from THIS pointer inside AirAccelerate hook
Hooked CGameMovement::AirAccelerate https://github.com/ValveSoftware/source-sdk-2013/blob/0d8dceea4310fde5706b3ce1c70609d72a38efdf/sp/src/game/shared/gamemovement.cpp#L1707 THIS contains pointer to CBasePlayer, but how i can get index from it. 'objdump -d server_srv.so' on Linux: 00340980 <_ZN13CGam...
- Sat Dec 07, 2019 5:19 am
- Forum: Plugin Releases
- Topic: [CS:S] CleanWhitelist
- Replies: 4
- Views: 11199
Re: [CS:S] CleanWhitelist
L'In20Cible wrote:InvisibleSoldiers wrote:I guess it would also crash if you use a PreEvent instead of an Event, right?
I will test it later, by the way kick inside OnClientActive actually kicks a player, but after it, crash is happened.
- Sat Dec 07, 2019 4:32 am
- Forum: Plugin Releases
- Topic: [CS:S] CleanWhitelist
- Replies: 4
- Views: 11199
Re: [CS:S] CleanWhitelist
Perhaps using a listener (such as OnClientActive since you need their steamid) might be preferable: http://wiki.sourcepython.com/developing/module_tutorials/listeners.html In first I tried OnNetworkIdAuthorized but it transform from edict to Player failed, OnClientConnect and OnClientOnPutInServer ...
- Fri Dec 06, 2019 11:40 pm
- Forum: Plugin Releases
- Topic: [CS:S] CleanWhitelist
- Replies: 4
- Views: 11199
[CS:S] CleanWhitelist
Source.Python plugin for creating simple whitelist. Features: Elementary whitelist without useless convars Supports any type of SteamID and a IP address All whitelisted entries stored in single file 'whitelist.conf' Installation: 1. Install Source.Python 2. Download the latest release and extract it...
- Sun Dec 01, 2019 1:51 pm
- Forum: Plugin Development Support
- Topic: Hook AirAccelerate
- Replies: 4
- Views: 3548
Re: Hook AirAccelerate
AIRACCELERATE = SERVER['_ZN13CGameMovement13AirAccelerateER6Vectorff'].make_function( Convention.THISCALL, (DataType.POINTER, DataType.FLOAT, DataType.FLOAT), DataType.VOID ) Should be: AIRACCELERATE = SERVER['_ZN13CGameMovement13AirAccelerateER6Vectorff'].make_funct...
- Sun Dec 01, 2019 1:25 pm
- Forum: Plugin Development Support
- Topic: Hook AirAccelerate
- Replies: 4
- Views: 3548
- Sun Dec 01, 2019 12:08 pm
- Forum: Plugin Development Support
- Topic: Hook AirAccelerate
- Replies: 4
- Views: 3548
Hook AirAccelerate
I'm trying to get function parameters inside CGameMovement::AirAccelerate through @PreHook, the function itself hooks properly but getting parameters unclear. CGameMovement::AirAccelerate( Vector& wishdir, float wishspeed, float accel ): https://github.com/ValveSoftware/source-sdk-2013/blob/0d8d...
- Sat Nov 02, 2019 11:56 pm
- Forum: Plugin Development Support
- Topic: Change return value inside EntityPostHook
- Replies: 5
- Views: 4533
Re: Change Vector return value inside EntityPostHook
L'In20Cible wrote:
Thank you!
Also, I noticed that i can return old eye_location inside PreHook bypassing PostHook and low level stuff with registers. Is that all right, although using PostHook in original SourceMod plugin?
- Sat Nov 02, 2019 7:07 pm
- Forum: Plugin Development Support
- Topic: Change return value inside EntityPostHook
- Replies: 5
- Views: 4533
Re: Change Vector return value inside EntityPostHook
from memory import get_object_pointer ... return get_object_pointer(NULL_VECTOR) . I added get_object_pointer() but return value changes to unknown value, when i shoot the player bullets don't impact on a player. SP INFO -------------------------------------------------------- Checksum : 07...
- Sat Nov 02, 2019 4:17 am
- Forum: Plugin Development Support
- Topic: Change return value inside EntityPostHook
- Replies: 5
- Views: 4533
Change return value inside EntityPostHook
I'm trying to convert SM plugin firebulletsfix to SP. I hooked Weapon_ShootPosition . It should return Vector EyePosition. Inside @EntityPostHook i want to return new value type of Vector, but i got exception: TypeError: No registered converter was able to extract a C++ pointer to type class CPointe...
- Fri Jun 28, 2019 7:08 pm
- Forum: Plugin Development Support
- Topic: [CS:GO] Prevent team switch event
- Replies: 8
- Views: 10798
Re: [CS:GO] Prevent team switch event
Ayuto wrote:Is that a snippet for others to use or a question? And what exactly do you want to do? Block the player_team event or really block team changes? If it's the latter, you can use a ClientCommandFilter.
Why do you recommend using ClientCommandFilter instead ClientCommand decorator?
- Mon Jun 03, 2019 12:07 am
- Forum: Plugin Development Support
- Topic: SayCommand: Print player's message before processing a command
- Replies: 1
- Views: 2508
SayCommand: Print player's message before processing a command
Is it possible to print a player's message before a command starts processing?