Search found 100 matches

by Sam
Tue Mar 03, 2020 11:39 am
Forum: Plugin Development Support
Topic: Hooking instruction by its signature via plugin
Replies: 8
Views: 19995

Re: Hooking instruction by its signature via plugin

Do you want to modify instruction `cmp [ecx+0x0AB0], eax`. I'm not a Linux expert but I can say that you can use (for Windows): pywin32 + ctypes (WriteProcessMemory, ReadProcessMemory, and etc)
by Sam
Wed Jan 29, 2020 7:17 am
Forum: Plugin Development Support
Topic: trigger_push, change push speed
Replies: 4
Views: 12473

Re: trigger_push, change push speed

Maybe?

Code: Select all

stack_data[0].set_float(0x74, 512.0)

http://wiki.sourcepython.com/developing ... .set_float
by Sam
Thu Jan 23, 2020 4:27 am
Forum: Plugin Development Support
Topic: Difference in float numbers.
Replies: 5
Views: 13241

Re: Difference in float numbers.

Loss of accuracy in Python float is inevitable. For this, there is module `decimal`
by Sam
Mon Jan 20, 2020 11:30 am
Forum: General Discussion
Topic: *DELETED*
Replies: 1
Views: 17776

[Q/DEV] UserInfo method

Maybe you should add this? pl = Player(1)pl.get_convar_value("lol") # -> 2# It is important for me to add this function to the Player# It is important to add that this function is available when the player is fully loaded, otherwise the server will crash. from engines.server import engine_serverget_...
by Sam
Sun Jan 19, 2020 6:46 am
Forum: Plugin Development Support
Topic: Byte patch
Replies: 2
Views: 6537

Re: Byte patch

InvisibleSoldiers wrote:Is it possible to bytepatch binary in-memory via Python and if yes what is the best way?


1. Yes
2. The best way. The one you like. (LLPL, API and etc)
by Sam
Tue Jan 14, 2020 12:56 am
Forum: Plugin Development Support
Topic: Server crash on @EntityPreHook
Replies: 11
Views: 20361

Re: Server crash on @EntityPreHook

Original plugin uses only it, without any conventions: _hWeapon_ShootPosition = DHookCreate(offset, HookType_Entity, ReturnType_Vector, ThisPointer_CBaseEntity); Since it creates a hook using an offset/index in the vtable, it probably assumes THISCALL internally. There is always a convention, becau...
by Sam
Mon Jan 13, 2020 12:34 pm
Forum: Plugin Development Support
Topic: Server crash on @EntityPreHook
Replies: 11
Views: 20361

Re: Server crash on @EntityPreHook

InvisibleSoldiers wrote:Original plugin uses only it, without any conventions: _hWeapon_ShootPosition = DHookCreate(offset, HookType_Entity, ReturnType_Vector, ThisPointer_CBaseEntity);


SourceMod - DHooks (Dynamic Hooks - Dev Preview)
You can look at the source code and find out what is there. :P
by Sam
Fri Jan 03, 2020 7:35 pm
Forum: Plugin Development Support
Topic: [ANY] Prevent user name changes
Replies: 10
Views: 10111

Re: [ANY] Prevent user name changes

"I have the disassemblers and source code on all computers with fast internet xD" There is a leaked version of the Source Engine 2007, public Source SDK released by Valve and reverse engineered versions of the Source SDK. I know, but my modem in the hills working badly xD I am not in the ...
by Sam
Fri Jan 03, 2020 7:18 pm
Forum: Plugin Development Support
Topic: [ANY] Prevent user name changes
Replies: 10
Views: 10111

Re: [ANY] Prevent user name changes

I understand correctly? void CBaseClient::SetName: m_ConVars->SetString( "name", m_Name ); m_Server->UserInfoChanged( m_nClientSlot ); Yes, you are right, didn't notice the simple function :rolleyes: Oh my GOD. As I did not see this little function... xDD Take offsets or s...
by Sam
Fri Jan 03, 2020 7:09 pm
Forum: Plugin Development Support
Topic: [ANY] Prevent user name changes
Replies: 10
Views: 10111

Re: [ANY] Prevent user name changes

I understand correctly? No, this is possible, although I'm not sure, will only block a chat message, and he needs more global preventing. else if ( Q_strcmp( "player_changename", eventname ) == 0 ) { if ( !hudChat ) return; const char *pszOldName = event->GetString...
by Sam
Fri Jan 03, 2020 5:57 pm
Forum: Plugin Development Support
Topic: [ANY] Prevent user name changes
Replies: 10
Views: 10111

