Raised This Month: $12 Target: $400
 3% 

Realistic Bullet: Real-Life Bullet physics to CS - FINAL VERSION


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay       
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 07-23-2018 , 22:51   Realistic Bullet: Real-Life Bullet physics to CS - FINAL VERSION
Reply With Quote #1

REALISTIC BULLET


Release: 07/23/2018
Last Update: 02/24/2022

- Description
- This plugin is an attempt to re-create the real-life bullet physics for the Counter Strike 1.6. Follow the list of features:

1. Bullet crack when the bullet is supersonic
2. Bullet whizz when the bullet is subsonic.
3. Bullet drop when too far away from the end point of the bullet (bullet losing power and going down due gravity and air resistance).
4. Bullet penetrations. The bullet continues to penetrate entities until it loses enough power to not being able to penetrate anymore.
5. Bullet ricochet depending of the hit angle (controlled via .ini file).
6. Bullet bounce when it's velocity is too low.
7. Bullet rotation after every bounce, ricochet or penetrations.
8. Bullet view camera, so players can see where the bullet is going to.
9. Bullet sounds including bounce sound, hit sound depending of the texture or when ricocheting.
10. Bot support.
11. Equations to deal with damage, including distance, velocity, hit part of the body (obvious), ricochets and penetrations. The equation also support TK's.
12. Has a lot of bullet effects (use rbullet_trail_type to change).
13. Water physics.
14. Uses calculations to model an 'air resistance'.
15. Ability to change velocity, ricochet angle, bullet base damage, gravity or power of penetration using the .ini file.

- Cvars
rbullet_shotgunburst - How many bullets will be created in shotguns.
rbullet_trail - Bullet trail
rbullet_trail_color - Bullet trail color
rbullet_trail_color_intensity - Bullet trail color intensity
rbullet_trail_type - Bullet trail type
rbullet_trail_life - Bullet trail life
rbullet_ffa - FFA Mode (kill teammates)
rbullet_bullet_camera - Bullet's camera view when traveling
rbullet_allow_tradekills - Trade kill
rbullet_allow_penetration - Manages bullet penetration
rbullet_allow_ricochet - Manages bullet ricochet
rbullet_show_default_path - Displays the default path compared to the physics added
rbullet_default_trail_color - Beam color of the default path


Gameplay Images







- Gameplay Videos (old versions)



- Impact sounds, ricochet, bullet whizz and bullet crack due
supersonic speed and bullet's camera view demonstrations:



- More details about impact sounds, bullet crack and whizz from
players far away from you.



- All damage checks avaliable




- Credits
Ricochet plugin, found here - https://forums.alliedmods.net/showthread.php?t=101383
Wall thickness code to calculate the penetration - https://forums.alliedmods.net/showpo...69&postcount=8

- Change log
Spoiler
Attached Files
File Type: sma Get Plugin or Get Source (realisticBullet.sma - 459 views - 68.1 KB)
File Type: ini realistic_bullet.ini (1.6 KB, 396 views)
File Type: zip Bullet Sounds.zip (720.4 KB, 466 views)
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 04-02-2022 at 18:16.
EFFx is offline
Visinescu
Senior Member
Join Date: Dec 2015
Location: England now,Home Romania
Old 07-24-2018 , 03:02   Re: Bullet Speed Management
Reply With Quote #2

Keep up the good work ツ !
Visinescu is offline
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 07-24-2018 , 06:44   Re: Bullet Speed Management
Reply With Quote #3

awwsome i gotta test this
__________________
SED LYF !!!
SHIELD755 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-24-2018 , 08:11   Re: Bullet Speed Management
Reply With Quote #4

Did you try using FM_PlayBackEvent instead of CurWeapon? It's the proper way to detect each individual weapon shot.
__________________
HamletEagle is online now
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 07-24-2018 , 14:06   Re: Bullet Speed Management
Reply With Quote #5

I'll check this out.

OBS: Try using slowbullet_speed 100, is so cool. Looks like Matrix.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 07-24-2018 at 14:07.
EFFx is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-24-2018 , 15:51   Re: Bullet Speed Management
Reply With Quote #6

Good job
__________________
edon1337 is offline
Rivotril
Senior Member
Join Date: Feb 2014
Location: Argentina
Old 07-24-2018 , 17:11   Re: Bullet Speed Management
Reply With Quote #7

Amazing job!
Rivotril is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 07-24-2018 , 20:48   Re: Bullet Speed Management
Reply With Quote #8

Updated to v1.1:

Code:
- Fixed a log error with the pev().
- Changed the weapon fire function, and with it, the recoil is now avaliable.
- Changed  the default value of the bullet speed.
- Removed the chatcolor include (not necessary)
Also, thank you guys.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 07-24-2018 at 20:55.
EFFx is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 07-26-2018 , 19:46   Re: Bullet Speed Management
Reply With Quote #9

Updated to v1.2:

Code:
. Fixed the damage block (sometimes it wasn't blocking)
. Fixed the deathmsg message (it shows now the weapon icon).
. Changed the way to set sv_maxvelocity in the plugin, sometimes it wasn't setting the value.
Observation:
I figured out that when you catch the death of anyone, with Ham_Killed or DeathMsg, sometimes the weapon id is not passed, so, I recommend to use get_user_weapon() to get the killer's weapon ID.

Like:

1. DeathMsg

PHP Code:
register_event("DeathMsg""event_DeathMsg""a"
PHP Code:
public event_DeathMsg()
{
    new 
iKiller read_data(1), szWeapon[32]
    
get_weaponname(get_user_weapon(iKiller), szWeaponcharsmax(szWeapon))
    
log_amx("iKillerID: %d, iVictimID: %d, Killer's WeaponName: %s"iKillerread_data(2), szWeapon[7])

Output:

Code:
iKillerID: 1, iVictimID: 6, Killer's WeaponName: ak47
2. Ham_Killed

PHP Code:
RegisterHam(Ham_Killed"player""ham_PlayerKilled"
PHP Code:
public ham_PlayerKilled(iVictimiKilleriShouldGib)
{
    new 
szWeapon[32]
    
get_weaponname(get_user_weapon(iKiller), szWeaponcharsmax(szWeapon))
    
log_amx("iKillerID: %d, iVictimID: %d, Killer's WeaponName: %s"iKillerread_data(2), szWeapon[7])

Output:

Code:
[bulletSpeed.amxx] iKillerID: 1, iVictimID: 28, Killer's WeaponName: ak47
So, both works. And I know that the player can throw a nade, change to AK47, kill the enemy with the HE, and it'll pass the weapon ID as AK47 (due the get_user_weapon() native), but, that barely happens. For now, it's the best way.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 07-26-2018 at 19:50.
EFFx is offline
VoivoDpl
Junior Member
Join Date: Apr 2017
Old 09-13-2018 , 05:31   Re: Bullet Speed Management
Reply With Quote #10

This doesn't block original damage / original "bullets" (at least for me). Also it doesn't support hit places and wallshots right ? And if shooting through "walls" would be added I recommend adding variable penetration based on weapon, texture and bullet travel distance .
VoivoDpl 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 06:50.


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