Search found 1413 matches

by Ayuto
Thu Oct 30, 2014 1:36 pm
Forum: General Discussion
Topic: Extending via C++, adding a module throws exception
Replies: 23
Views: 16859

This should already initialize the module.
by Ayuto
Thu Oct 30, 2014 1:34 pm
Forum: General Discussion
Topic: Extending via C++, adding a module throws exception
Replies: 23
Views: 16859

What happens when you remove the line L'In20Cible pointed out?[python]PyImport_AppendInittab("pawnbridge", &PyInit_emb);[/python]
by Ayuto
Thu Oct 30, 2014 1:26 pm
Forum: General Discussion
Topic: Extending via C++, adding a module throws exception
Replies: 23
Views: 16859

I think the problem is that you are trying to initialize another Python interpreter. PyImport_AppendInittab("pawnbridge", &PyInit_emb); Py_Initialize(); I have updated an old Python 2 extension to test extending Python 3. Here is all I did to get it working. https://cod...
by Ayuto
Tue Oct 14, 2014 12:41 pm
Forum: News & Announcements
Topic: A menus package is now available!
Replies: 26
Views: 60184

There is no need to edit anything. Just type bind "0" "menuselect 10" in your client console. If you then hit 0 the menu will close. We will change that in the future, so there is no need to do that.
by Ayuto
Thu Oct 09, 2014 7:47 am
Forum: General Discussion
Topic: Happy Birthday La Muerte!!!
Replies: 8
Views: 6875

Happy Birthday! :)
by Ayuto
Thu Oct 09, 2014 7:46 am
Forum: News & Announcements
Topic: A menus package is now available!
Replies: 26
Views: 60184

No, it's currently not possible, but we will consider your suggestion!
by Ayuto
Tue Oct 07, 2014 3:12 pm
Forum: Plugin Development Support
Topic: How to make player invisible?
Replies: 12
Views: 12182

To make an entity completely invisible (even the weapons a player has) I hooked CBaseEntity::SetTransmit() with SPE some years ago. http://forums.eventscripts.com/viewtopic.php?f=90&t=45739&p=399762&hilit=SetTransmit#p399762 I'm pretty sure this will also work with CS:GO. And doing this with SP will...
by Ayuto
Mon Oct 06, 2014 8:00 pm
Forum: Plugin Development Support
Topic: need working script that acutally switches player for csgo
Replies: 26
Views: 19003

8guawong wrote:Ayuto please don't comment about my code looks ugly please :cool:

Okay... :(
by Ayuto
Mon Sep 29, 2014 7:04 pm
Forum: Plugin Development Support
Topic: getting index from playeriter
Replies: 6
Views: 5408

Yeah, but since he marked it as red I thought he was confused by "indexing" and "index".
by Ayuto
Mon Sep 29, 2014 6:20 pm
Forum: Plugin Development Support
Topic: getting index from playeriter
Replies: 6
Views: 5408

# Since "index" is the default return type I would also like to add that "indexing" has nothing to do with the return type. See this example: import random print(random.choice(set(range(5)))) It's completely unrelated to Source.Python, but it will...
by Ayuto
Mon Sep 29, 2014 6:12 pm
Forum: Code examples / Cookbook
Topic: Stripping weapons
Replies: 45
Views: 112532

L'In20Cible wrote:Probably different games.
or operating system.
by Ayuto
Sun Sep 28, 2014 6:22 pm
Forum: Plugin Development Support
Topic: how to forcing player to specific team
Replies: 10
Views: 7694

Yes, the result is the same, but if you use the decorator the code is shorter (50%) and less error prone as you don't need to unregister the filter when you unload the plugin. This will be done automatically. Just compare these two scripts and you will understand. from commands.client import client_...
by Ayuto
Sun Sep 28, 2014 4:33 pm
Forum: Plugin Development Support
Topic: how to forcing player to specific team
Replies: 10
Views: 7694

You are trying to compare the Command object with a string. This will always result in False. http://wiki.sourcepython.com/index.php/commands#Command http://wiki.sourcepython.com/index.php/commands.client def client_command_filter(player, command): if command[0] == 'jointeam': print&...
by Ayuto
Fri Sep 26, 2014 6:55 pm
Forum: Plugin Development Support
Topic: need help setting models
Replies: 3
Views: 4007

Print "old_model" and "model_index" ind player_jump and you will see the reason for your error. But please post the full error next time. :)
by Ayuto
Fri Sep 26, 2014 4:47 pm
Forum: Plugin Development Support
Topic: How to emit sound??
Replies: 22
Views: 19225

You don't need to precache the sound. Our Sound class will do that for you.

Are there any errors in your client console?
by Ayuto
Tue Sep 23, 2014 8:05 pm
Forum: Plugin Development Support
Topic: Colored Smoke
Replies: 11
Views: 10062

The effects package provides two methods to spawn smoke. But you could also create an env_smoke or a smokegrenade.
by Ayuto
Wed Sep 17, 2014 6:09 pm
Forum: Plugin Development Support
Topic: Prehook PlayerRunCmd & TraceAttack
Replies: 4
Views: 4808

You would also use the PreHook decorator to hook TraceAttack.

But I don't think you need to hook that method for this. Just use the player_hurt event and check the weapon and hitbox.
by Ayuto
Mon Sep 15, 2014 6:18 pm
Forum: Plugin Development Support
Topic: Prehook PlayerRunCmd & TraceAttack
Replies: 4
Views: 4808

Here is an example for CS:S (CS:GO shouldn't differ very much). # ============================================================================= # >> IMPORTS # ============================================================================= # Memory import memory from memory import Argument from memory ...
by Ayuto
Sat Sep 13, 2014 8:14 pm
Forum: Plugin Releases
Topic: EZSP - Libary to easily access SP modules & functions
Replies: 11
Views: 12022

Ahh, okay. Then try this:

Syntax: Select all

def getplayercount():
# Returns number of players and bots
return len(tuple(PlayerIter()))

Go to advanced search