Search found 43 matches

by battleweaver
Mon Jul 30, 2018 6:45 pm
Forum: Plugin Development Support
Topic: Csgo motd
Replies: 21
Views: 20404

Re: Csgo motd

decompile wrote:You must use -panorama in start parameter right? If so, theres no way to fix this issue with the panorama hud.

Code does not show vgui with and without "-panorama" argument.
by battleweaver
Mon Jul 30, 2018 1:28 pm
Forum: Plugin Development Support
Topic: Csgo motd
Replies: 21
Views: 20404

Re: Csgo motd

Hey, you should definitely read this thread because CS:GO is not showing a motd unless you use a workaround with javascript. Im not sure, but I think I heard something about the dead of CS:GO motd because the way they changed the motd in the recent patch. (You can only put a url in the motd file......
by battleweaver
Mon Jul 30, 2018 10:48 am
Forum: Plugin Development Support
Topic: Csgo motd
Replies: 21
Views: 20404

Re: Csgo motd

Guys, a new Valve patch happened. It broke this way of displaying vgui menu in CS:GO. Some code: from commands.typed import TypedSayCommand from filters.players import PlayerIter from messages import VGUIMenu from players.engines.csgo import Player def motd(player, title, site, show=True): n...
by battleweaver
Tue May 22, 2018 4:52 pm
Forum: Plugin Development Support
Topic: [CSGO] automatically close MOTD
Replies: 1
Views: 2395

[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: 2306

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: 8
Views: 10120

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: 8
Views: 10120

[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: 3515

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

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

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

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

[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: 6037

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

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

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

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

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

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

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

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&#...

Go to advanced search