This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Solved [L4D2]Exclude projectiles that have been thrown


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 01-13-2022 , 23:05   Re: [L4D2]Exclude projectiles that have been thrown
Reply With Quote #1

...awful code.
Anyway, you do know, projectiles are "used" grenades or missiles?
Example, player carry weapon_smokegrenade.
Player throw weapon_smokegrenade, weapon_smokegrenade get destroyed and smokegrenade_projectile appear, flying object in world. Then projectile get destroyed after few secongs after that throw.

If you want look player weapons, there few way:
-Loop to look all player weapon slots.
- Look player array, "m_hMyWeapons" and perhaps current weapon in hands "m_hMyWeapons"
My favourite.
- Or harder way, loop all weapon entities from world by FindEntityByClassName, look m_hOwner...

Then look ammo and clip amount.
From client "m_iAmmo" array, from weapon "m_iClip1"


Here example plugin about auto reload weapon, if you like check.
https://forums.alliedmods.net/showpo...38&postcount=3
__________________
Do not Private Message @me

Last edited by Bacardi; 01-13-2022 at 23:12.
Bacardi is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:44.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode