Search found 799 matches

by L'In20Cible
Fri Sep 14, 2018 12:03 am
Forum: Plugin Development Support
Topic: Encoding problem with configs
Replies: 5
Views: 127

Re: Encoding problem with configs

Yes, this is what I meant. Did you test? I'm pretty sure this is the cause of the issue.
by L'In20Cible
Thu Sep 13, 2018 9:56 am
Forum: Plugin Development Support
Topic: Encoding problem with configs
Replies: 5
Views: 127

Re: Encoding problem with configs

I cannot test right now but I guess this is caused by the default value translation and that lines 266 , 332 and 388 of the file ../config/manager.py should pass encoding='utf8' to the open() calls. Ideally add an encoding property to the class itself instead of hard-coding an encoding for consisten...
by L'In20Cible
Tue Sep 04, 2018 4:27 pm
Forum: Plugin Development Support
Topic: TF2 - Getting weapon names from event byte
Replies: 10
Views: 167

Re: TF2 - Getting weapon names from event byte

I suppose that works. I would've liked to see that be a bit more dynamic than that but if that's what sourcemod is doing then thats prob fine. Is there a clean namespace we could use to integrate this directly into the SourcePython? Theres a handful of other TF2 related data that would be helpful t...
by L'In20Cible
Tue Sep 04, 2018 1:08 am
Forum: Plugin Development Support
Topic: TF2 - Getting weapon names from event byte
Replies: 10
Views: 167

Re: TF2 - Getting weapon names from event byte

Seems like this is the enumerated type (untested): # ============================================================================ # >> IMPORTS # ============================================================================ # Python from enum import IntEnum # Source.Python Imports from events import E...
by L'In20Cible
Tue Sep 04, 2018 12:37 am
Forum: Plugin Development Support
Topic: Clan Tag in CS:GO
Replies: 2
Views: 97

Re: Clan Tag in CS:GO

Seems like the offsets are outdated. Just did extract them from the up-to-date binaries and they are now 2548h on Windows and 2560h on Linux. I updated them on GitHub but haven't tested so let me know if that did the trick for you.
by L'In20Cible
Mon Sep 03, 2018 2:30 pm
Forum: Plugin Development Support
Topic: TF2 - Getting weapon names from event byte
Replies: 10
Views: 167

Re: TF2 - Getting weapon names from event byte

The byte is probably the index of the entity:

Syntax: Select all

weapon = Weapon(ev['weapon'])
by L'In20Cible
Sun Aug 19, 2018 2:09 am
Forum: Plugin Development Support
Topic: Weapons
Replies: 2
Views: 483

Re: Weapons

satoon101 wrote:I think there is also a client command you can call in your plugin which will change their weapon based on the weapon string, but I don't remember it off hand.

If I remember correctly, that would be the following command:

Syntax: Select all

player.client_command('use weapon_knife', server_side=True)
by L'In20Cible
Fri Aug 17, 2018 6:06 am
Forum: Plugin Development Support
Topic: box
Replies: 17
Views: 693

Re: Bounding box

When it comes to the model, isn't it irrelevant what the model itself is? The trigger_multiple is a brush entity, so the model shouldn't matter, right? I'm not 100% sure on this, which is why I took your advice and changed it to use the player model. It is more than important. The model is the shap...
by L'In20Cible
Thu Aug 16, 2018 11:23 pm
Forum: Plugin Development Support
Topic: box
Replies: 17
Views: 693

Re: Bounding box

Nice! I have a few points though. First of all, the model: TRIGGER_MODEL = Model('models/props/cs_assault/money.mdl') I don't think using a random model is a good idea because depending of the angles it will parent, you may end with the parented trigger being slightly off the player....
by L'In20Cible
Wed Aug 15, 2018 11:21 pm
Forum: Plugin Development Support
Topic: Changing entity move collide
Replies: 3
Views: 152

Re: Changing entity move collide

velocity wrote:Server crash when I try to do Entity(index).get_property_int('m_MoveCollide').

Complete code? It is unlikely to crash cause of that line, so the crash must be somewhere else.
by L'In20Cible
Wed Aug 15, 2018 7:11 pm
Forum: Plugin Development Support
Topic: Changing entity move collide
Replies: 3
Views: 152

