Search found 1413 matches

by Ayuto
Sat Dec 22, 2012 1:51 pm
Forum: News & Announcements
Topic: Getting/Setting offsets
Replies: 15
Views: 15836

I don't see a problem with getting strings. If we got a char *, we can safely use our function. A char ** is obviously not a char * and we need to turn it into a char * via GetLocPointer() (or did I understand you not correctly?). And isn't realloc() made to extend/shorten pointers? So there wouldn'...
by Ayuto
Fri Dec 21, 2012 4:51 pm
Forum: API Design
Topic: Binutils.FindVirtualFunction()
Replies: 8
Views: 9858

Looks fine now! :)
by Ayuto
Fri Dec 21, 2012 4:49 pm
Forum: News & Announcements
Topic: Getting/Setting offsets
Replies: 15
Views: 15836

Vote for GetLocString() and SetLocString()! :D
by Ayuto
Fri Dec 21, 2012 11:20 am
Forum: General Discussion
Topic: wininstall .exe's in sp folder?
Replies: 19
Views: 14326

Or simply add them to the blacklist via your repository client. So they are not commited.
by Ayuto
Fri Dec 21, 2012 11:09 am
Forum: API Design
Topic: Binutils.FindVirtualFunction()
Replies: 8
Views: 9858

Heh yes, that gave me a headache and took me some time to find that out.
by Ayuto
Wed Dec 19, 2012 10:40 pm
Forum: Plugin Development Support
Topic: ServerExecute() question?
Replies: 7
Views: 7359

I'm not sure if I understood you correctly. This doesn't work?

Syntax: Select all

from core import GameEngine

def kickid(userid, reason=''):
GameEngine.ServerCommand('kickid %s %s\n'% (userid, reason))
by Ayuto
Wed Dec 19, 2012 10:35 pm
Forum: Plugin Development Support
Topic: Possible to set people on fire ?
Replies: 1
Views: 3166

You could try to find a signature for CBaseAnimating::Ignite() (I can't, because I don't have the latest binaries) or simply wait until Binutils.FindVirtualFunction() has been fixed. Then you could use an offset to find the function, which is much more easier. http://www.sourcemodplugins.org/vtableo...
by Ayuto
Tue Dec 18, 2012 9:47 am
Forum: API Design
Topic: Binutils.FindVirtualFunction()
Replies: 8
Views: 9858

I'm new to C++ as well (I started at the end of my summer holidays), but that's what I noticed when using SPE in combination with my C++ - Python library. This is not a reproach!
by Ayuto
Tue Dec 18, 2012 9:38 am
Forum: News & Announcements
Topic: Getting/Setting offsets
Replies: 15
Views: 15836

Nice! Definitely m_nButtons! :D

Do booleans work for you?
by Ayuto
Tue Dec 18, 2012 9:33 am
Forum: API Design
Topic: Binutils.FindVirtualFunction()
Replies: 8
Views: 9858

Binutils.FindVirtualFunction()

Hi, I just noticed the latest revision and there might be two problems. 1. Linux offsets are not always one greater than Windows offsets. You can see an example here: http://forums.eventscripts.com/viewtopic.php?f=25&t=46254&start=6 The offset on Windows for CBaseClient::SetName() is 17, but on Linu...
by Ayuto
Wed Dec 05, 2012 10:33 am
Forum: General Discussion
Topic: Download brokan
Replies: 3
Views: 4392

Hi,

you can download a compiled version from the repository. http://code.google.com/p/source-python/downloads/list
by Ayuto
Sun Dec 02, 2012 8:43 pm
Forum: Plugin Development Support
Topic: UserMessage Menu
Replies: 15
Views: 13100

You can use this helper function in order to get the required value: def keysToBits(keys): return sum((1 << x for x in set(keys))) If you want to enable 0-9 you would do it like the following: UserMessage.WriteShort(keysToBits((0, 1, 2, 3, 4, 5, 6, 7, 8, 9...
by Ayuto
Mon Sep 03, 2012 9:43 pm
Forum: General Discussion
Topic: Find out current map
Replies: 6
Views: 6580

I'm pretty sure that this will work: from Source.Engine import GetEngine from Source.Cvar import GetCvar engine = GetEngine() cvar = GetCvar() def getCurrentMap(): current_map = cvar.FindVar('host_map').GetString() return '' if not current_map ...
by Ayuto
Mon Sep 03, 2012 8:39 pm
Forum: Plugin Development Support
Topic: EasyPlayer creates new instance on every call?
Replies: 5
Views: 5889

As you can see here EasyPlayer is a simple object. So everytime you want to get an instance, a new instance will be created. Here is an example to make it clear: >>> class Player(object): def __init__(self, userid): self.userid = userid >>> p1 = Player(1) >>> p1 <__main__.Pla...
by Ayuto
Sat Sep 01, 2012 6:19 pm
Forum: General Discussion
Topic: entity_edict.cpp question [How to respawn a player]
Replies: 12
Views: 11853

Yeah, that's right. es_spawnplayer and es_spawnentity are using DispatchSpawn. http://master.build.eventscripts.com/eventscripts/eventscripts2/file/6936a4bee74c/mattie_eventscripts.cpp#l3656
I'm pretty sure that it would work, if you set these props.
by Ayuto
Thu Aug 30, 2012 8:15 pm
Forum: General Discussion
Topic: paths.py suggestion
Replies: 5
Views: 6496

I prefer the path module, since it's a even easier. [python]from path import path

my_file_dir = path(__file__).dirname()[/python]
by Ayuto
Thu Aug 30, 2012 6:48 pm
Forum: Plugin Development Support
Topic: sqlite3 connect (PATH)
Replies: 4
Views: 5575

You can simply extend your path. So you could do it like this:

Syntax: Select all

conn = sqlite3.connect('csgo/addons/source-python/ADDON_NAME/kiwi.db')
by Ayuto
Wed Aug 29, 2012 8:30 am
Forum: General Discussion
Topic: Easy Way to port an existing Eventscripts Addon
Replies: 10
Views: 9471

BackRaw wrote:

Syntax: Select all

@Event # do I need this here ?
def unload():
myplayers.clear() # clear out our player dictionary

No, this is handled here: http://code.google.com/p/source-python/source/browse/addons/source-python/_libs/addons/manager.py#92 ;)
by Ayuto
Tue Aug 28, 2012 8:51 pm
Forum: General Discussion
Topic: Popup
Replies: 16
Views: 13368

by Ayuto
Wed Aug 15, 2012 10:56 am
Forum: Whatever
Topic: cs:go weapon list of all the weapon names in the game?
Replies: 12
Views: 13167

That isn't an issue and has nothing to do with Source Python. You might have noticed this behavior when using item_pickup with EventScripts. Some things contain the complete class name and other things only the partial class name.

Go to advanced search