Search found 81 matches

by InvisibleSoldiers
Sun Jan 19, 2020 6:31 am
Forum: Plugin Development Support
Topic: Byte patch
Replies: 2
Views: 28

Byte patch

Is it possible to bytepatch binary in-memory via Python and if yes what is the best way?
by InvisibleSoldiers
Wed Jan 15, 2020 11:43 pm
Forum: Plugin Development Support
Topic: Get SendProp instance
Replies: 7
Views: 243

Re: Get SendProp instance

If mapper planned to give >1000 velocity from trigger_push or any entity in 1 tick, that's where it comes, It clamping to 1000. So no good. And what's the difference to the client? Yes, maybe he will get some kind of densynchronization, in principle, so with every booster, trigger_push isn't predict...
by InvisibleSoldiers
Tue Jan 14, 2020 11:36 pm
Forum: Plugin Development Support
Topic: Get SendProp instance
Replies: 7
Views: 243

Re: Get SendProp instance

That's a little bit contrary to what you wanted to achieve in your initial post. It says you want to stop data table warnings and your code example shows only the part that sends the warning :confused: I sometimes feel you are changing your mind just because L'In20Cible answered your post. It's jus...
by InvisibleSoldiers
Tue Jan 14, 2020 10:28 pm
Forum: Plugin Development Support
Topic: Get SendProp instance
Replies: 7
Views: 243

Re: Get SendProp instance

http://wiki.sourcepython.com/developing/module_tutorials/listeners.html#onserveroutput No, I really want to change the max available value, because the output is secondary, I don't want to cap velocity to 1000 in 1 tick. In CS:GO there are sv_clamp_unsafe_velocities , but other source engine games ...
by InvisibleSoldiers
Tue Jan 14, 2020 9:11 pm
Forum: Plugin Development Support
Topic: Get SendProp instance
Replies: 7
Views: 243

Get SendProp instance

How to get SendProp instance of specific property of entity. For example, I want to retrieve m_vecBaseVelocity property to stop the data table warnings: DataTable warning: player: Out-of-range value (2000.000000/1000.000000) in SendPropFloat 'm_vecBaseVelocity', clamping. DataTable w...
by InvisibleSoldiers
Sun Jan 12, 2020 1:59 pm
Forum: Plugin Development Support
Topic: Server crash on @EntityPreHook
Replies: 9
Views: 299

Re: Server crash on @EntityPreHook

Original plugin uses only it, without any conventions: _hWeapon_ShootPosition = DHookCreate(offset, HookType_Entity, ReturnType_Vector, ThisPointer_CBaseEntity);
by InvisibleSoldiers
Tue Jan 07, 2020 2:54 pm
Forum: Plugin Development Support
Topic: Server crash on @EntityPreHook
Replies: 9
Views: 299

Re: Server crash on @EntityPreHook

Along with pre and post hooks. Must be using an unusual convention on Linux, or that slot points to a thunk (_ZThn* instead of _ZN* symbol). Try to grab a straight signature to the later, or restructure the convention. Tried CDECL, THISCALL but STDCALL and CUSTOM give the error. TypeError: 'Con...
by InvisibleSoldiers
Tue Jan 07, 2020 11:52 am
Forum: Plugin Development Support
Topic: Server crash on @EntityPreHook
Replies: 9
Views: 299

Re: Server crash on @EntityPreHook

For CS:GO, that function's prototype appears to be: Vector Weapon_ShootPosition(Vector &vecOut); def make_function(pointer): return pointer.make_virtual_function(290, Convention.THISCALL, (DataType.POINTER, DataType.POINTER), DataType.POINTER) @EntityPreHook(...
by InvisibleSoldiers
Tue Jan 07, 2020 2:16 am
Forum: Plugin Development Support
Topic: Server crash on @EntityPreHook
Replies: 9
Views: 299

Server crash on @EntityPreHook

from entities.hooks import EntityPreHook from entities.hooks import EntityCondition from memory import Convention from memory import DataType def make_function(pointer): return pointer.make_virtual_function(290, Convention.THISCALL, (DataType.POINTER, ), DataType.POINTER) @E...
by InvisibleSoldiers
Sat Jan 04, 2020 7:31 am
Forum: Plugin Development Support
Topic: [ANY] Prevent user name changes
Replies: 10
Views: 377

Re: [ANY] Prevent user name changes

