Raised This Month: $66 Target: $400
 16% 

Bouncing bullets


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff        Approver:   VEN (29)
marcellus
Senior Member
Join Date: Mar 2004
Old 08-13-2007 , 13:42   Bouncing bullets
Reply With Quote #1

This plugin will make every bullets bouncing upon walls/floor.

cvars :
amx_showrebound 0 | 1 : will show the rebound of your bullet

You need Fakemeta and hamsandwich modules

I used the Detect fired particle creation/type/number/attack/obstacle/vector
tutorial by VEN. Thank you VEN.

v1.1 :
- clean up / optimize the code
- removed unnecessary code (thank you VEN again)
- detect now if CS or CZ is running then use correct decals (requested by vittu and thank you for the CS decals numbers)

v1.0 :
- initial release
Attached Files
File Type: sma Get Plugin or Get Source (warcs_ricochet.sma - 4500 views - 9.5 KB)
File Type: amxx warcs_ricochet.amxx (9.4 KB, 2734 views)
__________________
www.war-cs.com
french cz community

Last edited by marcellus; 06-29-2008 at 15:22.
marcellus is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-13-2007 , 16:32   Re: Bullets rebound
Reply With Quote #2

Code:
client_print(0, print_chat, "'%s' s'est pris un ricochet dans la tronche par '%s'", namev, namek)

You should use english language by default.
__________________
Arkshine is offline
Pnoibestylin
Member
Join Date: Nov 2006
Old 08-17-2007 , 22:58   Re: Bullets rebound
Reply With Quote #3

ahm so wat does this plugins exactly do?
bullets rebounding? i dont get what you mean.
Pnoibestylin is offline
Fredd
Veteran Member
Join Date: Jul 2007
Old 08-18-2007 , 09:51   Re: Bullets rebound
Reply With Quote #4

i saw the code but i don't really get it. but a quesition, will the rebounded bullets register damage if they hit a player\something breakable?
__________________
Need a private coder? AMXX, SourceMOD, MMS? PM me!
Fredd is offline
BlackMilk
Veteran Member
Join Date: Jun 2007
Old 08-18-2007 , 16:56   Re: Bullets rebound
Reply With Quote #5

Quote:
Originally Posted by marcellus View Post
The purpose of this plugin is to make bullets's rebound.

It has been tested on CZ only, but should work for CS 1.6 (but you will have to change the bullet holes decals in the plugin)

You need Fakemata (with create_tr2() and free_tr2()) and hamsandwich modules.

cvars:
sv_showrebound 0|1 : display the rebound of your bullet

I used the Detect fired particle creation/type/number/attack/obstacle/vector
tutorial by VEN. Thank you VEN.
Okay so as clarity for everyone this plugin should let players bounce around?

But does the bullet lose damage/speed upon bouncing off a surface? Will it bounce several times or just once? etc.
__________________
Mod:
User:
BlackMilk is offline
marcellus
Senior Member
Join Date: Mar 2004
Old 08-18-2007 , 22:58   Re: Bullets rebound
Reply With Quote #6

ok, sorry for my bad english.

with this plugin every bullets shots bounce upon a wall or floor or object ...

if you set sv_showrebound to 1, you will understand what i mean. i will try to post a screenshot soon.

The bullet bounce one time only and make damages with traceattack() function.

@BlackMilk : No, the bullet doesnt lose damage or speed and it will bounce one time only.
@arkshine : thank you but it is just a "test" message to let everyone put his own message instead. I have "translated" the message in english for clarity.
__________________
www.war-cs.com
french cz community

Last edited by marcellus; 06-29-2008 at 14:57.
marcellus is offline
Old 08-18-2007, 23:03
marcellus
This message has been deleted by marcellus.
Toster v2.1
Senior Member
Join Date: Oct 2006
Location: Latvia, Riga
Old 08-19-2007 , 04:21   Re: Bullets rebound
Reply With Quote #7

Can you add a cvar for how many times it will rebound?
__________________
I am 52% addicted to Counterstrike. What about you?
Toster v2.1 is offline
Send a message via Skype™ to Toster v2.1
BlackMilk
Veteran Member
Join Date: Jun 2007
Old 08-19-2007 , 08:28   Re: Bullets rebound
Reply With Quote #8

Oh well guess it won't hurt to give it a go.
__________________
Mod:
User:
BlackMilk is offline
vvg125
AMX Mod X Beta Tester
Join Date: Dec 2006
Location: Queens (Douglaston), New
Old 08-25-2007 , 02:42   Re: Bullets rebound
Reply With Quote #9

Quote:
Originally Posted by marcellus View Post
@arkshine : thank you but it is just a "test" message to let everyone put his own message instead. I have "translated" the message in english for clarity.
If it's meant to be changed by the user, make it a CVAR.
__________________
vvg125 is offline
Send a message via AIM to vvg125 Send a message via MSN to vvg125 Send a message via Yahoo to vvg125
VEN
Veteran Member
Join Date: Jan 2005
Old 09-09-2007 , 07:03   Re: Bullets rebound
Reply With Quote #10

Change fm_is_valid_ent(entity) to pev_valid(entity) and then you don't need to #include <fakemeta_util>

You better use engfunc(EngFunc_WriteCoord, ...) instead of write_coord(...), then you don't need to round vectors.

Also for example i do not see how g_shotgun_shot_particle_number[] is useful here. Snippets/tutorilas is to show you some scripting aspects/technique. You have to read and understand it not just copy/paste code blocks.

Last edited by VEN; 09-09-2007 at 07:06.
VEN 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 21:27.


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