Search found 1413 matches

by Ayuto
Thu Nov 26, 2015 5:29 pm
Forum: Plugin Development Support
Topic: Accessing math_counters from SP
Replies: 6
Views: 4488

Yes, math_counter is a non-networked entity. That means that it doesn't have an index (and edict).

Instead of creating another class we would ideally move the shared code to the BaseEntity class.
by Ayuto
Thu Nov 26, 2015 2:38 pm
Forum: Plugin Requests
Topic: Plugins converts from Eventscripts to Source Python
Replies: 35
Views: 26063

I think Satoon's code was doing exactly what Killer0561 requested. The only problem is that <Sound>.duration always seems to return 0. I guess we need to fix that.
by Ayuto
Wed Nov 25, 2015 1:16 pm
Forum: General Discussion
Topic: Weird behaviour during warmup
Replies: 7
Views: 6388

An other bug which I'm not sure if it's SP or Source engine: player.is_fake_client() seems to return False even on bots. Is this intended behaviour? I just ended up using player.steamid == 'BOT' for now, but took me a while to figure out why my code wasn't working. Does that always ...
by Ayuto
Wed Nov 25, 2015 12:43 pm
Forum: General Discussion
Topic: Weird behaviour during warmup
Replies: 7
Views: 6388

I moved this thread to a more appropriate section.

I actually doubt that this is a bug in SP, but if you really want to find that out, disable SP and test again.
by Ayuto
Sun Nov 22, 2015 11:50 am
Forum: General Discussion
Topic: SP crashing server No global pointer found for "Server"
Replies: 4
Views: 4210

Build 141 is working fine for me as well. What did you do to update from 140 to 141?
by Ayuto
Sun Nov 22, 2015 12:35 am
Forum: General Discussion
Topic: SP crashing server No global pointer found for "Server"
Replies: 4
Views: 4210

This should fix the crash (build 140): https://github.com/Source-Python-Dev-Team/Source.Python/commit/89e576c055874c78b33db826358e8828155e80de I changed that in my last commit due to the conversions update, but I forgot to remove the "!". Thanks for reporting! :) Edit: The error you get has nothing ...
by Ayuto
Fri Nov 20, 2015 2:44 pm
Forum: News & Announcements
Topic: Updated conversion functions
Replies: 8
Views: 24340

Alright, I have updated the conversion functions once again to raise an exception instead of returning None in case of a failed conversion. The main post has been updated as well.

Thank you for your feedback! :)
by Ayuto
Thu Nov 19, 2015 11:33 pm
Forum: News & Announcements
Topic: Updated conversion functions
Replies: 8
Views: 24340

The reason for this change was that we only wanted one behaviour and not two depending on the second argument. To be honest, when I decided to return None I was a bit C/C++ driven, where it's common to return "false" on failure and "true" on success (the actual return value is passed as a reference ...
by Ayuto
Thu Nov 19, 2015 2:38 pm
Forum: News & Announcements
Topic: Updated conversion functions
Replies: 8
Views: 24340

Updated conversion functions

We have updated all conversion functions. They now don't have the optional keyword argument "raise_exception" anymore (defaulting to True). Instead they only accept the value that should be converted and return the converted value. If the conversion failed, a ValueError will be raised. Exa...
by Ayuto
Wed Nov 18, 2015 11:21 pm
Forum: Plugin Development Support
Topic: Questions on working with entities IO calls and keyvalues
Replies: 19
Views: 12933

Ayuto , do you mean _entities._datamaps.Variant.set_string ? That would be inputdata.value.set_string . As far as I see, it doesn't cast any given string to the needed value type, it just sets it as a string, so the input will be called with a string value. I thought this is exactly what you want? ...
by Ayuto
Wed Nov 18, 2015 7:54 pm
Forum: Plugin Development Support
Topic: Questions on working with entities IO calls and keyvalues
Replies: 19
Views: 12933

I think you "could" use entity.get_input() to get the input function. Then you only need to call Function.__call__ with your own InputData object, which you filled by using InputData.set_string().
by Ayuto
Tue Nov 17, 2015 9:49 pm
Forum: Plugin Development Support
Topic: Csgo motd
Replies: 21
Views: 20512

I can't remember if relative paths were working. But if they are working, they would probably need to be relative to the srcds executable. Example:

Syntax: Select all

motd(index, 'test', 'file://cstrike/page.html')
by Ayuto
Tue Nov 17, 2015 3:44 pm
Forum: Plugin Development Support
Topic: Csgo motd
Replies: 21
Views: 20512

Syntax: Select all

motd(index, 'test', <path to the file on your server>)
by Ayuto
Tue Nov 17, 2015 2:55 pm
Forum: Plugin Development Support
Topic: Csgo motd
Replies: 21
Views: 20512

A better workaround would be to write a temporary file on your server and send that instead of the actual website. Though, I hope there is a real fix.
by Ayuto
Tue Nov 17, 2015 2:08 pm
Forum: Plugin Development Support
Topic: Csgo motd
Replies: 21
Views: 20512

Your screenshot shows a working MOTD, so where is the problem? When I was testing the MOTD with the new messages package I was using the example MOTD from the AlliedModders thread stinckyfax linked here: <html><head><script type="text/javascript">window.onload = function(){  ...
by Ayuto
Tue Nov 17, 2015 1:58 pm
Forum: Plugin Development Support
Topic: player.switch_team() second argument
Replies: 3
Views: 3269

Actually, player.switch_team() only requires one argument, which is the team number.
by Ayuto
Sun Nov 15, 2015 5:40 pm
Forum: API Design
Topic: Sourcemod (or Mani?) Style Player Filtering
Replies: 5
Views: 20059

If we want to be mathematically correct, we would use set operations for filters, because we are actually working with sets. I think the only interesting operations are "union" and "complement". As the notation for unions I would simply use the plus sign (+) and for complements the minus sign (-). H...
by Ayuto
Sat Nov 14, 2015 11:25 am
Forum: Plugin Development Support
Topic: Getting a team's player count without iterating?
Replies: 12
Views: 8428

I guess the first solutions completes that fast for you, because I'm running the latest SP version and we have recently changed the iterators. While your iterator iterates over Edict objects and uses a different way for filtering, the new iterator iterates over Player objects and accesses dynamic at...
by Ayuto
Sat Nov 14, 2015 11:04 am
Forum: API Design
Topic: Adding Entity/PlayerEntity/WeaponEntity attributes via data
Replies: 4
Views: 14219

You are missing the "return_type = INT" entry. Are those offsets the same on all games? I doubt, so we will probably need different offsets for the other games. However, I'm not sure if we really want to add that to the data files. It's another offset we need to maintain for a functionality that alr...
by Ayuto
Sat Nov 14, 2015 10:51 am
Forum: General Discussion
Topic: [SP SUGGESTION] Plugins Hot Reloading
Replies: 2
Views: 3197

Hey, thank you for your suggestion! But I think I agree with Doldol. I know a similar mechanism from the Django framework. At first I though: "Oh, that's cool!", but then I realized that it doesn't always recognize the changes and I had to make another change again. Sometimes I ended up restarting t...

Go to advanced search