Search found 331 matches
- Sat Oct 31, 2020 7:07 am
- Forum: Plugin Requests
- Topic: [Cs:s] chat command to change map
- Replies: 13
- Views: 7550
Re: [Cs:s] chat command to change map
I'm not sure you want the possible_maps logic. For instance, if you want to switch to de_dust, it will always give you that "Be more specific" message, because there's de_dust and de_dust2. I knew this was a problem the moment I hit submit, I completely forgot about that scenario while ma...
- Thu Oct 29, 2020 9:37 pm
- Forum: Plugin Requests
- Topic: [Cs:s] chat command to change map
- Replies: 13
- Views: 7550
Re: [Cs:s] chat command to change map
I'm in a bit of a hurry so this might not be fully working, but give it a shot: # ../change_map/change_map.py # Python from textwrap import wrap # Source.Python from commands import CommandReturn from commands.say import SayCommand from engines.server import queue_command_string from engines.sound i...
- Thu Oct 29, 2020 8:10 am
- Forum: Plugin Requests
- Topic: HL2DM-cscanner spawned
- Replies: 15
- Views: 10376
Re: HL2DM-cscanner spawned
I think the things on the pictures, he is still working on it, it is only a preview. Painkiller is correct, the gifs I posted are just a preview of what I'm currently working on. The plan was to post the special scanner as a single file plugin in this thread, but as I kept adding more and more feat...
- Fri Oct 23, 2020 5:38 pm
- Forum: Plugin Requests
- Topic: HL2DM-cscanner spawned
- Replies: 15
- Views: 10376
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...
- Thu Oct 22, 2020 9:00 pm
- Forum: Plugin Requests
- Topic: HL2DM-cscanner spawned
- Replies: 15
- Views: 10376
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...
- Thu Oct 15, 2020 8:20 pm
- Forum: Plugin Requests
- Topic: [HL2:DM] 3 Teams
- Replies: 36
- Views: 23611
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...
- Thu Oct 15, 2020 5:57 pm
- Forum: Plugin Requests
- Topic: [HL2:DM] 3 Teams
- Replies: 36
- Views: 23611
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...
- Thu Oct 15, 2020 5:45 pm
- Forum: Plugin Requests
- Topic: hl2dm crossbow arrows with a fire flame.
- Replies: 24
- Views: 12381
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...
- Sun Oct 11, 2020 4:51 pm
- Forum: Plugin Requests
- Topic: hl2dm crossbow arrows with a fire flame.
- Replies: 24
- Views: 12381
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...
- Sun Oct 11, 2020 4:43 pm
- Forum: Plugin Requests
- Topic: Crowbar throw
- Replies: 12
- Views: 10386
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...
- Sat Oct 10, 2020 9:57 pm
- Forum: Plugin Requests
- Topic: [HL2:DM] Infinite aux power for sprinting OR breathing
- Replies: 22
- Views: 29371
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...
- Sat Oct 10, 2020 8:57 pm
- Forum: Plugin Requests
- Topic: Crowbar throw
- Replies: 12
- Views: 10386
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...
- Sat Oct 10, 2020 7:56 pm
- Forum: Plugin Requests
- Topic: Crowbar throw
- Replies: 12
- Views: 10386
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...
- Thu Oct 08, 2020 2:23 pm
- Forum: Plugin Development Support
- Topic: Code that works in tf2 fails in tf2c mod.
- Replies: 3
- Views: 3192
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...
- Sun Oct 04, 2020 11:09 am
- Forum: Plugin Development Support
- Topic: [HL2DM/ANY] Hooking VphysicsCollision
- Replies: 13
- Views: 7071
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...
- Sat Oct 03, 2020 4:30 am
- Forum: Plugin Development Support
- Topic: [HL2DM/ANY] Hooking VphysicsCollision
- Replies: 13
- Views: 7071
Re: [HL2DM/ANY] Hooking VphysicsCollision
I see, thanks for the info. Guess I'll have to do some reading on memory/data alignment.
- Sat Oct 03, 2020 4:21 am
- Forum: Plugin Development Support
- Topic: Code that works in tf2 fails in tf2c mod.
- Replies: 3
- Views: 3192
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 ...
- Fri Oct 02, 2020 6:42 am
- Forum: Plugin Development Support
- Topic: [HL2DM/ANY] Hooking VphysicsCollision
- Replies: 13
- Views: 7071
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...
- Fri Oct 02, 2020 6:11 am
- Forum: Plugin Development Support
- Topic: [HL2DM/ANY] Hooking VphysicsCollision
- Replies: 13
- Views: 7071
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?
- Fri Oct 02, 2020 3:46 am
- Forum: Plugin Requests
- Topic: [HL2:DM] Little Silent Hill
- Replies: 77
- Views: 45733
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.