Search found 1256 matches

by L'In20Cible
Fri Sep 23, 2022 1:34 am
Forum: Plugin Development Support
Topic: TF2 Event Win Reasons
Replies: 4
Views: 1989

Re: TF2 Event Win Reasons

# ../resource/tf_english.txt "Winreason_AllPointsCaptured" "%s1 captured all control points" "Winreason_FlagCaptureLimit" "%s1 captured the enemy intelligence %s2 times" "Winreason_FlagCaptureLimit_One" "%s1 captured the enemy intelligence %s2 ...
by L'In20Cible
Sun Sep 18, 2022 6:48 am
Forum: Custom Packages
Topic: Enki
Replies: 3
Views: 26608

Re: Enki

It is indeed very cool! Fighting client prediction on physics or movements is always a pain and it looks really smooth in your previews which is impressive. I've not looked much at the code, but 2 things I've noticed: ⋅ In your first example (water_splash.py), I think you could use the fol...
by L'In20Cible
Sun Sep 18, 2022 6:37 am
Forum: Plugin Development Support
Topic: trace ray
Replies: 4
Views: 2987

Re: trace ray

You can simply modify the TraceFilterSimple to ignore all players: engine_trace.trace_ray( TraceFilterSimple(ignore=[player.index for player in PlayerIter()]), ) Despite what I believe is outdated documentation, the TraceFilterSimple class actually accept an iterable of Base...
by L'In20Cible
Thu Jul 07, 2022 1:58 am
Forum: Plugin Development Support
Topic: print UnicodeEncodeError
Replies: 4
Views: 3034

Re: print UnicodeEncodeError

Thank you for your update! The machine where the exception occurs is running CS:S only, since your core file is inside a csgo folder. My bad, knew you were on Linux but thought this was for CS:GO. I will drop a CS:S build in that directory shortly. Its a very weird behaviour, since the machine's ou...
by L'In20Cible
Wed Jul 06, 2022 4:39 pm
Forum: Plugin Development Support
Topic: print UnicodeEncodeError
Replies: 4
Views: 3034

Re: print UnicodeEncodeError

My first guess would be that, at some point, your locale settings are being overwritten somehow causing SP to resolve to ascii after a subsequent launch of your server(s). We -could- enforce an encoding, however, this would likely result into weird behaviours for everything that rely on locale/defau...
by L'In20Cible
Tue May 31, 2022 5:39 pm
Forum: Plugin Development Support
Topic: HudMsg immediately disappears
Replies: 2
Views: 1909

Re: HudMsg immediately disappears

Whenever a new round starts, the game send a ResetHUD message to all players in order to remove messages from the last round. Delay your message by a few frames so that it is being sent after that reset.
by L'In20Cible
Thu May 05, 2022 5:22 pm
Forum: Plugin Development Support
Topic: Entity I/O
Replies: 4
Views: 2417

Re: Entity I/O

Articha wrote:you write two DataType.Pointer. How I know what arguments should be passed to function?

That specific function is defined as an ENTITYFUNCPTR:

Syntax: Select all

typedef void (CBaseEntity::*ENTITYFUNCPTR)(CBaseEntity *pOther );
So, it accepts 2 CBaseEntity pointers; this and pOther.
by L'In20Cible
Thu May 05, 2022 1:59 pm
Forum: Plugin Development Support
Topic: Entity I/O
Replies: 4
Views: 2417

Re: Previous forum

I still don't want to hook OnTrigger like in trigger_multiple, bcz there's many triggers with OnTrigger output. Can I somehow move that trigger into FireUser1-4 without Hammer? I understand the reasoning, but I don't think these inputs/outputs are the solution here. Instead, you could simply inject...
by L'In20Cible
Fri Apr 15, 2022 9:35 am
Forum: Plugin Development Support
Topic: [Cs:s] Hook remaining time of the map
Replies: 7
Views: 6608

Re: [Cs:s] Hook remaining time of the map

You don't necessarily need a signature for that: from cvars import ConVar from engines.gamerules import find_game_rules from engines.server import global_vars mp_timelimit = ConVar('mp_timelimit') def get_map_remaining_time(): """Returns the remaining time for ...
by L'In20Cible
Tue Dec 28, 2021 8:24 am
Forum: Plugin Development Support
Topic: ClientCommand working for +lookatweapon but not +jump?
Replies: 2
Views: 2404

