Search found 569 matches

by iPlayer
Tue Jan 12, 2016 5:11 am
Forum: Plugin Releases
Topic: [CS:S/CS:GO/HL2DM] Map Cycle (+SPA support)
Replies: 30
Views: 45485

I think that users are used to typing rtv, nominate, timeleft etc without an exclamation mark I am using say and client commands without any prefix, as well as using the prefix ! and / for say commands with / denoting private. Thanks for your replies, guys. Well, it currently does support commands ...
by iPlayer
Mon Jan 11, 2016 12:40 pm
Forum: Plugin Releases
Topic: [CS:S/CS:GO/HL2DM] Map Cycle (+SPA support)
Replies: 30
Views: 45485

[CS:S/CS:GO/HL2DM] Map Cycle (+SPA support)

[CS:S/CS:GO/HL2DM] Map Cycle Plugin: https://github.com/KirillMysnik/sp-map-cycle Source.Python Admin counterpart: https://github.com/KirillMysnik/SPA-Map-Cycle What it is: ⋅  Map votes (!votemap) . You can schedule one. Unfortunately, it only works with mp_timelimit. No frag/round limits...
by iPlayer
Sat Jan 09, 2016 4:12 pm
Forum: API Design
Topic: translation.strings questions
Replies: 2
Views: 12704

I'm trying to figure out the implementation for recursive .get_string. What if a child TranslationStrings contains the same tokens names as a parent? [token] en="Subtoken value: {subtoken}" [subtoken] en="Subtoken's subtoken value: {subtoken}" [subsubtoken] en="SubSubToken&q...
by iPlayer
Sat Jan 09, 2016 8:35 am
Forum: Plugin Requests
Topic: RTV/ Nominate
Replies: 4
Views: 5289

I'm doing that
by iPlayer
Fri Jan 08, 2016 11:47 pm
Forum: API Design
Topic: translation.strings questions
Replies: 2
Views: 12704

translation.strings questions

Hey there I've been working with translations and menus packages and I want to share my thoughts. 1. ../translations/strings.py/LangStrings.get_strings Here's this method def get_strings(self, key, **tokens): """Return a TranslationStrings object with updated tokens."&quo...
by iPlayer
Tue Jan 05, 2016 7:15 pm
Forum: API Design
Topic: tick_delays changes
Replies: 1
Views: 11884

Also worth mentioning that the seconds keyword argument is now called delay (for those who passed the delay time as a keyword argument)
by iPlayer
Mon Jan 04, 2016 9:26 pm
Forum: API Design
Topic: What exceptions can conversion functions raise?
Replies: 2
Views: 12129

Thanks, Ayuto, now I get it. I asked because I decided to make a pull request to entities/specials.py and that required me to know what exceptions I want to suppress. Hope I didn't mess this up. Edit: Well, I did mess this up. Thought that index_from_inthandle accepted signed ints. Now it's 2 commits.
by iPlayer
Mon Jan 04, 2016 2:21 pm
Forum: API Design
Topic: What exceptions can conversion functions raise?
Replies: 2
Views: 12129

What exceptions can conversion functions raise?

According to Ayuto's announcement , it's only ValueError : If the conversion failed, a ValueError will be raised. But I found the following try-except statements in players/weapons/__init__.py : try: index = index_from_inthandle(handle) except (ValueError, OverflowError): continue Lo...
by iPlayer
Wed Dec 30, 2015 5:58 pm
Forum: Plugin Releases
Topic: Warcraft: GO
Replies: 3
Views: 5861

http://forums.sourcepython.com/showthread.php?1029-ConVar-creation-changes

Update your SP. The issue is that Warcraft: GO is already updated to work with the latest SP release.
by iPlayer
Sun Dec 27, 2015 11:34 pm
Forum: Whatever
Topic: env_sprite's model
Replies: 1
Views: 3423

I can think of Hammer's logic though. 1. Remove all characters past the last dot in file name (if there are any dots) including the dot itself; 2. If there's no trailing '.spr' already, add one index = filename.rfind('.') if index > 0: filename = filename[:index] if not filename.ends...
by iPlayer
Sun Dec 27, 2015 11:26 pm
Forum: Whatever
Topic: env_sprite's model
Replies: 1
Views: 3423

env_sprite's model

by iPlayer
Sat Dec 26, 2015 10:42 am
Forum: Whatever
Topic: Forum JSON API
Replies: 4
Views: 5298

I believe /external.php is responsible for that, but it always returns a blank page. I guess they haven't turned on external syndication in their Admin CP. But if they had, it would be http://forums.sourcepython.com/external.php?type=js Also look up this post http://www.vbulletin.com/forum/forum/vbu...
by iPlayer
Mon Dec 21, 2015 6:12 pm
Forum: Plugin Development Support
Topic: Csgo motd
Replies: 21
Views: 20532

Worth mentioning that I got this error in CS:S

Blocking MOTD URL 'file://D:/srv/page.html'; must begin with 'http://' or 'https://' or be about:blank
by iPlayer
Mon Dec 21, 2015 5:26 pm
Forum: Plugin Development Support
Topic: Get client aspect ratio or screen resolution
Replies: 3
Views: 3232

Tried to get screen resolution via this page <!doctype html> <html> <head> <title>Screen Resolution Detector</title> <style type="text/css"> html, body { background-color: #fff; } </style> </head> <body> <script> document.write(''+screen.width+' '+screen.height); </...
by iPlayer
Mon Dec 21, 2015 4:20 pm
Forum: Plugin Development Support
Topic: Get client aspect ratio or screen resolution
Replies: 3
Views: 3232

Thanks, Kami, I will try to track FOVs on different aspect ratios. Will write back.

Edit: Nope, didn't work. m_iFOV is always 0, m_iDefaultFOV is always 90.
by iPlayer
Mon Dec 21, 2015 8:24 am
Forum: Plugin Development Support
Topic: Get client aspect ratio or screen resolution
Replies: 3
Views: 3232

Get client aspect ratio or screen resolution

I want to send them a screen overlay but the problem is that the overlay contains a square picture. So I prepared two overlays - for widescreen and for 4:3. Is there any way to determine client's aspect ratio?
by iPlayer
Mon Dec 21, 2015 4:19 am
Forum: Code examples / Cookbook
Topic: Stripping weapons
Replies: 45
Views: 112464

I believe this way

Syntax: Select all

entity = Entity.create('player_weaponstrip')
entity.call_input("Strip", activator=player.index)
entity.remove()


The key moment here is that the player must be an activator
by iPlayer
Sun Dec 20, 2015 7:22 pm
Forum: Plugin Development Support
Topic: Port of IPToCountry and some questions to port from ES To SP
Replies: 25
Views: 16522

Because in Python 2 str can be used for both binary and text data, in Python 3 it can't.
by iPlayer
Sun Dec 20, 2015 7:12 pm
Forum: Plugin Development Support
Topic: SQL anyone?
Replies: 11
Views: 8110

Thanks, it's all clear for me now.

Go to advanced search