Search found 159 matches

by Predz
Fri May 26, 2017 1:34 pm
Forum: General Discussion
Topic: [CSGO] Crash in run_command since update
Replies: 12
Views: 11662

Re: [CSGO] Crash in run_command since update

Not thanks to me, hehe.

Thanks to the sourcemod team for being so quick at updating their data files :P
by Predz
Tue May 16, 2017 4:11 pm
Forum: General Discussion
Topic: Spawned weapons do not function correctly.
Replies: 5
Views: 5416

Re: Spawned weapons do not function correctly.

Just a blind guess, but in CS:GO you might have to set item_definition_index to make the weapons work correctly. Yep, indeed that fixes it! For some reason they use this index to handle weapon sounds, and recoil patterns. It is quite funny to see a AK47 with an AWPs recoil tho xD Here are all the d...
by Predz
Tue May 16, 2017 2:27 pm
Forum: General Discussion
Topic: Spawned weapons do not function correctly.
Replies: 5
Views: 5416

Spawned weapons do not function correctly.

I have noticed in the recent update that spawning a weapon into the world will cause some crazy behaviour... All weapons sound like deagle shots, and they always have max ammo and no extended clips. They also are classed as knives according to the overlays :confused: This has confused me to every ex...
by Predz
Wed Apr 26, 2017 7:46 am
Forum: Plugin Development Support
Topic: Creating Player Hat
Replies: 4
Views: 4625

Re: Creating Player Hat

1. I believe by default all props that use the override tag will always be solid but you can still try using the "enable/disable_collision" inputs available for prop entities. As I can see you have tried to use the spawnflags for non-solid and I guess that is not working. 2. Use the attach...
by Predz
Tue Apr 25, 2017 7:36 am
Forum: Plugin Development Support
Topic: Is current date between 2 dates
Replies: 9
Views: 7401

Re: Is current date between 2 dates

How about something like this? def is_between(first, second, between): if not isinstance(between, datetime.datetime): raise TypeError('Argument between must be of type <datetime.datetime>.') ## ORDER THE DATES timestamps = [first.timestamp(), second.timestamp&...
by Predz
Tue Apr 18, 2017 2:18 pm
Forum: Plugin Development Support
Topic: Create own listener
Replies: 5
Views: 4864

Re: Create own listener

The __all__ attribute allows python to know what to define when trying to import from a module. Doing: from <module> import * Would import all things from the <module> but only define values which are named from inside the iterable. You can still do: from <module> import <object> The * is just a way...
by Predz
Mon Apr 10, 2017 10:40 pm
Forum: Custom Packages
Topic: MOTDPlayer v2
Replies: 5
Views: 38752

Re: MOTDPlayer v2

Does anybody know of a way to sensibly immitate uWSGI on a windows machine? If not looks like I am going to have to work with Ubuntu again :P
by Predz
Sat Mar 04, 2017 11:43 am
Forum: Plugin Development Support
Topic: Current Map
Replies: 2
Views: 2998

Re: Current Map

Syntax: Select all

from engines.server import global_vars

global_vars.map_name
by Predz
Sun Dec 25, 2016 3:11 pm
Forum: General Discussion
Topic: Merry Xmas!
Replies: 5
Views: 5652

Re: Merry Xmas!

Happy Christmas!
by Predz
Mon Nov 28, 2016 10:20 am
Forum: General Discussion
Topic: Solution for finding coef w of the least-squares solution. Why i get differ results?
Replies: 3
Views: 4246

Re: Solution for finding coef w of the least-squares solution. Why i get differ results?

