Search found 1413 matches

by Ayuto
Sun Feb 01, 2015 12:16 pm
Forum: API Design
Topic: Coding Style
Replies: 42
Views: 191766

I would also like to add that using constants will make your life easier in some situations. 1. If the value of the constant need to be changed, you only need to change one occurence. If you don't use constants you would need to do that everywhere you use this value. 2. Constants also allow you to g...
by Ayuto
Sat Jan 31, 2015 4:46 pm
Forum: Plugin Development Support
Topic: How to reset the player's sound to normal on player_blind?
Replies: 55
Views: 29073

I have now taken a look at CS:GO and found this signature. 55 8B EC 83 EC 28 56 57 8B F9 F3 0F 11 4D FC However, this is a special function as it uses a custom calling convention on Windows. The "this" pointer is passed through the ecx register (that's usual for a Windows thiscall), but th...
by Ayuto
Sat Jan 31, 2015 9:52 am
Forum: Plugin Development Support
Topic: How to reset the player's sound to normal on player_blind?
Replies: 55
Views: 29073

This is for CS:S:

Code: Select all

_ZN9CCSPlayer6DeafenEf
55 8B EC 83 EC 28 89 4D FC 8B 45 FC 8B 10
I will take a look at CS:GO's signature later today.
by Ayuto
Fri Jan 30, 2015 6:39 pm
Forum: Plugin Development Support
Topic: How to reset the player's sound to normal on player_blind?
Replies: 55
Views: 29073

http://en.wikipedia.org/wiki/Interactive_Disassembler

But of course you can also use a different disassembler if you want.
by Ayuto
Fri Jan 30, 2015 5:42 pm
Forum: Plugin Development Support
Topic: How to reset the player's sound to normal on player_blind?
Replies: 55
Views: 29073

Just open IDA and look up those functions:

CCSPlayer::Blind(float, float, float)
CCSPlayer::Deafen(float)
by Ayuto
Fri Jan 30, 2015 5:16 pm
Forum: Plugin Development Support
Topic: How to reset the player's sound to normal on player_blind?
Replies: 55
Views: 29073

Yep, that should work.
by Ayuto
Fri Jan 30, 2015 5:10 pm
Forum: Plugin Development Support
Topic: How to reset the player's sound to normal on player_blind?
Replies: 55
Views: 29073

Do you want an anti-flash for everyone or just for some people? In the first case you can just hook CFlashbangProjectile::Detonate(). If you only want to disable that for some specific users, you need to hook CCSPlayer::Deafen() to disable the sound and CCSPlayer::Blind() to disable the blinding part.
by Ayuto
Sun Jan 25, 2015 11:35 am
Forum: Plugin Development Support
Topic: Getting a PlayerEntity from player_connect?
Replies: 7
Views: 4929

Oh, this is my fault. ClientConnect listeners require more parameters. http://forums.sourcepython.com/showthread.php?670-Custom-params-in-event&p=3708&viewfull=1#post3708

ClientDisconnect requires only an index.
by Ayuto
Thu Jan 22, 2015 6:57 pm
Forum: Plugin Development Support
Topic: Best way to use unload()
Replies: 2
Views: 2296

Every menu is a subclass of a list, so this will just empty your menu. You would rather want to call close(). However, every menu is also a subclass of the AutoUnload class. This means that your menu will be closed automatically when your plugin has been unloaded. The menu just needs to be in the gl...
by Ayuto
Sat Jan 17, 2015 1:30 pm
Forum: API Design
Topic: Coding Style
Replies: 42
Views: 191766

Never let an editor wrap you code! That's ugliest thing you can do, imo. This will always generate different output depending on the size of your editor window and the type of you editor. Moreover it doesn't split you code logically. Here is an example how it will look like: def my_func(param1, para...
by Ayuto
Mon Jan 05, 2015 6:34 pm
Forum: Plugin Development Support
Topic: Change event's name?
Replies: 4
Views: 3364

One thing you could do is to duplicate the event by using this method. https://github.com/Source-Python-Dev-Team/Source.Python/blob/master/src/core/modules/events/events_wrap_python.cpp#L260

Then you need to change the event's name (like Satoon mentioned).
by Ayuto
Tue Dec 30, 2014 1:23 pm
Forum: General Discussion
Topic: Unknown command "sp"
Replies: 8
Views: 6971

You haven't set "developer" to 5. But since "[Source.Python] Loading..." doesn't even show up I guess that you forgot to copy "source-python.so" to your addons folder.
by Ayuto
Tue Dec 30, 2014 1:12 pm
Forum: General Discussion
Topic: Unknown command "sp"
Replies: 8
Views: 6971

Can you show us the start log of your server? Make sure to add "+developer 5" to the command line.
by Ayuto
Tue Dec 30, 2014 12:58 pm
Forum: General Discussion
Topic: Unknown command "sp"
Replies: 8
Views: 6971

Which game and which OS?
by Ayuto
Tue Dec 30, 2014 9:25 am
Forum: Plugin Development Support
Topic: Compiling issue
Replies: 7
Views: 4805

I had this problem after updating the .Net framework to the latest version. In this thread are several suggestions to solve this issue. http://stackoverflow.com/questions/10888391/error-link-fatal-error-lnk1123-failure-during-conversion-to-coff-file-inval For me it fixed it after I replaced the cvtr...
by Ayuto
Fri Dec 05, 2014 9:11 pm
Forum: Plugin Development Support
Topic: How can I reconstruct CCheckTransmitInfo?
Replies: 3
Views: 3560

Ahh, yes. Sorry, I forgot that we look up the class by its C++ name. :)
by Ayuto
Fri Dec 05, 2014 8:22 pm
Forum: General Discussion
Topic: blood_sprite Effect
Replies: 2
Views: 3732

No, this isn't possible since idk. Orangebox?!
by Ayuto
Fri Dec 05, 2014 8:04 pm
Forum: Plugin Development Support
Topic: How can I reconstruct CCheckTransmitInfo?
Replies: 3
Views: 3560

http://forums.eventscripts.com/viewtopic.php?f=90&t=45739&start=22

I think this should do the trick.

Syntax: Select all

class CCheckTransmitInfo(CustomType, metaclass=manager):
m_pClientEnt = manager.pointer_attribute('Edict', 0)
by Ayuto
Tue Dec 02, 2014 9:07 pm
Forum: Plugin Development Support
Topic: Set fake ping for bots
Replies: 3
Views: 3416

I think you just need to set proper CPlayerResource.m_iPing.<player index> property. E.g. CPlayerResource.m_iPing.001 would be the property for the player with the index 1.
by Ayuto
Tue Dec 02, 2014 2:34 pm
Forum: General Discussion
Topic: How to tell how much precache table has been used for csgo???
Replies: 7
Views: 8338

This will tell you the current number of entries in the modelprecache string table. from stringtables import string_tables print(len(string_tables.modelprecache)) But I would suggest you to use the Model class. http://forums.sourcepython.com/showthread.php?643-3-new-classes-%28Model-...

Go to advanced search