Search found 40 matches

by battleweaver
Tue May 22, 2018 4:52 pm
Forum: Plugin Development Support
Topic: [CSGO] automatically close MOTD
Replies: 1
Views: 98

[CSGO] automatically close MOTD

Hi, is there any way to close vgui menu automatically? JS window.close() does not seem to work here.
by battleweaver
Mon May 14, 2018 12:44 pm
Forum: Plugin Development Support
Topic: Restart match. Interaction with websockets.
Replies: 1
Views: 83

Restart match. Interaction with websockets.

Hi, guys! My goal is restarting a match/round with certain parameters automatically. The command is to be given somewhere outside my server. I tried websocket communication through lomond library. import json from filters.players import PlayerIter from lomond import WebSocket # pip install lomond fr...
by battleweaver
Tue Apr 24, 2018 4:16 am
Forum: Plugin Development Support
Topic: [CS:GO] Prevent team switch event
Replies: 3
Views: 137

Re: [CS:GO] Prevent team switch event

The snippet intends to show that I could not prevent the event of team switching.
Do you suggest filtering "teammenu" through ClientCommandFilter?
by battleweaver
Mon Apr 23, 2018 11:09 am
Forum: Plugin Development Support
Topic: [CS:GO] Prevent team switch event
Replies: 3
Views: 137

[CS:GO] Prevent team switch event

