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

Pump Knockback (v3x & Chronic)


Post New Thread Reply   
 
Thread Tools Display Modes
gummybear
Member
Join Date: Mar 2008
Location: Singapore
Old 03-28-2008 , 07:59   Re: Pump Knockback (v3x & Chronic)
Reply With Quote #41

Quote:
Originally Posted by cs1.6 View Post
Yea ..ask v3x for a version or i can post it.

gummybear

you have one +karma from me for the cool nickname
I love the gummy baers!
guuuuumy baaaeeeers... da da daa
hahaha cool stuff, i get that alot in games hahah.

you have a knockback plugin?
gummybear is offline
Send a message via MSN to gummybear
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-28-2008 , 18:42   Re: Pump Knockback (v3x & Chronic)
Reply With Quote #42

Adding more weapons (7 posts up): http://forums.alliedmods.net/showthr...548#post602548

CS weapon constants: http://www.amxmodx.org/funcwiki.php?...d=4#const_cswp

Good luck (:
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
SuperSirius
New Member
Join Date: Aug 2006
Old 03-30-2008 , 15:25   Re: Pump Knockback (v3x & Chronic)
Reply With Quote #43

I know it's possible to make it so that it requires the attacker to do an amount of damage or higher that can be set by a cvar. It's just I don't know where to start it or even know how to start the thing.


PHP Code:
new cvar_pump_active cvar_pump_force;
public 
plugin_init()
{
 
register_plugin(PLUGIN VERSION AUTHOR);
 
register_event("Damage" "event_Damage" "b" "2>0");
 
cvar_pump_active   register_cvar("pump_knockback" "1");
 
cvar_pump_force    register_cvar("pump_force"     "10");


would I need to do add the cvar_pump_damage_required to new and then add below the new cvar

PHP Code:
new cvar_pump_active cvar_pump_force cvar_pump_damage_required;
public 
plugin_init()
{
 
register_plugin(PLUGIN VERSION AUTHOR);
 
register_event("Damage" "event_Damage" "b" "2>0");
 
cvar_pump_active   register_cvar("pump_knockback" "1");
 
cvar_pump_force    register_cvar("pump_force"     "10");
 
cvar_pump_damage_req   register_cvar("pump_damage_required" "30");

SuperSirius is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-30-2008 , 15:42   Re: Pump Knockback (v3x & Chronic)
Reply With Quote #44

Simple! Test this out. If it works I'll release it as v2.0.

pump_damage_req 30

Attached Files
File Type: sma Get Plugin or Get Source (pump_knockback.sma - 805 views - 2.2 KB)
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
SuperSirius
New Member
Join Date: Aug 2006
Old 03-30-2008 , 15:50   Re: Pump Knockback (v3x & Chronic)
Reply With Quote #45

nice I will see what I can do and thank you man I guess I was sort of right.

Plus you could make a distance modifier possiblility which you can set the distance.

Last edited by SuperSirius; 03-30-2008 at 16:03.
SuperSirius is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 03-30-2008 , 16:11   Re: Pump Knockback (v3x & Chronic)
Reply With Quote #46

Quote:
Originally Posted by SuperSirius View Post
Plus you could make a distance modifier possiblility which you can set the distance.
If I'm correct, Chronic hardcoded that into it already. I'm not good with math and numbers so I'm unable to modify it.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
SuperSirius
New Member
Join Date: Aug 2006
Old 03-30-2008 , 16:30   Re: Pump Knockback (v3x & Chronic)
Reply With Quote #47

Yea I guess he did.

PHP Code:
 if(floatabs(origin2[0])>largestnumlargestnum floatabs(origin2[0]);
 if(
floatabs(origin2[1])>largestnumlargestnum floatabs(origin2[1]);
 
 
origin2[0] /= largestnum;
 
origin2[1] /= largestnum;
 
 
velocity[0] = ( origin2[0] * (get_pcvar_float(cvar_pump_force) * 3000) ) / get_entity_distance(victim attacker);
 
velocity[1] = ( origin2[1] * (get_pcvar_float(cvar_pump_force) * 3000) ) / get_entity_distance(victim attacker);
 if(
velocity[0] <= 20.0 || velocity[1] <= 20.0)
  
velocity[2] = random_float(200.0 275.0);
 
 return 
1;


We just tested it and it works pretty good. The force and damage can be set to a perfect setting to what you like.
SuperSirius is offline
hoboman
Senior Member
Join Date: Jul 2007
Old 04-02-2008 , 15:26   Re: Pump Knockback (v3x & Chronic)
Reply With Quote #48

wuts the difference between this and http://forums.alliedmods.net/showthread.php?p=119498
__________________
hoboman is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 04-02-2008 , 21:21   Re: Pump Knockback (v3x & Chronic)
Reply With Quote #49

It's more mathematical.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Chef^^
Junior Member
Join Date: Jan 2007
Old 09-18-2008 , 08:55   Re: Pump Knockback (v3x & Chronic)
Reply With Quote #50

This isnt "realistic" as its a movie myth that you'll get thrown back couple of meters when someone shoots you with a shotgun. You will get thrown as much back as the weapon kicks back the shooter! - Source Mythbusters

But yeah I love this mod for the sake that it gives a meaning to buy a pump shotgun (I love the pump sg )! Only thing wrong about it ( or actually this thread) is the fact that you are claiming its realistic, yeah You can set it with a cvar but still it somehow irriatates me. Not trying to bash you or anything, I love your plugins and admire you as a coder!
Chef^^ is offline
Reply



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 05:36.


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