Search found 190 matches

by arawra
Tue May 26, 2015 7:00 am
Forum: Plugin Development Support
Topic: Class attributes as Dictionary keys and values
Replies: 4
Views: 3335

This error is really confusing me. #This is the class that is called def __init__(self, userid): super().__init__(index_from_userid(userid)) PlayerDataDictionary[self.steamid]['last connected'] = int(time.clock()) PlayerDataDictionary[self.stea...
by arawra
Tue May 26, 2015 5:53 am
Forum: Plugin Development Support
Topic: Class attributes as Dictionary keys and values
Replies: 4
Views: 3335

E: Updated with full traceback
by arawra
Tue May 26, 2015 5:26 am
Forum: Plugin Development Support
Topic: Class attributes as Dictionary keys and values
Replies: 4
Views: 3335

Class attributes as Dictionary keys and values

[SP] Caught an Exception: Traceback (most recent call last): File '..\addons\source-python\packages\source-python\events\listener.py', line 93, in fire_game_event callback(game_event) File '..\addons\source-python\plugins\dnd\dnd.py', line 218, in player_spawn spawnee.reset() File '..\addons\source...
by arawra
Mon May 25, 2015 11:25 pm
Forum: Plugin Development Support
Topic: Menus
Replies: 1
Views: 1845

Menus

Are the menu changes finally added in, or is there still going to be some work done on them? I've gone through a bit of the information on the mailing lists but theres now quite a bit to sift through.

In addition, if they are final would someone mind writing an example?
by arawra
Thu Mar 12, 2015 6:15 am
Forum: Plugin Development Support
Topic: Giving information to a player
Replies: 4
Views: 3616

Giving information to a player

So with the addon I'm developing, I've got quite a bit of information to display. Is it still possible to embed websites into a dynamic MOTD-style message? What other ways are there to do this besides flooding a user's chat box or sending them popup menus?
by arawra
Thu Feb 19, 2015 8:30 pm
Forum: Plugin Development Support
Topic: Health not an attribute
Replies: 4
Views: 4050

I think I'm seeing some updates for entities to include their data again. Not on my dev box. Anything missing that I should be aware of?
by arawra
Mon Feb 02, 2015 6:46 am
Forum: Plugin Development Support
Topic: How to reset the player's sound to normal on player_blind?
Replies: 55
Views: 29293

When you're getting a pointer from a virtual function (correct term?) that returns a player, does it return a CCSPlayer object? How do you go about getting a PlayerEntity object out of that?
by arawra
Sun Jan 18, 2015 7:00 pm
Forum: Plugin Development Support
Topic: Health not an attribute
Replies: 4
Views: 4050

Health not an attribute

@Event def player_hurt(game_event): attacker_userid = game_event.get_int('attacker') victim_userid = game_event.get_int('userid') damage = game_event.get_int('dmg_health') attacker = dndPlayerDictionary[attacker_userid] victim = dndPlayerDicti...
by arawra
Sun Jan 18, 2015 1:48 am
Forum: Plugin Development Support
Topic: Multiple buffs/debuffs with various times
Replies: 5
Views: 4157

If I were to implement the methods as part of the class, could I call them using a variable as such?

Syntax: Select all

globals()[myPlayer.item]()
by arawra
Sun Jan 18, 2015 1:35 am
Forum: Plugin Development Support
Topic: Jan 15 release: AttributeError: 'Edict' object has no attribute 'get_property_int'
Replies: 6
Views: 4559

I thought I overwrote everything, will have to double check.
by arawra
Sun Jan 18, 2015 12:29 am
Forum: Plugin Development Support
Topic: Jan 15 release: AttributeError: 'Edict' object has no attribute 'get_property_int'
Replies: 6
Views: 4559

After the update, I'm not sure if players.entity or entities.entity has a health attribute anymore? [SP] Caught an Exception: Traceback (most recent call last): File '..\addons\source-python\packages\source-python\events\listener.py', line 90, in fire_game_event callback(game_event) File '..\addons\...
by arawra
Mon Jan 12, 2015 9:07 pm
Forum: Plugin Development Support
Topic: Detect stuck player
Replies: 9
Views: 8260

Is your player actually stuck when you run it? Thats the only time it will return true.
by arawra
Sun Jan 11, 2015 5:12 am
Forum: Plugin Development Support
Topic: Multiple buffs/debuffs with various times
Replies: 5
Views: 4157

Multiple buffs/debuffs with various times

As a continuation of my other thread, I would like to create a timer for various effects for players. Effects include things like healing, poisons, slows, etc etc. I think I've found an effective way to accomplish this and would like input on my implementation and API. statusEffectsList = ['drug...
by arawra
Thu Jan 01, 2015 6:52 pm
Forum: Plugin Development Support
Topic: Timed player regeneration
Replies: 6
Views: 4871

I got around to realizing that sometimes players may have more than one type of regeneration, and we probably should only be handling one a def heal(player, amount): # player is a PlayerEntity/dndPlayer object player.health += amount if player.health > player.maxhp: player.health = player.ma...
by arawra
Wed Dec 31, 2014 1:43 am
Forum: Code examples / Cookbook
Topic: Damaging a player
Replies: 12
Views: 16354

Is the damage still working? @Event def player_hurt(game_event): attacker_userid = game_event.get_int('attacker') victim_userid = game_event.get_int('userid') damage = game_event.get_int('dmg_health') attacker = dndPlayerDictionary[attacker_use...
by arawra
Wed Dec 31, 2014 12:59 am
Forum: Plugin Development Support
Topic: Entity set_color method
Replies: 1
Views: 1919

Entity set_color method

Whenever I try calling the set_color method, I keep getting a conversion error (Python int too large for C long).

Syntax: Select all

PlayerEntity(playerIndex).set_color((255,255,255,15))
by arawra
Wed Dec 31, 2014 12:35 am
Forum: Plugin Development Support
Topic: Timed player regeneration
Replies: 6
Views: 4871

Here is my second solution after looking at the wiki. def heal(player, amount): # player is a PlayerEntity/dndPlayer object player.health += amount if player.health > player.maxhp: player.health = player.maxhp def regenLoop(): for players in PlayerGenerator(): myPlayer = dndP...
by arawra
Wed Dec 31, 2014 12:18 am
Forum: Plugin Development Support
Topic: Timed player regeneration
Replies: 6
Views: 4871

If you would like to see exactly what I have (with a class and dictionary you largely developed :wink: ) here ya go. myPlayer.regen is the amount of health to regenerate. myPlayer.regentime is the delay in seconds between regeneration. If a player has a myPlayer.regen amount, you can assume they sho...
by arawra
Tue Dec 30, 2014 11:50 pm
Forum: Plugin Development Support
Topic: Timed player regeneration
Replies: 6
Views: 4871

Timed player regeneration

I'm trying to develop a way such that certain players regenerate health periodically. The time and amount of health varies by player. This is my first solution, and was wondering if anyone had a better idea. def regenLoop(tick=0): for players in PlayerGenerator(): myPlayer = playerDi...
by arawra
Tue Dec 30, 2014 5:33 pm
Forum: Plugin Development Support
Topic: Compiling issue
Replies: 7
Views: 4823

E: ----

Go to advanced search