Search found 248 matches

by VinciT
Fri Oct 23, 2020 5:38 pm
Forum: Plugin Requests
Topic: HL2DM-cscanner spawned
Replies: 9
Views: 835

Re: HL2DM-cscanner spawned

Is it guaranteed to only be called for networked entities? Not fully sure, but I don't think damage event are limited to them, which would raise here in such case. A try/except may be safer. Since CNPC_CScanner has its own OnTakeDamage_Alive() function, I believe the hook will only be limited to np...
by VinciT
Thu Oct 22, 2020 9:00 pm
Forum: Plugin Requests
Topic: HL2DM-cscanner spawned
Replies: 9
Views: 835

Re: HL2DM-cscanner spawned

Hi daren, took a while but I managed to get the scanner working: # ../temp_scanner/temp_scanner.py # Python from random import choice # Source.Python from core import PLATFORM from core.cache import cached_property from cvars import ConVar from engines.trace import (ContentMasks, engine_trace, G...
by VinciT
Thu Oct 15, 2020 8:20 pm
Forum: Plugin Requests
Topic: [HL2:DM] 3 Teams
Replies: 36
Views: 8543

Re: [HL2:DM] 3 Teams

This would be the complete code: from players.entity import Player from events import Event from filters.players import PlayerIter from filters.entities import EntityIter from entities.entity import Entity import operator from cvars import ConVar from commands.client import ClientCommand from comman...
by VinciT
Thu Oct 15, 2020 5:57 pm
Forum: Plugin Requests
Topic: [HL2:DM] 3 Teams
Replies: 36
Views: 8543

Re: [HL2:DM] 3 Teams

Going off of the plugin Painkiller posted - replace the on_client_active() function (lines 29 - 38) with this: @OnClientActive def on_client_active(index): if teamplay == 1: player = Player(index) if player.is_bot(): return if player.userid in player_team: player.client_comma...
by VinciT
Thu Oct 15, 2020 5:45 pm
Forum: Plugin Requests
Topic: hl2dm crossbow arrows with a fire flame.
Replies: 24
Views: 1520

Re: hl2dm crossbow arrows with a fire flame.

Sure thing, I've added two options you can change to your liking: # ../fiery_bolts/fiery_bolts.py # Python import random # Source.Python from engines.precache import Model from engines.sound import Sound from entities.constants import (EntityStates, RenderMode, RenderEffects, MoveType, WORLD_ENT...
by VinciT
Sun Oct 11, 2020 4:51 pm
Forum: Plugin Requests
Topic: hl2dm crossbow arrows with a fire flame.
Replies: 24
Views: 1520

Re: hl2dm crossbow arrows with a fire flame.

I get this now 2020-10-10 16:26:58 - sp - EXCEPTION [SP] Caught an Exception: Traceback (most recent call last): File "..\addons\source-python\packages\source-python\entities\dictionary.py", line 135, in _on_networked_entity_deleted self.on_automatically_removed(index) File "..\addon...
by VinciT
Sun Oct 11, 2020 4:43 pm
Forum: Plugin Requests
Topic: Crowbar throw
Replies: 10
Views: 1887

Re: Crowbar throw

Works great :cool: :cool: Thank you again, took me a min to figer out you can pick up the ones your throw by going to the crowbar or stick and hitting e button. :rolleyes: :rolleyes: THANK YOU :cool: I probably should've given some details how the plugin works. :tongue: For anyone else trying out t...
by VinciT
Sat Oct 10, 2020 9:57 pm
Forum: Plugin Requests
Topic: [HL2:DM] Infinite aux power for sprinting OR breathing
Replies: 22
Views: 19651

Re: [HL2:DM] Infinite aux power for sprinting OR breathing

While working on a plugin of my own, I came across a more efficient way for setting the drain rate of aux: https://gist.github.com/vinci6k/62906c2f570dfab1f9b647d3b613f020 The CHL2_Player::SuitPower_AddDevice() function gets called only when the player starts running or diving, while RunCommand() ge...
by VinciT
Sat Oct 10, 2020 8:57 pm
Forum: Plugin Requests
Topic: Crowbar throw
Replies: 10
Views: 1887

Re: Crowbar throw

Looks really good, nice job! :smile: Thank you! :grin: You don't really need that dictionary, since your active instances are already accessible through: Throwable.cache This is amazing! I can't believe I never used .cache before. If your plugin is loaded via autoexec.cfg , it will raise here becau...
by VinciT
Sat Oct 10, 2020 7:56 pm
Forum: Plugin Requests
Topic: Crowbar throw
Replies: 10
Views: 1887

Re: Crowbar throw

