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

Realistic Bullet: Real-Life Bullet physics to CS


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 , 23:51   Realistic Bullet: Real-Life Bullet physics to CS
Reply With Quote #1

REALISTIC BULLET

Real-Life Bullet physics to CS
Last Update: 02/11/2021




- Description
- This plugin reproduces the real life physic in bullets to the CS1.6's bullets. It supports bullet-drop from far away, ricochets, bullet penetration depending on the bullet's power and speed, new calculations to deal with the damage, such as distance, penetration, ricochets and more. Also, the plugin contains a lot of sounds effects that actually happens IRL, such as bullet crack when it is supersonic, bullet whizz as it passes by, ricochet sounds and depending of the texture such as concrete, metal and wood, there's a different hit sound for each one... Cool, huh?

- 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_use_penetration_factor - Either use the power of penetration or the bullet speed to calculate how many penetrations.

- Gameplay Videos



- 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 - 33 views - 55.1 KB)
File Type: ini realistic_bullet.ini (1.6 KB, 12 views)
File Type: zip Bullet Sounds.zip (680.0 KB, 12 views)
__________________

Last edited by EFFx; 02-11-2021 at 22:25.
EFFx is offline
Send a message via Skype™ to EFFx
Visinescu
Senior Member
Join Date: Dec 2015
Location: England now,Home Romania
Old 07-24-2018 , 04: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 , 07: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 , 09: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 offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 07-24-2018 , 15: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.
__________________

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

Good job
__________________
edon1337 is offline
Send a message via Skype™ to edon1337
Rivotril
Senior Member
Join Date: Feb 2014
Location: Argentina
Old 07-24-2018 , 18: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 , 21: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.
__________________

Last edited by EFFx; 07-24-2018 at 21:55.
EFFx is offline
Send a message via Skype™ to EFFx
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 07-26-2018 , 20: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.
__________________

Last edited by EFFx; 07-26-2018 at 20:50.
EFFx is offline
Send a message via Skype™ to EFFx
VoivoDpl
Junior Member
Join Date: Apr 2017
Old 09-13-2018 , 06: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 14:18.


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