Search found 200 matches

by Doldol
Tue Jan 13, 2015 11:32 pm
Forum: API Design
Topic: Coding Style
Replies: 42
Views: 189498

I feel I need to reiterate this, but these are guidelines for the plugin itself not for scripters to adhere to for their plugins. I understand that, I guess I really felt like bouncing off my (unpopular) views off of people here. This is more clear to me, than anything: def testing(one, two, th...
by Doldol
Tue Jan 13, 2015 4:20 pm
Forum: API Design
Topic: Coding Style
Replies: 42
Views: 189498

I dislike PEP8's 80 char limit per line and never follow it, I find that it breaks up the logic of your program just to look nicer. As for readability, we're in 2015, it's not hard to find an editor that can do dynamic word wrapping, it has the advantages of always wrapping at the correct spot, and ...
by Doldol
Fri Dec 05, 2014 9:07 pm
Forum: Plugin Development Support
Topic: How can I reconstruct CCheckTransmitInfo?
Replies: 3
Views: 3551

Yay thanks! It worked after I changed Edict to edict_t.
by Doldol
Fri Dec 05, 2014 7:38 pm
Forum: Plugin Development Support
Topic: How can I reconstruct CCheckTransmitInfo?
Replies: 3
Views: 3551

How can I reconstruct CCheckTransmitInfo?

I have hooked CBaseCombatCharacter::SetTransmit( CCheckTransmitInfo *, bool) , how can I reconstruct CCheckTransmitInfo? There doesn't seem to be a lot of information about it that I could find and use. I think it is or contains a pointer to the player's Edict? But if I try to inter...
by Doldol
Fri Dec 05, 2014 5:45 pm
Forum: Plugin Development Support
Topic: how would i script this in SP??
Replies: 2
Views: 3793

If you're not sure then test it!? But some pointers: You aren't spawning your entity. (I think this will be changed in an upcoming version of SP) spawn_entity(sprite.index) AFAIK you have to use the edict to set key values: sprite.edict.set_key_value_int("rendermode", 1) Yo...
by Doldol
Mon Dec 01, 2014 10:36 pm
Forum: API Design
Topic: Downloadables
Replies: 11
Views: 12292

No not at all, you want to specify text, which you do in Python by using strings, which need " or ' around them.
Simply put look at the highlighting, if it's green on this website, it's seen as text by Python.
by Doldol
Mon Dec 01, 2014 8:16 pm
Forum: Plugin Development Support
Topic: [CSS] Setting weapon view models.
Replies: 2
Views: 3343

Not that this is the cause of any issues you are having, as you likely have the models/materials already on your client, but Downloadables().add only accepts files, not directories. However, that is not a bad idea. I think we should consider adding that functionality. It's mainly there for me to la...
by Doldol
Mon Dec 01, 2014 7:20 pm
Forum: Plugin Development Support
Topic: [CSS] Setting weapon view models.
Replies: 2
Views: 3343

[CSS] Setting weapon view models.

I've been trying to set weapon view models using this topic https://forums.alliedmods.net/showthread.php?t=244926 as a guideline. The way the code in that topic achieves custom weapon models nearly perfectly is by binding the custom model to a second possible view model index, which appears to stay ...
by Doldol
Mon Dec 01, 2014 6:55 pm
Forum: Plugin Development Support
Topic: can we set the arm model for csgo??
Replies: 1
Views: 2964

AFAIK this falls under setting weapon viewmodels, which I don't think is impossible but it isn't easy either. But since you're using CS:GO you should probably try using .kv files, they let you have custom hand models (or materials only?) per map, but only one per team. They also allow you to have mu...
by Doldol
Mon Dec 01, 2014 1:38 pm
Forum: Code examples / Cookbook
Topic: Ending a round.
Replies: 6
Views: 21233

satoon101 wrote:It's actually even easier than that. Instead of calling AddOutput and FireUser1, you can call FireWinCondition directly.


I tried that at first but I couldn't really get that to work. Thanks for the corrections. :)
by Doldol
Mon Dec 01, 2014 4:12 am
Forum: Code examples / Cookbook
Topic: Ending a round.
Replies: 6
Views: 21233

Ending a round.

How to end a round (using FireWinCondition ). I thought this was a handy little snippet to post. from entities.entity import Entity from events import Event WIN_CONDITION = 2 """CSS: 0 TERRORIST "Target_Bombed" 1 CT "VIP_Escaped" 2 TERRORIST "VIP_Assassinated&...
by Doldol
Sat Nov 29, 2014 6:55 pm
Forum: Plugin Development Support
Topic: Add bot with custom name
Replies: 16
Views: 10394

My guess is that since player_connect fires very early on, index_from_userid can't run. In general I prefer using player_activate , which fires later, typically when the player sees your motd. However if you really want to use this event, this is better practice and solves your issue: def load(&...
by Doldol
Fri Nov 28, 2014 3:14 pm
Forum: Plugin Development Support
Topic: Add bot with custom name
Replies: 16
Views: 10394

Ok. How about bot prefix? If you're using CS:S (does not work in CS:GO AFAIK): "bot_prefix" = "" game replicated - This string is prefixed to the name of all bots that join the game. <difficulty> will be replaced with the bot's difficulty. <weaponclass> will be replaced with the bot's desired weapo...
by Doldol
Fri Nov 21, 2014 10:09 pm
Forum: Plugin Development Support
Topic: Message localization
Replies: 13
Views: 8804

I would like to apologize to you. It seems that, while this value used to be used in CS:GO (like every other Valve game), it no longer is... I am not sure when or why that happened, and I am not sure how we are supposed to get the language to use outside of that value. This is the first mentioning ...
by Doldol
Thu Nov 20, 2014 3:21 pm
Forum: Plugin Development Support
Topic: color in hudhint
Replies: 10
Views: 8028

8guawong wrote:test and tell us! :cool:


I sadly don't have the space for a CS:GO dedi install.
by Doldol
Wed Nov 19, 2014 7:59 pm
Forum: Plugin Development Support
Topic: color in hudhint
Replies: 10
Views: 8028

Whoah! What about other html!?
by Doldol
Thu Nov 13, 2014 3:14 pm
Forum: Plugin Development Support
Topic: Custom params in event
Replies: 17
Views: 11163

satoon101 wrote:you can use the ClientConnect listener.


Why would that be preferred to player_activate? It doesn't get called on a map change and has different arguments? (And you can return False to disallow a player to join!? That's nice.)
by Doldol
Sun Nov 09, 2014 2:00 am
Forum: General Discussion
Topic: Debugging
Replies: 7
Views: 6681

I don't see what's wrong with examining logs? And isn't what you're suggesting already implemented? If my plugin contains an error it'll run until it encounters the spot of the error (your breakpoint) and throw an exception and logs it to where you specified (server console if you want). It even kee...
by Doldol
Fri Nov 07, 2014 6:43 pm
Forum: Plugin Development Support
Topic: How to hook CGameClient::ProcessVoiceData?
Replies: 9
Views: 16580

Well great! This seems to work! I do get 2 different reported pointers to ReadFromBuffer? They alternate ech time the function gets called. I haven't looked into it further. Also the bytes between what ToSting reports and what the buffer says are left seem to differ. I'm not sure whether I did this ...

Go to advanced search