Search found 783 matches

by L'In20Cible
Wed Jul 18, 2018 7:16 am
Forum: Plugin Development Support
Topic: Set "lastinv"
Replies: 2
Views: 41

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

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

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

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.
by L'In20Cible
Wed May 30, 2018 7:19 am
Forum: Plugin Development Support
Topic: No max function...?
Replies: 1
Views: 102

Re: No max function...?

You are redefining it on that line:

Syntax: Select all

max = 100 * attacker.getLevel()

Use a different name for your variable.
by L'In20Cible
Sat May 05, 2018 10:07 am
Forum: Plugin Development Support
Topic: how to catch the halftime
Replies: 5
Views: 226

Re: how to catch the halftime

You could always keep a count yourself I guess. Something like this maybe (untested): from cvars import ConVar from events import Event from listeners import OnLevelInit mp_maxrounds = ConVar('mp_maxrounds') rounds_played = int() @OnLevelInit def on_level_init(map_name...
by L'In20Cible
Sat May 05, 2018 3:51 am
Forum: Plugin Development Support
Topic: Remove Weapon on Disconnect
Replies: 3
Views: 172

Re: Remove Weapon on Disconnect

Kami wrote:Found a small typo I think.

Syntax: Select all

for weapon in player.weapons:
weapon.remove()


results in an TypeError.

It should be player.weapons() I think

Fixed, thanks!
by L'In20Cible
Fri May 04, 2018 7:16 am
Forum: Plugin Development Support
Topic: Remove Weapon on Disconnect
Replies: 3
Views: 172

Re: Remove Weapon on Disconnect

Not sure if the OnClientDisconnect listener is fired too late to iterate over his weapons but the following event should be fired early enough to do so (untested): from events import Event from players.entity import Player @Event('player_team') def player_team(game_event): if...
by L'In20Cible
Tue May 01, 2018 2:09 am
Forum: Plugin Development Support
Topic: How to get map info
Replies: 6
Views: 249

Re: How to get map info

You can also use the WORLD_ENTITY_INDEX constant, and the world_mins/world_maxs properties:

Syntax: Select all

from entities.constants import WORLD_ENTITY_INDEX
from entities.entity import Entity

world_entity = Entity(WORLD_ENTITY_INDEX)
mins = world_entity.world_mins
maxs = world_entity.world_maxs
by L'In20Cible
Tue Mar 27, 2018 1:30 am
Forum: Whatever
Topic: Free games!!
Replies: 34
Views: 5768

Re: Free games!!

by L'In20Cible
Wed Mar 21, 2018 10:44 pm
Forum: Plugin Development Support
Topic: EntityHook test_function not working?
Replies: 8
Views: 343

Re: EntityHook test_function not working?

I've tried implementing this solution however I am now getting errors thrown when picking up weapons. [SP] Caught an Exception: Traceback (most recent call last): File "..\addons\source-python\plugins\timer\core\zone.py", line 163, in pre_to uch parent.touch.call_trampoline(other) File &q...
by L'In20Cible
Wed Mar 21, 2018 5:24 am
Forum: Plugin Development Support
Topic: EntityHook test_function not working?
Replies: 8
Views: 343

Re: EntityHook test_function not working?

You will have to block the original call and reproduce what it does by calling the trampoline for their parents. I guess the workaround you are mentioning is the following: viewtopic.php?f=20&t=1447&p=9615#p9615
by L'In20Cible
Wed Mar 21, 2018 3:57 am
Forum: Plugin Development Support
Topic: EntityHook test_function not working?
Replies: 8
Views: 343

Re: EntityHook test_function not working?

This is not how it works. The test_function is only used to determine from which entity the method is retrieved and hooked from but filtering the calls is your responsibility. Just add a call to your test function into your callback and return the call if it fails.
by L'In20Cible
Sun Feb 18, 2018 11:10 am
Forum: Plugin Development Support
Topic: [CSS]Exception when reading ammo key value
Replies: 4
Views: 410

Re: [CSS]Exception when reading ammo key value

Some key values are hard-coded and are not returning true/false on success/failure which cause our internal check to fail for them. We removed the check for the setter method and should probably remove it for the getter method as well.

EDIT: Went ahead and removed that check.
by L'In20Cible
Tue Feb 13, 2018 5:45 pm
Forum: Plugin Development Support
Topic: Changing View Model
Replies: 6
Views: 512

Re: Changing View Model

Do it in a post_think hook.
by L'In20Cible
Thu Feb 08, 2018 3:01 am
Forum: Plugin Development Support
Topic: [CS GO] Make a prop copy an animation
Replies: 7
Views: 576

Re: [CS GO] Make a prop copy an animation

Is it possible to combine it without using entity.teleport and trying to choose teleport coordinates manually? That attachment is the "flashlight" origin. From a server-side plugin, you will need to move the weapon entity to the bone and parent it there because the rendered placement is h...
by L'In20Cible
Fri Feb 02, 2018 6:06 am
Forum: Plugin Development Support
Topic: gg_ffa_bots
Replies: 3
Views: 389

Re: gg_ffa_bots

I'm currently on the phone, but the symbol looks like stack_data[1] is an IGameEvent. Correct. If an argument was [1] using SPE, it will be [2] using SP because SPE added the this pointer at the end while SP insert it at the beginning. As for the signatures, you can check BotAttackControl on SM; I ...
by L'In20Cible
Tue Jan 30, 2018 4:59 pm
Forum: Plugin Development Support
Topic: Detonating grenades crashes CS:GO server
Replies: 4
Views: 347

Re: Detonating grenades crashes CS:GO server

Try 238, I think I forgot to take into consideration the fast-destructor inserted in the dispatch table. Either that or my server was outdated. If 238 doesn't works, just play with that offset until it does and I will test it out tonight unless someone else extracted the right one by then.
by L'In20Cible
Tue Jan 30, 2018 4:52 pm
Forum: Plugin Releases
Topic: Parachute v0.03!
Replies: 42
Views: 7696

Re: Parachute v0.03!

You are using a different version. Download this version: Parachute_v0.03.zip And change the code of ../parachute.py by the one I posted above . I won't be supporting the old models, even if I have permission from SWAT_88 to use/ship them, because they are not adapted by the new system of parenting ...

Go to advanced search