Health not an attribute

Please post any questions about developing your plugin here. Please use the search function before posting!
arawra
Senior Member
Posts: 190
Joined: Fri Jun 21, 2013 6:51 am

Health not an attribute

Postby arawra » Sun Jan 18, 2015 7:00 pm

Syntax: Select all

@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 = dndPlayerDictionary[victim_userid]

tell(playerinfo_from_userid(attacker_userid), 'victim hp: %s'%victim.health)


Still not finding health as an attribute after updating from the Jan 17th release.

Top of \source-python\data\source-python\properties\player\csgo.ini

Code: Select all

[health]
prop = 'm_iHealth'
type = 'int'



E: Yeah looks like there were a lot of changes... doing a fresh install.
EE: After wiping csgo/addons/ and putting a fresh copy there, still same error. Windows x64
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Sun Jan 18, 2015 7:21 pm

We don't use ../addons/source-python/data/source-python/properties/ anymore, and that directory has been removed. I thought I had added health to csgo, but I must not have committed that change. Just as in the ../entities/managers/engines/orangebox/CBaseEntity.ini, the same for the csgo engine should have health listed as a KeyValue. We will fix that up soon and add more to csgo's data files when we can get them tested.
Image
Hedgehog
Member
Posts: 62
Joined: Sun Nov 03, 2013 8:54 pm

Postby Hedgehog » Sun Jan 18, 2015 7:57 pm

I've also found that speed KeyValue in CS:S is always 0.0, so it would be better to overwrite it in property section of CBasePlayer.ini to

Syntax: Select all

localdata.m_flLaggedMovementValue = speed
arawra
Senior Member
Posts: 190
Joined: Fri Jun 21, 2013 6:51 am

Postby arawra » Thu Feb 19, 2015 8:30 pm

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?
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Thu Feb 19, 2015 8:40 pm

We haven't posted a new release since this topic was started. Those have been added, though, so the next release will include them.
Image

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 65 guests