Search found 769 matches

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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: 32
Views: 3370

Re: Free games!!

by L'In20Cible
Thu Nov 23, 2017 9:43 pm
Forum: Plugin Development Support
Topic: Forcing a user cmd on a player at any time?
Replies: 3
Views: 190

Re: Forcing a user cmd on a player at any time?

You could also use the m_afButtonForced property. For example: player.set_property_int('m_afButtonForced', PlayerButtons.JUMP) Would force the player to jump. However, keep in mind that this property is not networked to clients so any button that requires client prediction won't work...
by L'In20Cible
Thu Nov 23, 2017 4:29 am
Forum: Plugin Development Support
Topic: Looping a Timed Task in Many Objects
Replies: 8
Views: 333

Re: Looping a Timed Task in Many Objects

iPlayer is correct. Using the output would be preferred, I remember some issues with hooking the virtual touch methods. Tho I think it was only post ones? Can't remember. As for inheriting from Entity, I think this would be the best approach. Simply because you can delegate their creation to an Enti...
by L'In20Cible
Wed Nov 22, 2017 11:25 pm
Forum: Plugin Development Support
Topic: Looping a Timed Task in Many Objects
Replies: 8
Views: 333

Re: Looping a Timed Task in Many Objects

Hey, welcome to the forums! First of all, please use the PYTHON syntax when posting python code as it makes it easier to read. As for your code, this is normal that it freeze because it creates an infinite recursion. Every time the draw_beams method is called, it creates a new Repeat instance and re...
by L'In20Cible
Tue Nov 21, 2017 11:20 pm
Forum: Plugin Development Support
Topic: server init
Replies: 32
Views: 945

Re: server init

what if i use these functions : def get_decal_index(path): engine_server.precache_decal(path,True) return string_tables['decalprecache'][path] def get_model_index(path): engine_server.precache_model(path,True) return string_tables['modelprecache'][pat...

Go to advanced search