FlashFun v1.0 re-release

Release your plugins here!
User avatar
BackRaw
Senior Member
Posts: 537
Joined: Sun Jul 15, 2012 1:46 am
Location: Germany
Contact:

Postby BackRaw » Tue Sep 30, 2014 7:28 am

8guawong wrote:
BackRaw wrote:
8guawong wrote:crashes on CSGO most likely due to weapon dropping~


Thanks for reporting. As the first post says, I just tested it for CS:S lol. But I have both games so I'll upload an update later.

EDIT: I'll upload an update without droppping the weapon, since that works fine for CS:S, too. You can test it for CS:GO, I will too when I get time.

EDIT 2: Update #4 -- version 2.2

Fixed an AttributeError considering '.faded' which didn't exist.
Changed SayText color to orange.
Doesn't drop a weapon before it's being removed now.


actually what was making it crash was the removing portion not the dropping :p

fixed by using

http://forums.sourcepython.com/showthread.php?613-Colored-Smoke&p=3202&viewfull=1#post3202

maybe not need to add hammerid for next version of SP

since http://forums.sourcepython.com/showthread.php?613-Colored-Smoke&p=3231&viewfull=1#post3231


Great! Thanks you, I'll update the zip later when I get home.
My Github repositories:

Source.Python: https://github.com/backraw
User avatar
BackRaw
Senior Member
Posts: 537
Joined: Sun Jul 15, 2012 1:46 am
Location: Germany
Contact:

Postby BackRaw » Mon Jan 19, 2015 12:28 am

#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!
My Github repositories:

Source.Python: https://github.com/backraw
User avatar
BackRaw
Senior Member
Posts: 537
Joined: Sun Jul 15, 2012 1:46 am
Location: Germany
Contact:

Postby BackRaw » Sun Jan 25, 2015 3:22 pm

Update!

#7 - version 4.0
- added highscore and a Top X menu, access via the Top Menu SayCommand:

Code: Select all

flashtop X
where X is a number higher than 0.
My Github repositories:

Source.Python: https://github.com/backraw
User avatar
BackRaw
Senior Member
Posts: 537
Joined: Sun Jul 15, 2012 1:46 am
Location: Germany
Contact:

Postby BackRaw » Mon Jan 26, 2015 11:39 pm

updated to verison 5.0:

feature list (first post)
My Github repositories:

Source.Python: https://github.com/backraw
User avatar
BackRaw
Senior Member
Posts: 537
Joined: Sun Jul 15, 2012 1:46 am
Location: Germany
Contact:

Postby BackRaw » Sat May 23, 2015 6:25 pm

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? =)
My Github repositories:

Source.Python: https://github.com/backraw
arawra
Senior Member
Posts: 190
Joined: Fri Jun 21, 2013 6:51 am

Postby arawra » Wed May 27, 2015 10:57 am

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

Postby satoon101 » Wed May 27, 2015 2:18 pm

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.
Image
User avatar
BackRaw
Senior Member
Posts: 537
Joined: Sun Jul 15, 2012 1:46 am
Location: Germany
Contact:

Postby BackRaw » Fri May 29, 2015 1:36 am

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.
My Github repositories:

Source.Python: https://github.com/backraw
User avatar
L'In20Cible
Project Leader
Posts: 1533
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Postby L'In20Cible » Fri May 29, 2015 2:28 am

Complete code, please.
User avatar
BackRaw
Senior Member
Posts: 537
Joined: Sun Jul 15, 2012 1:46 am
Location: Germany
Contact:

Postby BackRaw » Sat May 30, 2015 11:51 pm

My Github repositories:

Source.Python: https://github.com/backraw
User avatar
L'In20Cible
Project Leader
Posts: 1533
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Postby L'In20Cible » Sun May 31, 2015 1:01 am

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.
User avatar
BackRaw
Senior Member
Posts: 537
Joined: Sun Jul 15, 2012 1:46 am
Location: Germany
Contact:

Postby BackRaw » Sun May 31, 2015 10:49 pm

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! :D
My Github repositories:

Source.Python: https://github.com/backraw
User avatar
BackRaw
Senior Member
Posts: 537
Joined: Sun Jul 15, 2012 1:46 am
Location: Germany
Contact:

Re: FlashFun v1.0 re-release

Postby BackRaw » Tue Aug 14, 2018 1:32 pm

I rewrote the pluginand re-released it as version 1.0. See the first post for details. :)

Return to “Plugin Releases”

Who is online

Users browsing this forum: No registered users and 26 guests