Search found 159 matches

by Predz
Sat Mar 14, 2015 11:06 am
Forum: Plugin Development Support
Topic: Player Buttons
Replies: 10
Views: 6508

I found the function again.

Syntax: Select all

## Will display the current action being performed by the user. "+jump" is a value of 2. If no buttons are pressed an output of 0 is given.
<PlayerEntity>.get_last_user_command()
by Predz
Fri Mar 13, 2015 11:32 pm
Forum: Plugin Development Support
Topic: Player Buttons
Replies: 10
Views: 6508

Yeh I didn't use the "buttons" attribute directly. I think it was a function named "get_last_command" or something like that. Sorry am on phone atm, so can't check right now.

All i can tell you is the space bar outputs a value of 2 when pressed. As of right now ;)
by Predz
Fri Mar 13, 2015 10:28 pm
Forum: Plugin Development Support
Topic: Player Buttons
Replies: 10
Views: 6508

I played this quite a bit the other day, to make a double jump feature in CSGO. It always displays an integer indicating to which button/s are being held at that point. If you check a player's pressed buttons upon the "player_jump" event, you should get the integer 2. Unless you are holding another ...
by Predz
Sat Jan 17, 2015 12:27 pm
Forum: Plugin Development Support
Topic: unloading a sub module?
Replies: 3
Views: 3377

Inside the "unload" function of "test.py". Just run "module.unload()".

The problem is that the only reason an "unload" function is called upon in your "test.py" file is because when you unload a add-on using SourcePython it is programmed to call them. Unlike when you import a file directly.
by Predz
Thu Jan 01, 2015 4:19 pm
Forum: Plugin Development Support
Topic: Creating events of variable name without using the decorator?
Replies: 6
Views: 4924

Why don't you make _Handler inherit from list (or better yet, from set)? Or really, I imagine Registry itself could possibly do that instead. It was meant to inherit from list, hence the comment above. I just haven't got round to changing it yet. But didn't think about inheriting from set :D Also, ...
by Predz
Thu Jan 01, 2015 11:26 am
Forum: Plugin Development Support
Topic: Creating events of variable name without using the decorator?
Replies: 6
Views: 4924

I have done already in my Warcraft Source version if you would like to see. from events.manager import event_registry from filters.players import PlayerIter from warcraft._libs.logging import Log from warcraft._libs.player import getPlayer from warcraft._libs.registry import Registry ## Handler Clas...
by Predz
Thu Jan 01, 2015 11:19 am
Forum: General Discussion
Topic: round end after team is dead
Replies: 3
Views: 3505

Instead of forcing a round end, you could just iterate through all bomb entities and kill them all. Obviously upon round start. Then the only way to win is to kill the entire enemy team.
by Predz
Wed Dec 31, 2014 6:59 am
Forum: Code examples / Cookbook
Topic: Damaging a player
Replies: 12
Views: 16059

If I were you I would take a look at the available functions in PlayerEntity. "take_damage" is a function that is callable and should be supplied a "CTakeDamageInfo" instance. It relies that you have the correct signatures/offsets though. So this method may break at some point, b...
by Predz
Sat Dec 13, 2014 3:00 pm
Forum: Plugin Development Support
Topic: Developing a plugin for SP, need some personal support.
Replies: 3
Views: 3300

Hey Mahi. I don't know what "warcraft-like" plugin you are making atm, however I have been working on one for the past months. Basically a conversion of the current Warcraft Source for CSS, and I currently have about 5 working builds if you would like to see. I say this as I have gotten to a point i...
by Predz
Thu Nov 20, 2014 3:54 pm
Forum: Plugin Development Support
Topic: color in hudhint
Replies: 10
Views: 8090

I did a bit of testing on this and a lot of HTML codes seem to work. However stuff like ability to hyperlink and display images is still a mystery to me. A few codes I found that work. (<b>, <p>, <li>, <font>, <i>, etc) To display text larger than 64 units. You will have to use <table> and construct...
by Predz
Thu Nov 13, 2014 7:52 am
Forum: Plugin Development Support
Topic: Server cvar
Replies: 2
Views: 2938

Link Here

10 characters....
by Predz
Fri Oct 31, 2014 1:24 am
Forum: Whatever
Topic: Valve changing up their SteamID format, urh....
Replies: 1
Views: 4514

Ye I saw this a while back and realized that at some point databases in event-scripts would need to be updated or just reset. So I made a quick function in python that converts them for you, I have added it below if you want to use it. def convert(id): if isinstance(id, str): arg = i...
by Predz
Thu Oct 09, 2014 7:13 am
Forum: News & Announcements
Topic: A menus package is now available!
Replies: 26
Views: 61848

Is there anyway to specifically define which number value an Option is bound to? Because if you create an SimpleMenu which only contains text and you want a Back/Next/Close Button, it always starts from 1. Would prefer it if I could make it constant, like in Popuplib. So people don't get different B...
by Predz
Thu Oct 09, 2014 7:08 am
Forum: General Discussion
Topic: Happy Birthday La Muerte!!!
Replies: 8
Views: 6888

Muerte's Birthday :o

Must..resist..temptation to sing to him :D
by Predz
Sun Oct 05, 2014 2:11 pm
Forum: Plugin Development Support
Topic: How to emit sound??
Replies: 22
Views: 19241

It seems to work for me in a custom path. However I am playing the sound to everyone on the server. Does it make a difference? This is what I am using. import random from engines.sound import Sound from engines.sound import SOUND_FROM_WORLD from stringtables.downloads import Downloadables WCL_DOWNLO...
by Predz
Sun Oct 05, 2014 7:48 am
Forum: Plugin Development Support
Topic: PlayerEntity Attributes (Cash)
Replies: 14
Views: 10609

Thanks L'In2Cible. Will continue on my project now :D
by Predz
Sat Oct 04, 2014 8:25 pm
Forum: Plugin Development Support
Topic: PlayerEntity Attributes (Cash)
Replies: 14
Views: 10609

Did you set your own cash when you did this or just use "impulse"? Because the only way I get the error is by using: PlayerEntity(<index>).cash = <value> This will alter your cash in game, but then your cash attribute wont alter from the value set even when you obtain it again. ## DOESNT W...
by Predz
Sat Oct 04, 2014 8:06 pm
Forum: Plugin Development Support
Topic: PlayerEntity Attributes (Cash)
Replies: 14
Views: 10609

Have a look at this, this has been stripped from my long python file but still replicates the error. (Would post the 1000 line file but you hate me for scruffy coding :confused: from players.entity import PlayerEntity from events.manager import event_registry from players.helpers import index_from_u...
by Predz
Sat Oct 04, 2014 6:25 pm
Forum: Plugin Development Support
Topic: PlayerEntity Attributes (Cash)
Replies: 14
Views: 10609

That doesn't sound right. We don't cache that value, we retrieve it each time it is called. Can you post reproducible code so that we can figure out what is going on? It happens only if you saved PlayerEntity. Thanks guys. Works perfectly fine now. Didn't realize PlayerEntity needs to be called to ...
by Predz
Sat Oct 04, 2014 3:38 pm
Forum: Plugin Development Support
Topic: PlayerEntity Attributes (Cash)
Replies: 14
Views: 10609

class Boots(Identifiers.ITEM): ## Name of the item. name = 'Boots of Speed' ## Category this item fits into. category = 'Temporary Modifiers' ## Description of the item. description = 'A slight boost to your current speed, removes upon death.' ## Custom cost using in game cash. ($) cost = 3200 ## C...

Go to advanced search