@PreEvent('player_changename') def pre_player_changename(gevent): player = Player.from_userid(gevent['userid']) # Update scoreboard. player.set_name(gevent['oldname']) gevent['newname'] = gevent['oldname'] return EventAction.BL...
by InvisibleSoldiers
Fri Jan 03, 2020 7:23 pm
Forum: Plugin Development Support
Topic: [ANY] Prevent user name changes
Replies: 10
Views: 377

Re: [ANY] Prevent user name changes

Sam wrote:

Image
by InvisibleSoldiers
Fri Jan 03, 2020 6:50 pm
Forum: Plugin Development Support
Topic: [ANY] Prevent user name changes
Replies: 10
Views: 377

Re: [ANY] Prevent user name changes

Sam wrote:I understand correctly?

void CBaseClient::SetName:

Syntax: Select all

m_ConVars->SetString( "name", m_Name );

m_Server->UserInfoChanged( m_nClientSlot );

Yes, you are right, didn't notice the simple function :rolleyes:
by InvisibleSoldiers
Fri Jan 03, 2020 6:14 pm
Forum: Plugin Development Support
Topic: CheckBoxInPVS / CheckOriginInPVS
Replies: 0
Views: 57

CheckBoxInPVS / CheckOriginInPVS

Source.Python: .def("check_origin_in_pvs", &IVEngineServer::CheckOriginInPVS, "Check whether the specified origin is inside the PVS", args("org", "checkpvs", "checkpvssize") ) .def("check_box_in_pvs", &IVEngineSe...
by InvisibleSoldiers
Thu Jan 02, 2020 1:31 am
Forum: Plugin Development Support
Topic: [ANY] Prevent user name changes
Replies: 10
Views: 377

Re: [ANY] Prevent user name changes

L'In20Cible @PreHook(get_virtual_function(engine_server, 'ClientCommand')) def _pre_client_command(args): """Block name changes started by the server. Pre-hook on IVEngineServer::ClientCommand to block the name changes. """ if args[2] ==...
by InvisibleSoldiers
Thu Jan 02, 2020 12:49 am
Forum: Code examples / Cookbook
Topic: [DEV] Algorithm for checking a point in a cube
Replies: 15
Views: 1484

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 InvisibleSoldiers
Thu Jan 02, 2020 12:43 am
Forum: Code examples / Cookbook
Topic: Perfect PlayerDictionary and Player
Replies: 4
Views: 194

Re: Perfect PlayerDictionary and Player

Okay I'm a little bent about iterating over all players in method of one player, but one PlayerDictionary for a whole plugin which will be updated on player connect or disconnect alongside list with all players for iterating over, it is awesome. I'm even scared to do benchmark with PlayerGenerator e...
by InvisibleSoldiers
Tue Dec 31, 2019 9:03 pm
Forum: Code examples / Cookbook
Topic: [DEV] Algorithm for checking a point in a cube
Replies: 15
Views: 1484

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

Also if you have a representation of a cube in 2 points (lower and upper corners) you should determine mins and maxs points. But I too recommend using standard Source.Python function because it takes care for it. Source.Python core: static bool IsWithinBox(Vector& point, Vector& corner1,...
by InvisibleSoldiers
Tue Dec 31, 2019 6:50 pm
Forum: Code examples / Cookbook
Topic: Perfect PlayerDictionary and Player
Replies: 4
Views: 194

Re: Perfect PlayerDictionary and Player

I'm honestly not sure why you think this is better than the current implementation. Read to the end. Removing all the functionality of Entity seems like a horrible idea to me... PlayerMixin inhreted from BaseEntity . That's enough. And I just created a class with just the needed functions for my pl...
by InvisibleSoldiers
Tue Dec 31, 2019 11:39 am
Forum: Code examples / Cookbook
Topic: Perfect PlayerDictionary and Player
Replies: 4
Views: 194

Perfect PlayerDictionary and Player

Perfect PlayerDictionary must have the following properties: 1. It should be one for the whole plugin. 2. It should add and remove player instances when client connect to the server and disconnects from the server respectively. 3. It should if necessary contains functions related to many players. A...
by InvisibleSoldiers
Mon Dec 30, 2019 8:57 am
Forum: Plugin Development Support
Topic: PlayerDictionary vs CachedPlayer
Replies: 37
Views: 869

Re: PlayerDictionary vs CachedPlayer

Of course I can't do it myself, but I still want to try making a Lua bindings.

Go to advanced search