Page 2 of 2
Posted: Tue Sep 30, 2014 7:28 am
by BackRaw
Great! Thanks you, I'll update the zip later when I get home.
Posted: Mon Jan 19, 2015 12:28 am
by BackRaw
#5 - version 3.0
- Complete rewrite - I guess it's much faster than the older versions, because it doesn't save each player in a dict anymore
- It first tries 'give_named_item()' for equipping a player, if that method doesn't exist, it uses a workaround which doesn't work for bots in CS:S, as it seems (don't know about CS:GO)
.
- added: spawn protection loop & effect
and, by the way, a clean zip file lol.
# 6 - version 3.0
- fixed weapon equipping, now everybody gets a flashbang!
Posted: Sun Jan 25, 2015 3:22 pm
by BackRaw
Update!
#7 - version 4.0
- added highscore and a Top X menu, access via the Top Menu SayCommand:
where X is a number higher than 0.
Posted: Mon Jan 26, 2015 11:39 pm
by BackRaw
Posted: Sat May 23, 2015 6:25 pm
by BackRaw
Updated to release 6.0:
Features removed:
- Highscore and say command !flashtop
- Explosion when hit
Features added:
- say command #ff
- Anti-deafen: players won't get deafened (both visually and auditory) any more by flashbangs!
NOTE: Only works with
May 21, 2015 release (and only tested on CS:S)!!
EDIT: Can somebody test this code on CS:GO? =)
Posted: Wed May 27, 2015 10:57 am
by arawra
Code: Select all
[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\flashfunsp\flashfunsp.py', line 298, in player_spawn
player.prepare()
File '..\addons\source-python\plugins\flashfunsp\flashfunsp.py', line 195, in prepare
self.equip(True)
File '..\addons\source-python\plugins\flashfunsp\flashfunsp.py', line 232, in equip
self.strip()
File '..\addons\source-python\plugins\flashfunsp\flashfunsp.py', line 166, in strip
self.flash_ammo = 0
File '..\addons\source-python\packages\source-python\entities\entity.py', line 118, in __setattr__
super(Entity, self).__setattr__(attr, value)
File '..\addons\source-python\plugins\flashfunsp\flashfunsp.py', line 144, in set_flash_ammo
self.set_property_int('localdata.m_iAmmo.012', value)
File '..\addons\source-python\packages\source-python\entities\entity.py', line 439, in set_property_int
self._set_property(name, 'int', value)
File '..\addons\source-python\packages\source-python\entities\entity.py', line 507, in _set_property
name, self.classname))
ValueError: Property 'localdata.m_iAmmo.012' not found for entity type 'player'
Posted: Wed May 27, 2015 2:18 pm
by satoon101
That is happening because there is no "localdata" in the CS:GO property. That value should really not be hard coded into this script, though. Instead of creating get_flash_ammo and set_flash_ammo, it should use get_flashbang_count and set_flashbang_count, which already get the correct values using our weapon data.
Posted: Fri May 29, 2015 1:36 am
by BackRaw
satoon101 wrote:That is happening because there is no "localdata" in the CS:GO property. That value should really not be hard coded into this script, though. Instead of creating get_flash_ammo and set_flash_ammo, it should use get_flashbang_count and set_flashbang_count, which already get the correct values using our weapon data.
Doh! I forgot these, thanks. I'll test right away
Edit: get/set_flashbang_ammo causes this:
Code: Select all
File '../addons/source-python/packages/source-python/players/weapons/projectiles.py', line 75, in <lambda>
temp['_is_filters'], temp['_not_filters']))
File '../addons/source-python/packages/source-python/players/weapons/projectiles.py', line 118, in _get_projectile_ammo
return self._get_weapon_ammo(classname, is_filters, not_filters)
File '../addons/source-python/packages/source-python/players/weapons/__init__.py', line 54, in _get_weapon_ammo
index = self.get_weapon_index(classname, is_filters, not_filters)
File '../addons/source-python/packages/source-python/players/weapons/__init__.py', line 304, in get_weapon_index
for index in self.weapon_indexes(classname, is_filters, not_filters):
File '../addons/source-python/packages/source-python/players/weapons/__init__.py', line 341, in weapon_indexes
edict = Entity(index)
File '../addons/source-python/packages/source-python/entities/entity.py', line 59, in __new__
'Index '{0}' is not a proper entity index.'.format(index))
ValueError: Index '48' is not a proper entity index.
Posted: Fri May 29, 2015 2:28 am
by L'In20Cible
Complete code, please.
Posted: Sat May 30, 2015 11:51 pm
by BackRaw
Posted: Sun May 31, 2015 1:01 am
by L'In20Cible
Thats normal. I will have to update the check into weapon_indexes. It is currently testing for None but need to check against INVALID_ENTITY_INDEX due to conversions changes I pushed some time ago. Thanks for reporting.
Posted: Sun May 31, 2015 10:49 pm
by BackRaw
L'In20Cible wrote:Thats normal. I will have to update the check into weapon_indexes. It is currently testing for None but need to check against INVALID_ENTITY_INDEX due to conversions changes I pushed some time ago. Thanks for reporting.
Glad to help, thanks!
Re: FlashFun v1.0 re-release
Posted: Tue Aug 14, 2018 1:32 pm
by BackRaw
I rewrote the pluginand re-released it as version 1.0. See the first post for details. :)