So.. Daren.. I noticed a few days ago that you removed a couple of your posts from this thread. If I remember correctly, you were getting some errors - probably an issue with long range kills. In case you're not satisfied with the plugin Painkiller posted, here's my take on your request: # ../throwa...
by VinciT
Thu Oct 08, 2020 2:23 pm
Forum: Plugin Development Support
Topic: Code that works in tf2 fails in tf2c mod.
Replies: 3
Views: 859

Re: Code that works in tf2 fails in tf2c mod.

There's a tutorial for calling virtual functions on the wiki. And here's a quick example of calling a function hooked with a signature (made for HL2DM): # ../util_fadeall/util_fadeall.py # Source.Python from colors import Color from commands.client import ClientCommand from core import PLATFORM from...
by VinciT
Sun Oct 04, 2020 11:09 am
Forum: Plugin Development Support
Topic: [HL2DM/ANY] Hooking VphysicsCollision
Replies: 13
Views: 631

Re: [HL2DM/ANY] Hooking VphysicsCollision

In general, size of bool is 1. But as L'In20Cible wrote, compiler will add padding to improve performance. In this case, at bool we count 16, 17 and add 2 bytes for padding, and we get an offset value of 32. Thank you for the detailed explanation! And using godbolt.org is an easy way to check. Exam...
by VinciT
Sat Oct 03, 2020 4:30 am
Forum: Plugin Development Support
Topic: [HL2DM/ANY] Hooking VphysicsCollision
Replies: 13
Views: 631

Re: [HL2DM/ANY] Hooking VphysicsCollision

I see, thanks for the info. Guess I'll have to do some reading on memory/data alignment.
by VinciT
Sat Oct 03, 2020 4:21 am
Forum: Plugin Development Support
Topic: Code that works in tf2 fails in tf2c mod.
Replies: 3
Views: 859

Re: Code that works in tf2 fails in tf2c mod.

The offsets for the PlayerRunCommand virtual function are different between TF2 and TF2C , which is why the listener never fires. The same can be said about the gEntList/CGlobalEntityList - which I assume is responsible for entity creation ( TF2 vs TF2C ). I don't know how hard or time consuming it ...
by VinciT
Fri Oct 02, 2020 6:42 am
Forum: Plugin Development Support
Topic: [HL2DM/ANY] Hooking VphysicsCollision
Replies: 13
Views: 631

Re: [HL2DM/ANY] Hooking VphysicsCollision

Cool, I got one more question if you don't mind. :tongue: Am I terrible at counting or should the starting offset be at 30? struct vcollisionevent_t { IPhysicsObject *pObjects[2]; // 0 int surfaceProps[2]; // 8 bool isCollision; // 16 bool isShadowCollision; // 17 float deltaCollisionTime; // 18 flo...
by VinciT
Fri Oct 02, 2020 6:11 am
Forum: Plugin Development Support
Topic: [HL2DM/ANY] Hooking VphysicsCollision
Replies: 13
Views: 631

Re: [HL2DM/ANY] Hooking VphysicsCollision

It works! Much appreciated Jezza. I'm assuming the offsets start at 32 because of the inherited vcollisionevent_t struct , am I correct?
by VinciT
Fri Oct 02, 2020 3:46 am
Forum: Plugin Requests
Topic: [HL2:DM] Little Silent Hill
Replies: 63
Views: 3676

Re: [HL2:DM] Little Silent Hill

I'd love to help, but I have no experience with animations. Your best bet is to either find NPC specific models on the workshop (maybe even gamebanana/moddb) or find someone who can properly rig and animate those models.
by VinciT
Fri Oct 02, 2020 3:30 am
Forum: Plugin Development Support
Topic: [HL2DM/ANY] Hooking VphysicsCollision
Replies: 13
Views: 631

Re: [HL2DM/ANY] Hooking VphysicsCollision

With BaseEntity I'm either getting: [SP] Caught an Exception: Traceback (most recent call last): File "..\addons\source-python\plugins\vphysics_collision\vphysics_collision.py", line 41, in vphysics_collision_pre print(base_entity.classname) AttributeError: 'NoneType' object has no attribu...
by VinciT
Thu Oct 01, 2020 11:16 pm
Forum: Plugin Requests
Topic: [HL2:DM] Little Silent Hill
Replies: 63
Views: 3676

Re: [HL2:DM] Little Silent Hill

If the models are T posing that means they are missing animations required by the NPC. In other words, they were made either for the player or some other NPC. Animations can be played through code, but it's much better to have them properly setup within the model.
by VinciT
Thu Oct 01, 2020 9:08 pm
Forum: Plugin Requests
Topic: [HL2:DM] Little Silent Hill
Replies: 63
Views: 3676

Re: [HL2:DM] Little Silent Hill

Okay, the way you have it setup right now, the pyramid head model is being set for the npc_zombie, and the bubble nurse model for the npc_headcrab - which is why the nurse is moving like a headcrab. If your intention was to set both models for the npc_zombie, replace the dictionary with this: NPC_MO...

Go to advanced search