Search found 1233 matches
- Wed Mar 22, 2023 3:15 am
- Forum: Plugin Development Support
- Topic: [CS:GO] GetBoneTransform
- Replies: 4
- Views: 154
Re: [CS:GO] GetBoneTransform
(i tried 207 to 211 and then stopped). You stopped too early! I believe it's 214 on Windows and 215 on Linux. EDIT: Yup, it looks right. from core import PLATFORM from core.cache import cached_property from entities.entity import Entity from memory import Convention from memory import DataType from...
- Tue Mar 21, 2023 8:36 pm
- Forum: Plugin Development Support
- Topic: [CS:GO] GetBoneTransform
- Replies: 4
- Views: 154
Re: [CS:GO] GetBoneTransform
Easiest way would probably be to test increment the offset until you get results that make sense.cobana wrote:So my first guess is, that my code does not work because i got the wrong offset. How would one find the correct offset?
- Tue Mar 21, 2023 7:06 pm
- Forum: Plugin Development Support
- Topic: [Cs:s] SpawnPoints
- Replies: 7
- Views: 196
Re: [Cs:s] SpawnPoints
Didn't think of use ConfigFile, does it create de_dust2.txt automatically or do i need to create de_dust2.txt manually? It should simply return an empty list if the file is missing but, it will currently produce an error because I forgot to import CFG_PATH . For now, you can just catch NameError to...
- Tue Mar 21, 2023 7:03 pm
- Forum: Plugin Development Support
- Topic: [Cs:s] SpawnPoints
- Replies: 7
- Views: 196
Re: [Cs:s] SpawnPoints
How i can use ConfigFile to separate spawn points for terrorist and counter-terrorist? While a bit repetitive, you could define the classname as first argument. For example: from core import ConfigFile from engines.server import global_vars from mathlib import Vector from path import Path for spawn...
- Tue Mar 21, 2023 6:12 pm
- Forum: Plugin Development Support
- Topic: [Cs:s] SpawnPoints
- Replies: 7
- Views: 196
Re: [Cs:s] SpawnPoints
[maps] [[de_dust2]] [[1]] tx = "0" ty = "0" tz = "0" Nested sections must match their brackets. In that file, 1 is under maps , not under maps[de_dust2] . That said, the maps section itself is rather redundant. EDIT: What about ConfigFile instead? from core import Conf...
- Sun Mar 19, 2023 4:45 am
- Forum: Plugin Development Support
- Topic: [CS:S] how to create a buyzone
- Replies: 8
- Views: 239
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 *...
- Sat Mar 18, 2023 4:22 pm
- Forum: Plugin Development Support
- Topic: [CS:S] how to create a buyzone
- Replies: 8
- Views: 239
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 ...
- Sat Mar 18, 2023 3:39 pm
- Forum: Plugin Development Support
- Topic: [CS:S] how to create a buyzone
- Replies: 8
- Views: 239
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...
- Sat Mar 18, 2023 2:37 pm
- Forum: Plugin Development Support
- Topic: [CS:S] how to create a buyzone
- Replies: 8
- Views: 239
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...
- Thu Mar 16, 2023 8:09 am
- Forum: Plugin Development Support
- Topic: [Cs:s] Players Chat
- Replies: 3
- Views: 207
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...
- Wed Mar 15, 2023 10:05 am
- Forum: Plugin Development Support
- Topic: [Cs:s] Players Chat
- Replies: 3
- Views: 207
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...
- Thu Jan 12, 2023 3:43 pm
- Forum: General Discussion
- Topic: bug last source-pytho sp-emulator
- Replies: 5
- Views: 556
- Mon Dec 05, 2022 7:10 pm
- Forum: Plugin Development Support
- Topic: [CS:S] how to set team score properly?
- Replies: 3
- Views: 573
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....
- Sun Nov 27, 2022 9:43 pm
- Forum: Plugin Development Support
- Topic: [CS:S] how to change player model pose/animation?
- Replies: 2
- Views: 548
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...
- Sun Nov 06, 2022 11:21 am
- Forum: Plugin Development Support
- Topic: [Cs:s] How to hook weapon reload
- Replies: 2
- Views: 1012
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...
- Sun Oct 16, 2022 4:30 am
- Forum: Plugin Development Support
- Topic: [Cs:s] How to block kill command in console
- Replies: 3
- Views: 935
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...
- Fri Sep 23, 2022 2:37 am
- Forum: Plugin Development Support
- Topic: TF2 Event Win Reasons
- Replies: 4
- Views: 862
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.
- Fri Sep 23, 2022 1:34 am
- Forum: Plugin Development Support
- Topic: TF2 Event Win Reasons
- Replies: 4
- Views: 862
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 ...
- Sun Sep 18, 2022 6:48 am
- Forum: Custom Packages
- Topic: Enki
- Replies: 3
- Views: 2269
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...
- Sun Sep 18, 2022 6:37 am
- Forum: Plugin Development Support
- Topic: trace ray
- Replies: 4
- Views: 1117
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...