Search found 1413 matches

by Ayuto
Sat Sep 13, 2014 8:02 pm
Forum: Plugin Releases
Topic: EZSP - Libary to easily access SP modules & functions
Replies: 11
Views: 12028

Let me tell you a nice trick. :p

Syntax: Select all

def getplayercount():
# Returns number of players and bots

x = 0
for index in PlayerIter():
x += 1

return x

Syntax: Select all

def getplayercount():
# Returns number of players and bots
return len(PlayerIter())
by Ayuto
Sat Sep 13, 2014 2:04 pm
Forum: Plugin Development Support
Topic: Multiple modules
Replies: 2
Views: 2790

Check this line. https://bitbucket.org/backraw/source.python/src/7a3ac1d69371807abede5215f234fdb340ed55e3/flashfunsp/config.py?at=master#cl-12

It should actually be

Syntax: Select all

from flashfunsp.info import info
or even shorter

Syntax: Select all

from info import info
by Ayuto
Sat Sep 13, 2014 7:41 am
Forum: Whatever
Topic: Resource manager
Replies: 2
Views: 4696

As for Source.Python the name would be SPAM! :D
by Ayuto
Fri Sep 12, 2014 8:41 pm
Forum: Plugin Releases
Topic: Hitmarker + Damage Stats
Replies: 4
Views: 6631

Well done! Though, I have a few suggestions. 1. You don't need to care about making materials downloadable. SP will take care of it, if you just do this. dl = Downloadables() dl.add("materials/overlays/hitmarker/hitmarkerv2.vmt") dl.add("materials/overlays/hitmarke...
by Ayuto
Thu Sep 11, 2014 10:09 am
Forum: Plugin Development Support
Topic: mathlib's is_within_box()
Replies: 7
Views: 5323

I just had a look at the implementation of Vector::WithinAABox(). bool Vector::WithinAABox( Vector const &boxmin, Vector const &boxmax) { return ( ( x >= boxmin.x ) && ( x <= boxmax.x) && ( y >= boxmin.y ) && ( y <= boxmax.y)...
by Ayuto
Wed Sep 10, 2014 4:11 pm
Forum: Plugin Development Support
Topic: mathlib's is_within_box()
Replies: 7
Views: 5323

Please show me your test code. I need something to reproduce the behaviour you explained in your first post. There is no useful information in the code you just posted.
by Ayuto
Wed Sep 10, 2014 3:45 pm
Forum: Plugin Development Support
Topic: mathlib's is_within_box()
Replies: 7
Views: 5323

Works fine for me. from mathlib import Vector point0 = Vector() point1 = Vector(100, 100, 100) # Prints True print(Vector(5, 5, 5).is_within_box(point0, point1)) # Prints False print(Vector(5, 5, 101).is_within_box(point0, point1)) What...
by Ayuto
Tue Sep 09, 2014 6:11 pm
Forum: Plugin Development Support
Topic: Am I doing something wrong, or is there something wrong with the mathlib vector?
Replies: 2
Views: 3374

Yes, this can happen if you convert a pointer to a Python class. The pointer was probably deallocated later. To solve the issue just create a copy of it. def pre_spray_decal(arguments): vector = Vector(*tuple(make_object(Vector, arguments[3]))) player = PlayerEntity&#...
by Ayuto
Sun Sep 07, 2014 2:07 pm
Forum: Plugin Development Support
Topic: [SOLVED] Can't load the plugin...
Replies: 39
Views: 22267

Great! Do you want to upload the files?
by Ayuto
Sun Sep 07, 2014 6:06 am
Forum: Plugin Development Support
Topic: [SOLVED] Can't load the plugin...
Replies: 39
Views: 22267

Have you checked if that is really the path where the new version is installed?

Edit: I think you still misunderstand me. 4 CPUs are unnecessary. It will only use one core unless you add -j4 to the make statement.
by Ayuto
Sat Sep 06, 2014 1:51 pm
Forum: Plugin Development Support
Topic: SayText() not working in CS:GO?
Replies: 25
Views: 18479

It's not our fault that we cannot use hex colors. It's the engine that doesn't allow this. There is nothing we can do.
by Ayuto
Sat Sep 06, 2014 12:33 pm
Forum: Plugin Development Support
Topic: SayText() not working in CS:GO?
Replies: 25
Views: 18479

Works fine for me.

Syntax: Select all

from messages import SayText2
from events import Event

@Event
def player_jump(event):
SayText2(message='\x01a\x02a\x03a\x04a\x05a\x06a\x06a\x07a\x08a').send()
The attachment de_dust20000.jpg is no longer available
by Ayuto
Sat Sep 06, 2014 12:09 pm
Forum: Plugin Development Support
Topic: Respawn player (csgo)
Replies: 30
Views: 18313

by Ayuto
Fri Sep 05, 2014 7:20 pm
Forum: Plugin Development Support
Topic: SayText() not working in CS:GO?
Replies: 25
Views: 18479

If I remember correctly there are 8 colors in CS:GO: \x01 - \x08

The square could be caused by our "fix" we implemented earlier to properly show colors. Maybe Valve has fixed that bug. I will test that tomorrow.
by Ayuto
Fri Sep 05, 2014 7:14 pm
Forum: Whatever
Topic: How about a Facebook group/page?
Replies: 5
Views: 6415

I think the EventScripts and SourceMod forums would be a better place.
by Ayuto
Thu Sep 04, 2014 9:05 pm
Forum: Plugin Development Support
Topic: [SOLVED] Can't load the plugin...
Replies: 39
Views: 22267

Yes, it's 3.4.1. But somehow I'm not able to build all python libraries. I will need to take a look at it at the weekend (if you weren't faster :p ).
by Ayuto
Thu Sep 04, 2014 6:36 pm
Forum: Whatever
Topic: Server crash on SP loading
Replies: 16
Views: 15380

Yes, the only difference is that the code outside is executed at first. After that the load() function is executed.
by Ayuto
Thu Sep 04, 2014 6:13 pm
Forum: Plugin Development Support
Topic: Blinding players and changing models
Replies: 22
Views: 15461

Currently there are no events created by Source.Python. The equivalent for es_map_start is the LevelInit decorator or level_init_listener_manager object. https://github.com/Source-Python-Dev-Team/Source.Python/blob/master/addons/source-python/packages/source-python/listeners/__init__.py#L51 Yes, you...
by Ayuto
Thu Sep 04, 2014 6:09 pm
Forum: Whatever
Topic: Server crash on SP loading
Replies: 16
Views: 15380

Actually that's not true. The whole script is reloaded!

It's just the complement for the unload() function.

Go to advanced search