View Single Post
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 08-05-2021 , 10:35   Re: [L4D2] l4d2_weapons.inc
Reply With Quote #10

Also, as an improvement. I found quite non-convenient to create plugin uses your weapon Id system, if I need to store settings per-slot, because you have collision between melee id and primary weapon array id for slot 1, e.g.:

1 - weapon_pistol
20 - weapon_chainsaw
32 - weapon_pistol_magnum
0-16 - all melee (e.g. 1 = baseball_bat)

So, e.g. if I store weapon id = 1 in player's cookie for slot 1, there is no way to identify what weapon is it (pistol or baseball_bat).
Maybe, it make sense to shift indeces or rearrange them a bit to prevent those single collision.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline