Search found 1228 matches

by L'In20Cible
Sun Mar 19, 2023 4:45 am
Forum: Plugin Development Support
Topic: [CS:S] how to create a buyzone
Replies: 8
Views: 168

Re: [CS:S] how to create a buyzone

I don't understand why I can set a bsp file as model, but it works, though. The map is technically a brush model as can be seen in the model table: from stringtables import string_tables for string in string_tables.modelprecache: print(string) """ maps/de_dust2.bsp *1 *2 *3 *...
by L'In20Cible
Sat Mar 18, 2023 4:22 pm
Forum: Plugin Development Support
Topic: [CS:S] how to create a buyzone
Replies: 8
Views: 168

Re: [CS:S] how to create a buyzone

Do you know whether these existing brushes can be resized or do I have to deal with their current size? As well as cloning them would be an option. You can scale them with the mins/maxs. But they keep the same shape. For example, a brush could look like this: https://i.imgur.com/kM0V5lr.png Or any ...
by L'In20Cible
Sat Mar 18, 2023 3:39 pm
Forum: Plugin Development Support
Topic: [CS:S] how to create a buyzone
Replies: 8
Views: 168

Re: [CS:S] how to create a buyzone

Regarding the "brush" entities: Do you mean by having a brush model that I first have to create a brush entity and link the buy_zone to it? Have already looked on how the Hammer editor is creating the buy_zones but couldn't figure it out on how to do chat programmatically. You can't reall...
by L'In20Cible
Sat Mar 18, 2023 2:37 pm
Forum: Plugin Development Support
Topic: [CS:S] how to create a buyzone
Replies: 8
Views: 168

Re: [CS:S] how to create a buyzone

On CS:S, buy-zones are "brush" entities. Therefore, they require a brush model. It's possible to create them, but it really doesn't worth the effort. The easiest way is to just tell the clients they are in a buy-zone using a post_think hook. For example, the following allows players to buy...
by L'In20Cible
Thu Mar 16, 2023 8:09 am
Forum: Plugin Development Support
Topic: [Cs:s] Players Chat
Replies: 3
Views: 170

Re: [Cs:s] Players Chat

Is there anything else that can improve of the SayFilter code? A lot could be said about your current code, but I won't expand upon it because I don't think a SayFilter is appropriate for the purpose of adding titles to players. I would rather recommend you use a SayText2 hook and override the form...
by L'In20Cible
Wed Mar 15, 2023 10:05 am
Forum: Plugin Development Support
Topic: [Cs:s] Players Chat
Replies: 3
Views: 170

Re: [Cs:s] Players Chat

Into the following line: return ratinghandler.modified_chat(name, rpglib.getTeam(userid), stattrack.get_player_rating(userid), command[0] + ' ' + args, text) This: command[0] + ' ' + args Should be: command.command_string The engine's tokenizer does not work w...
by L'In20Cible
Mon Dec 05, 2022 7:10 pm
Forum: Plugin Development Support
Topic: [CS:S] how to set team score properly?
Replies: 3
Views: 544

Re: [CS:S] how to set team score properly?

The scores themselves are stored into the game rules, not the team managers. The later are only used as reflection for client-side scoreboard. The easiest way, without using hard-coded offsets, would be to use a game_score entity: from entities.dictionary import SyncedEntityDictionary from entities....
by L'In20Cible
Sun Nov 27, 2022 9:43 pm
Forum: Plugin Development Support
Topic: [CS:S] how to change player model pose/animation?
Replies: 2
Views: 525

Re: [CS:S] how to change player model pose/animation?

I have looked into sourcemod stuff but do not quite understand them to have a solution for Source.Python. There are parameters like m_flPoseParameter which should be able to control a model and move it ( see alliedmods.net ) so there is maybe something to change the model arms position. → https://f...
by L'In20Cible
Sun Nov 06, 2022 11:21 am
Forum: Plugin Development Support
Topic: [Cs:s] How to hook weapon reload
Replies: 2
Views: 990

Re: [Cs:s] How to hook weapon reload

The first problem is that you are effectively hooking CBaseCombatCharacter::RemovePlayerItem because your hook targets players, not weapons. To target weapons, you would have to change your condition to: lambda entity: entity.is_weapon() However, Reload is virtual and each weapon entity impl...
by L'In20Cible
Sun Oct 16, 2022 4:30 am
Forum: Plugin Development Support
Topic: [Cs:s] How to block kill command in console
Replies: 3
Views: 913

Re: [Cs:s] How to block kill command in console

kill is technically a server command, not a client one. Using ServerCommand should work. However, you cannot access the index of the player issuing it because GetCommandIndex don't seem to be currently exported to Python. EDIT: GetCommandIndex has been exported as commands.get_command_index into 34...
by L'In20Cible
Fri Sep 23, 2022 2:37 am
Forum: Plugin Development Support
Topic: TF2 Event Win Reasons
Replies: 4
Views: 841

Re: TF2 Event Win Reasons

You can find the enumeration declaration in the SDK. However, I'm not sure how up-to-date it is, nor if it is complete. The translations files usually have the whole list that allows you to compare the index with the message, etc.
by L'In20Cible
Fri Sep 23, 2022 1:34 am
Forum: Plugin Development Support
Topic: TF2 Event Win Reasons
Replies: 4
Views: 841

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: 2203

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: 1087

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: 1649

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: 1649

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: 1044

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: 1267

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.

Go to advanced search