This is what I have so far, pretty definite that my math is wrong though, so please dont use this until I come back from work and have some more time to check it. :) array_x = [-1, -0.85714286, -0.71428571, -0.57142857, -0.42857143, -0.28571429, -0.14285714, 0, 0.14285714, 0.28571429, 0.42857143, 0....
by Predz
Mon Nov 28, 2016 10:01 am
Forum: General Discussion
Topic: Solution for finding coef w of the least-squares solution. Why i get differ results?
Replies: 3
Views: 4246

Re: Solution for finding coef w of the least-squares solution. Why i get differ results?

Hey Sky. I have not covered linear regression in over 2 years, I will have a look into how to calculate the least squares coefficient again. If you are more fimiliar with it than I am then I would create the function yourself, rather than looking for a already existing function. You can see the math...
by Predz
Mon Nov 07, 2016 3:10 pm
Forum: Plugin Development Support
Topic: Nav mesh functions
Replies: 10
Views: 7793

Re: Nav mesh functions

Unsure whether this could at some point be included Source.Python :confused: If this ever get included to SP, it won't use the struct package to unpack the data but ideally use the classes/enumerators from the SDKs directly. Yep I fully agree that the implementation should be directly from the SDK....
by Predz
Sun Nov 06, 2016 3:13 pm
Forum: Plugin Requests
Topic: [HL2:DM] Conquest Mod
Replies: 11
Views: 9758

Re: [HL2:DM] Conquest Mod

All of this can already be achieved in the Hammer Editor ;) Check out the beta vmf file in the CSGO sdk.
by Predz
Sun Nov 06, 2016 12:33 pm
Forum: Plugin Development Support
Topic: Nav mesh functions
Replies: 10
Views: 7793

Re: Nav mesh functions

I have been quite interested in this library so am spending some time to recode the entire library. I want to optimise it quite substantially and am going to post most of my code here for everyone to comment on. I will be working on all the unimplemented functions too! Unsure whether this could at s...
by Predz
Sat Nov 05, 2016 12:42 am
Forum: Plugin Development Support
Topic: Nav mesh functions
Replies: 10
Views: 7793

Re: Nav mesh functions

I was interested by this quite a bit, so I went digging myself :P

Enjoy! https://code.google.com/archive/p/sourcelibs/source/default/source

Syntax: Select all

from navlib import NAV

nav_data = NAV(<path to nav file>)
by Predz
Fri Sep 16, 2016 2:07 pm
Forum: Plugin Development Support
Topic: [CSGO] Get current map?
Replies: 10
Views: 7517

Re: [CSGO] Get current map?

Thanks Ayuto :)

Yeh my reasoning behind this was due to this .py file not importing "server" anywhere and only being defined as "None".
by Predz
Fri Sep 16, 2016 7:01 am
Forum: Plugin Development Support
Topic: [CSGO] Get current map?
Replies: 10
Views: 7517

Re: [CSGO] Get current map?

engines.server.server.map_name I believe :) from engines.server import server map_name = server.map_name However I think you have to create your own Server instance. So instead import Server and create an instance first. from engines.server import Server server = Server() map_name = server.m...
by Predz
Mon Sep 12, 2016 8:58 am
Forum: Code examples / Cookbook
Topic: Particle effects!
Replies: 36
Views: 85677

Re: Particle effects!

Thanks! I made a change to where you get the Client instance from but it works perfectly! :) clients = set() def get_file_requested_function(): if PLATFORM == 'windows': identifier = b'\x55\x8B\xEC\x56\x8B\xF1\x57\x8B\x8E\x10\x02\x00\x00\x8B\x01\xFF' else: identifier ...
by Predz
Sat Sep 10, 2016 2:16 pm
Forum: Code examples / Cookbook
Topic: Particle effects!
Replies: 36
Views: 85677

Re: Particle effects!

This is a bit messy at the moment, but shown below: from core import AutoUnload from core import PLATFORM from core import echo_console from engines.precache import Generic from entities.entity import Entity from events.manager import event_manager from events import Event from players.entity import...
by Predz
Sat Sep 10, 2016 12:16 pm
Forum: Code examples / Cookbook
Topic: Particle effects!
Replies: 36
Views: 85677

Re: Particle effects!

I am going to test it like this however very unlikely to change anything from what I have know. I have the particle effects working currently, apart from when the player joins for the first time, on the current map. As soon as map change happens or they rejoin everything then works. Just trying to f...

Go to advanced search