Search found 793 matches

by L'In20Cible
Sun Dec 17, 2017 1:27 am
Forum: Plugin Development Support
Topic: Crash when spawning entities from OnLevelInit
Replies: 2
Views: 395

Re: Crash when spawning entities from OnLevelInit

OnLevelInit probably fires too early, try OnServerActivate instead.
by L'In20Cible
Fri Dec 08, 2017 6:05 pm
Forum: Whatever
Topic: Free games!!
Replies: 34
Views: 5929

Re: Free games!!

Thank you! :smile:
by L'In20Cible
Wed Dec 06, 2017 9:20 am
Forum: Plugin Development Support
Topic: Way to reverse the spawn?
Replies: 11
Views: 1020

Re: Way to reverse the spawn?

I'm not entirely sure why you are not looking into Player.bump_weapon like previously suggested? It might proves to be more efficient because you already know 0 will be a player and 1 will be a weapon... There is an example there: https://github.com/Source-Python-Dev-Team/Source.Python/blob/c89f0bac...
by L'In20Cible
Wed Dec 06, 2017 5:37 am
Forum: Plugin Development Support
Topic: Can't set user_cmd.view_angles in a OnPlayerRunCommand listener
Replies: 16
Views: 1466

Re: Can't set user_cmd.view_angles in a OnPlayerRunCommand listener

Well, you can see in his code that he is also hooking the Teleport method to ensure that only his calls are passed to the engine: https://github.com/peace-maker/botmimic ... #L701-L709
by L'In20Cible
Wed Dec 06, 2017 5:07 am
Forum: Plugin Development Support
Topic: Can't set user_cmd.view_angles in a OnPlayerRunCommand listener
Replies: 16
Views: 1466

Re: Can't set user_cmd.view_angles in a OnPlayerRunCommand listener

Did you try player.teleport(angles=your_angles) or simply player.set_view_angles(your_angles)?
by L'In20Cible
Wed Dec 06, 2017 4:51 am
Forum: Plugin Development Support
Topic: Can't set user_cmd.view_angles in a OnPlayerRunCommand listener
Replies: 16
Views: 1466

Re: Can't set user_cmd.view_angles in a OnPlayerRunCommand listener

It probably crashes because the BotCmd is not initialized. Does calling bot_cmd.reset() prior to setting the view_angles also crashes? If so, it might be the structures that is outdated for that engine.
by L'In20Cible
Wed Dec 06, 2017 2:12 am
Forum: Plugin Development Support
Topic: Can't set user_cmd.view_angles in a OnPlayerRunCommand listener
Replies: 16
Views: 1466

Re: Can't set user_cmd.view_angles in a OnPlayerRunCommand listener

The difference between UserCmd and BotCmd should not matter here because they are used for different functions. OnPlayerRunCommand is correct to returns a UserCmd even for bots because this is what the original hooked method is called with. You could try any of the following, I guess: from players.b...
by L'In20Cible
Tue Dec 05, 2017 11:07 am
Forum: Plugin Development Support
Topic: Can't set user_cmd.view_angles in a OnPlayerRunCommand listener
Replies: 16
Views: 1466

Re: Can't set user_cmd.view_angles in a OnPlayerRunCommand listener

Syntax: Select all

player.angles = Vector(my_val_x, my_val_y, 0.0)
Doesn't works?
by L'In20Cible
Mon Dec 04, 2017 2:44 am
Forum: Code examples / Cookbook
Topic: Stripping weapons
Replies: 45
Views: 12411

Re: Stripping weapons

You should probably call drop_weapon() prior remove() tho so the weapons are no longer mapped in the m_hMyWeapons array for that player. Doesn't matter for Source.Python because we ensure the handles are valid, but other plugins might not and attempt to manipulate them.
by L'In20Cible
Sun Dec 03, 2017 5:29 am
Forum: Plugin Releases
Topic: Parachute v0.03!
Replies: 42
Views: 7886

Re: Parachute v0.03!

I've just updated to v0.03 which adds the delay workaround. I recommend it over the code I posted above because it use Player.delay which will ensure the delay is tracked and cancelled if needed (should not matters, but just to be safe ;)).
by L'In20Cible
Sun Dec 03, 2017 5:10 am
Forum: Plugin Releases
Topic: Parachute v0.03!
Replies: 42
Views: 7886

Re: Parachute v0.02!

If you see error models, that means your client didn't download the models. This can be caused by the server being unable to push the files because it doesn't have the correct permissions for the models/materials folders and cannot generate the ztmp files. This can also be caused by your client igno...
by L'In20Cible
Sun Dec 03, 2017 4:09 am
Forum: Plugin Releases
Topic: Parachute v0.03!
Replies: 42
Views: 7886

Re: Parachute v0.02!

The following should do it, I guess: # ../addons/source-python/plugins/parachute/parachute.py # ============================================================================ # >> IMPORTS # ============================================================================ # Python Imports # Math from math i...
by L'In20Cible
Sun Dec 03, 2017 2:45 am
Forum: Plugin Releases
Topic: Parachute v0.03!
Replies: 42
Views: 7886

Re: Parachute v0.02!

EDIT: Actually, this is probably because set_parent and call_input are both dynamically calling a function which is most likely related to issue #157.
by L'In20Cible
Sun Dec 03, 2017 1:54 am
Forum: Plugin Releases
Topic: Parachute v0.03!
Replies: 42
Views: 7886

Re: Parachute v0.02!

Hmm. What if you move it after the spawn() call?
by L'In20Cible
Sun Dec 03, 2017 1:24 am
Forum: Plugin Releases
Topic: Parachute v0.03!
Replies: 42
Views: 7886

Re: Parachute v0.02!

Interesting. Does the Entity.set_parent call itself crash on Linux, or only when you parent to a carried weapon? Does the following also crashes?

Syntax: Select all

parachute.call_input('SetParent', '!activator', activator=weapon)
by L'In20Cible
Sat Dec 02, 2017 9:33 am
Forum: Plugin Development Support
Topic: Push a player to a given point
Replies: 5
Views: 677

Re: Push a player to a given point

I would rather recommend using Player.base_velocity which applies the given Vector and doesn't requires a dynamic call.
by L'In20Cible
Fri Dec 01, 2017 2:38 am
Forum: Plugin Development Support
Topic: How to use PlayerAnimation.RELOAD?
Replies: 22
Views: 2194

Re: How to use PlayerAnimation.RELOAD?

Why not simply hook CBaseCombatCharacter::RemoveAmmo and always block its execution?
by L'In20Cible
Fri Nov 24, 2017 6:59 pm
Forum: Whatever
Topic: Free games!!
Replies: 34
Views: 5929

Re: Free games!!


Go to advanced search