Re: Changing entity move collide

Run the following command:

Code: Select all

sp dump server_classes classes;sp dump datamaps datamaps

Then check the classes.txt and datamaps.txt files generated into the ../logs/source-python directory. A little hint, MoveCollide is an Enum so their values are integer.
by L'In20Cible
Mon Aug 13, 2018 3:03 pm
Forum: Plugin Development Support
Topic: Check if entity exists
Replies: 2
Views: 272

Re: Check if entity exists

You should not store Entity instances unless you use a container designed to keep them up-to-date such as EntityDictionary . To validate whether or not an instance is still valid, you would have to loop through all existing entities and compare their address which can get quite slow if you validate ...
by L'In20Cible
Sun Aug 12, 2018 3:57 pm
Forum: Plugin Development Support
Topic: Changing entity collision group?
Replies: 6
Views: 330

Re: Changing entity collision group?

Entity inherits from BaseEntity: _base.py#L73. So yes, everything available in BaseEntity is available for Entity but not the other way around (see Entity as being an extended version of BaseEntity).
by L'In20Cible
Sun Aug 12, 2018 3:39 pm
Forum: Plugin Development Support
Topic: Changing entity collision group?
Replies: 6
Views: 330

Re: Changing entity collision group?

This is not a float. That being said, that property is aliased: CBaseEntity.ini#L76

Syntax: Select all

Entity(index).collision_group
by L'In20Cible
Sat Aug 04, 2018 1:50 am
Forum: Plugin Development Support
Topic: How to use PlayerDictionary?
Replies: 2
Views: 134

Re: How to use PlayerDictionary?

You don't have to clear the dictionary yourself. As soon as the player entities are deleted, they are removed from the dictionary and all entities are freed on new map.
by L'In20Cible
Fri Aug 03, 2018 2:48 am
Forum: Plugin Development Support
Topic: hooking "prethink" only runs when ducking [TF2]
Replies: 7
Views: 360

Re: hooking "prethink" only runs when ducking [TF2]

The offsets are outdated it seems. Should be 337 and 336: https://github.com/Source-Python-Dev-Team/Source.Python/blob/58cda0e4eb89ca8d9608e8cab1c64db34a971bdb/addons/source-python/data/source-python/entities/orangebox/tf/CBasePlayer.ini#L9-L12 Feel free to use this tool to update them and submit a ...
by L'In20Cible
Wed Jul 18, 2018 7:16 am
Forum: Plugin Development Support
Topic: Set "lastinv"
Replies: 2
Views: 177

Re: Set "lastinv"

by L'In20Cible
Tue Jul 10, 2018 11:48 pm
Forum: Plugin Development Support
Topic: Hooked 'end_touch' function crashes server when weapon is picked up
Replies: 4
Views: 234

Re: Hooked 'end_touch' function crashes server when weapon is picked up

I don't know if it has any negative impact on game logic. It can have some negative impact for some entities, depending of their parenting chain. What you want to do is add the following in your pre-hook callback so that it notice the parent that the touching have ended: # Get the parent of the ent...
by L'In20Cible
Thu Jul 05, 2018 10:21 pm
Forum: Plugin Development Support
Topic: Hooked 'end_touch' function crashes server when weapon is picked up
Replies: 4
Views: 234

Re: Hooked 'end_touch' function crashes server when weapon is picked up

The crash occurs because the end_touch method is calling itself for the parent of the this pointer. You need to block the original call and call the method for the parent yourself without invoking the hook. Here is an example for the "touch" method: https://forums.sourcepython.com/viewtopi...
by L'In20Cible
Thu Jun 14, 2018 3:34 am
Forum: Plugin Requests
Topic: [Hldms] Entity remover, to remove "doubles"
Replies: 5
Views: 530

Re: [Hldms] Entity remover, to remove "doubles"

You could try that: https://github.com/Ayuto/EventScripts-Emulator

Or you could post the ES codes you are using in the Plugin Requests section and someone might be able to convert them to SP.

Go to advanced search