Re: [ANY] Prevent user name changes

I'm creating an plugin to integrate my discord with my TF2 servers; and want to force names to be sync'd. I need to be able to prevent players from changing their name. This code does not seem to work: @PreEvent('player_changename')def on_changename(event):    return EventAction.BLOCK Am I missing ...
by Sam
Fri Jan 03, 2020 5:41 pm
Forum: Code examples / Cookbook
Topic: *DELETED*
Replies: 14
Views: 43631

Re: [DEV] Algorithm for checking a point in a cube

Jesus... WHAT??? What you gave us is really bad. I wouldn't include this in any Cookbook. I just thought of a better alternative. And without it I suppose someone will use yours instead of the normal way. I respect your imagination of course but do not be impudent accepting your algorithm as the on...
by Sam
Wed Jan 01, 2020 6:41 pm
Forum: Code examples / Cookbook
Topic: *DELETED*
Replies: 14
Views: 43631

Re: [DEV] Algorithm for checking a point in a cube

Jesus...
by Sam
Fri Dec 27, 2019 5:22 pm
Forum: API Design
Topic: My thoughts, questions and wishes
Replies: 25
Views: 80902

Re: My thoughts, questions and wishes

I think it's silly to compare SM with SP xD I wonder when SL (Source Lua) will appear xD Yeah, i thought about it too, but there must be reasons for Ayuto in preference of Python instead Lua. Lua is fast but little functional and difficult to learn. I wanted to use it as a replacement for dll, so
by Sam
Fri Dec 27, 2019 4:52 pm
Forum: API Design
Topic: My thoughts, questions and wishes
Replies: 25
Views: 80902

Re: My thoughts, questions and wishes

13. Without my notes, I cannot help with this. Try to search for a way in API and what do you dislike about `TextMsg("Hell", HudDestination.CONSOLE).send()`? I didn't know about it, but looking for SourceMod, there is a special function https://sm.alliedmods.net/new-api/console/PrintToCon...
by Sam
Fri Dec 27, 2019 4:51 pm
Forum: API Design
Topic: My thoughts, questions and wishes
Replies: 25
Views: 80902

Re: My thoughts, questions and wishes

13. Without my notes, I cannot help with this. Try to search for a way in API and what do you dislike about `TextMsg("Hell", HudDestination.CONSOLE).send()`? I didn't know about it, but looking for SourceMod, there is a special function https://sm.alliedmods.net/new-api/console/PrintToCon...
by Sam
Fri Dec 27, 2019 4:49 pm
Forum: API Design
Topic: My thoughts, questions and wishes
Replies: 25
Views: 80902

Re: My thoughts, questions and wishes

http://wiki.sourcepython.com/developing/modules/net_channel.html?highlight=netflow#net_channel.NetFlow Who's stopping you from rewriting the code? player.get_latency = engine_server.get_player_net_info( player.index ).get_latency # If you try, you can write better This is a little confusing for a s...
by Sam
Fri Dec 27, 2019 4:43 pm
Forum: API Design
Topic: My thoughts, questions and wishes
Replies: 25
Views: 80902

Re: My thoughts, questions and wishes

9. If it can be installed on Python 3.8, then there is such a possibility. It happens that some cannot be installed. Like Lupa (Lua 5.3 for Python) it should be possible also in Python 3.8 because why would they lose their customer base, but we are on Python 3.6 if i remember, and i installed it wi...
by Sam
Fri Dec 27, 2019 4:39 pm
Forum: API Design
Topic: My thoughts, questions and wishes
Replies: 25
Views: 80902

Re: My thoughts, questions and wishes

13.
Without my notes, I cannot help with this. Try to search for a way in API and what do you dislike about `TextMsg("Hell", HudDestination.CONSOLE).send()`?
by Sam
Fri Dec 27, 2019 4:30 pm
Forum: API Design
Topic: My thoughts, questions and wishes
Replies: 25
Views: 80902

Re: My thoughts, questions and wishes

3. from engines.server import engine_server pl_inf = engine_server.get_player_net_info( 1 ) # ARGS: Player Index print(f"Channel name = {pl_inf.name}") print(f"Net address of the player = {pl_inf.address}") print(f"Current net time = {pl_inf.time}") print(f"Amount...

Go to advanced search