Re: ClientCommand working for +lookatweapon but not +jump?

Why does this happen, and is there a way around it? Commands that are solely flagged as CLIENTDLL are for the most part not networked from client → server. This is the case for movements and impulses; they are combined using bitwise operators and networked as a single integer once per frame rather ...
by L'In20Cible
Tue Dec 21, 2021 1:50 pm
Forum: Custom Packages
Topic: EasyPlayer
Replies: 15
Views: 34273

Re: EasyPlayer

I've chosen not to implement caching as I believe one should be using PlayerDictionary anyways, and subclassing to enable caching should be trivial. Technically they could also pass caching=True on construction to get the instance from the cache. Not declaring it in the class (or its __init__ signa...
by L'In20Cible
Mon Dec 20, 2021 9:15 am
Forum: Custom Packages
Topic: EasyPlayer
Replies: 15
Views: 34273

Re: EasyPlayer

Why should I use caching though? Isn't that what PlayerDictionary is for? To an extent, yes. Assuming scripters using your library only query instances from a dictionary. Telling your class to uses caching makes sure all the following is True : from players.entity import Player from players.diction...
by L'In20Cible
Mon Dec 20, 2021 5:22 am
Forum: Custom Packages
Topic: EasyPlayer
Replies: 15
Views: 34273

Re: EasyPlayer

Nice! Here are some stuff I noticed after a quick hovering: ⋅ Your Player class won't use caching unless you explicitly tell it to do so: class Player(SourcePythonPlayer): """A player entity class with additional functionality. Takes full advantage of the `Effect` cl...
by L'In20Cible
Mon Dec 20, 2021 5:07 am
Forum: Plugin Development Support
Topic: Is it possible to use the newer style radio menus?
Replies: 2
Views: 2443

Re: Is it possible to use the newer style radio menus?

Very unlikely. That menu is probably client-side and all the server receives are the radio commands upon selection. I vaguely remember CS:GO didn't even offer the old ShowMenu at first when it was released and was added later on due to community demands.
by L'In20Cible
Mon Dec 20, 2021 5:05 am
Forum: Plugin Requests
Topic: Snowfall for Black Mesa
Replies: 29
Views: 21495

Re: Snowfall for Black Mesa

It will only work on small maps that don't already have a lot of particles. For example, on CS:S it will work on maps such as cs_assault but won't on maps such as de_dust2 (larger, with lot of dust particles builtins, etc.).
by L'In20Cible
Mon Dec 13, 2021 9:44 pm
Forum: Plugin Development Support
Topic: When to create and cache a TempEntity?
Replies: 4
Views: 3480

Re: When to create and cache a TempEntity?

And I can reuse this throughout the plugin's entire lifetime? Just making sure :grin: Yes. The engine uses a global instance and set all values every times it sends one, but the TempEntity class was designed with isolation in mind and make a copy of the global instance so that each instances have t...
by L'In20Cible
Mon Dec 13, 2021 9:13 pm
Forum: Plugin Development Support
Topic: When to create and cache a TempEntity?
Replies: 4
Views: 3480

Re: When to create and cache a TempEntity?

Taking your example here you could preset all the following because it doesn't change: model = Model('sprites/laserbeam.vmt') te = TempEntity('BeamRingPoint') te.start_radius = 40 te.end_radius = 60 te.frame_rate = 100 te.life_time = 1 te.start_width = 10 te.end_width...
by L'In20Cible
Fri Dec 10, 2021 7:26 am
Forum: API Design
Topic: Improving LangStrings and TranslationStrings to be less restrictive
Replies: 9
Views: 15660

Re: Improving LangStrings and TranslationStrings to be less restrictive

If you absolutely want to define the string in your code then yes, you will need either a subclass or a function like you currently have otherwise tokens will be using the default language for every missing ones. Though, your function could be simplified to something like this (untested): def tokeni...
by L'In20Cible
Thu Dec 09, 2021 9:21 pm
Forum: API Design
Topic: Improving LangStrings and TranslationStrings to be less restrictive
Replies: 9
Views: 15660

Re: Improving LangStrings and TranslationStrings to be less restrictive

Is this possible without my custom function? """ [food name] en=Pizza fr=Pizza (fr) [favorite food] en=My favourite food is {food_name} but I also like {other_food} fr=Mon repas préféré est {food_name} mais j'aime aussi les {other_food} [other food] en=Apples fr=Pommes &q...

Go to advanced search