from events.hooks import PreEvent, EventAction from messages import SayText2 from players._base import Player from players.helpers import index_from_userid @PreEvent('player_team') def on_player_team(event): player = Player(index_from_userid(event['userid']&#...
by battleweaver
Thu Apr 12, 2018 12:32 pm
Forum: Plugin Development Support
Topic: Spinning an object
Replies: 3
Views: 138

Re: Spinning an object

Thank you for help. Here is my version. from engines.precache import Model from entities._base import Entity from events import Event from mathlib import Vector, QAngle from players._base import Player from entities.constants import SolidType class Skin(): def __init__(self): self.al...
by battleweaver
Wed Apr 11, 2018 12:40 pm
Forum: Plugin Development Support
Topic: Spinning an object
Replies: 3
Views: 138

Spinning an object

CS:GO I try to spin an object around Y axis. I did not figure out how to spin an entity after spawning using SourcePython commands, so my approach was to activate a spinning animation of a model. My thought was to use entity.call_input(). from engines.precache import Model from entities._base import...
by battleweaver
Wed Mar 14, 2018 6:48 am
Forum: Plugin Development Support
Topic: [PROBLEM] Building Source.Python
Replies: 5
Views: 280

Re: [PROBLEM] Building Source.Python

Why didn't it help? I've installed gcc-4.8 on ubuntu 16.04 : apt install -y gcc-4.8 cmake g++-multilib git But I got exactly the same error: CMakeFiles/core.dir/build.make:422: recipe for target 'CMakeFiles/core.dir/core/modules/commands/commands_client.cpp.o' failed make[2]: *** [CMakeFiles/core.d...
by battleweaver
Tue Mar 13, 2018 8:36 am
Forum: Plugin Development Support
Topic: [PROBLEM] Building Source.Python
Replies: 5
Views: 280

Re: [PROBLEM] Building Source.Python

I've tried to do what you said, but it didn't help. But I have another idea: add Sourse.Python as submodule in my repo, download last success build (core.so and source-python.so) from here: http://builds.sourcepython.com/job/Source.Python%20-%20Building/game=csgo,label=master/lastSuccessfulBuild/art...
by battleweaver
Mon Mar 12, 2018 3:23 pm
Forum: Plugin Development Support
Topic: [PROBLEM] Building Source.Python
Replies: 5
Views: 280

[PROBLEM] Building Source.Python

Hi, everyone! I'm trying to build Docker image with CS:GO server and pre installed Source.Python. I did't find any ways how to download the latest version of the compiled library, so I decided to build it myself. But I getting an error: CMakeFiles/core.dir/build.make:422: recipe for target 'CMakeFil...
by battleweaver
Tue Jan 23, 2018 6:05 pm
Forum: Plugin Development Support
Topic: Players movementspeed
Replies: 7
Views: 478

Re: Players movementspeed

I believe you are incorrect about both of these cvars. First, sv_accelerate will affect how fast you will accelerate while walking. This wont affect max speed, only make you achieve that max speed faster or slower after you start moving. Second, sv_maxspeed is not your base speed, and is not determ...
by battleweaver
Tue Jan 16, 2018 1:16 pm
Forum: Plugin Development Support
Topic: Players movementspeed
Replies: 7
Views: 478

Re: Players movementspeed

Would like to add some info. First of all: I talk about CS:GO. There are 2 variables that control speed. If I am correct, the way offered above works with 'sv_accelerate', which is multiplier to your base speed Console variable 'sv_maxspeed' - base speed, which is determined, for example, by weapon ...
by battleweaver
Mon Jan 15, 2018 8:34 am
Forum: Plugin Development Support
Topic: TypedSayCommand after unloading/loading plugin
Replies: 6
Views: 401

Re: TypedSayCommand after unloading/loading plugin

The point is: the error happends only on my client side, while my neighbour's client connects to server and does not experience such error. Something tells me, it is too early to say that it's Sourcepython problem. sp info Date : 2018-01-15 08:33:24.382118 OS : Linux-4.4.0-109-generic-x86_64-with-de...
by battleweaver
Fri Jan 12, 2018 8:54 am
Forum: Plugin Development Support
Topic: TypedSayCommand after unloading/loading plugin
Replies: 6
Views: 401

Re: TypedSayCommand after unloading/loading plugin

I am sory for this post.
I did not describe the problem correctly and i am not sure, that I am going to do this in near future.
Could you delete post?
by battleweaver
Thu Jan 11, 2018 12:07 pm
Forum: Plugin Development Support
Topic: TypedSayCommand after unloading/loading plugin
Replies: 6
Views: 401

TypedSayCommand after unloading/loading plugin

Hello everyone! I have, say, test.py. Skipping imports, the code is: @TypedSayCommand('!myteam') def cmd_on_myteam(command_info): print('Showing team') player = Player(command_info.index) SayText2(f"Team is {player.team}").send(pl...
by battleweaver
Tue Dec 12, 2017 1:44 pm
Forum: Code examples / Cookbook
Topic: Stripping weapons
Replies: 45
Views: 11585

Re: Stripping weapons

Hello everybody! I am puzzled a little This code works fine @TypedSayCommand('!strip') def cmd_on_strip(command_info): player = Player(command_info.index) weapon = Weapon((player.primary).index) # TODO: BaseEntity would be enough here? player.drop_weap...
by battleweaver
Wed Dec 06, 2017 10:36 am
Forum: Plugin Development Support
Topic: Way to reverse the spawn?
Replies: 11
Views: 805

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/c89f0ba...
by battleweaver
Wed Dec 06, 2017 7:50 am
Forum: Plugin Development Support
Topic: Way to reverse the spawn?
Replies: 11
Views: 805

Re: Way to reverse the spawn?

I swapped stack[0] and stack[1] in iPlayer's code and it works fine. def pre_start_touch(stack): print(f'----------------------------------') entity = make_object(Entity, stack[1]) print (f"{entity.index} touched something") if not entity.is_player&#...
by battleweaver
Tue Dec 05, 2017 1:06 pm
Forum: Plugin Development Support
Topic: Way to reverse the spawn?
Replies: 11
Views: 805

Re: Way to reverse the spawn?

@EntityPreHook(EntityCondition.equals_entity_classname(*weapon_index.keys()), 'start_touch') def pre_start_touch(stack): print(f'----------------------------------') entity = make_object(Entity, stack[0]) print (f"{entity.inde...
by battleweaver
Fri Dec 01, 2017 8:15 pm
Forum: Plugin Development Support
Topic: Kick menu->reason: other->text input
Replies: 11
Views: 1383

Re: Kick menu->reason: other->text input

Checked new build. Now the message appears in popup window. Thank you!
by battleweaver
Fri Dec 01, 2017 5:16 pm
Forum: Plugin Development Support
Topic: Way to reverse the spawn?
Replies: 11
Views: 805

Re: Way to reverse the spawn?

So how to de-spawn a weapon? I don't know what you're trying to do there, but if you really need, you can teleport the weapon outside of the playable area. Or make it non-solid and prevent it from being transmitted to clients. Just don't teleport it inside of touch-related hooks. They don't like it...

Go to advanced search