Raised This Month: $94 Target: $400
 23% 

Real Weapon Weight 0.7


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   General Purpose        Approver:   Emp` (115)
shine771
Senior Member
Join Date: Jun 2007
Location: Latvia
Old 06-17-2008 , 15:27   Real Weapon Weight 0.7
Reply With Quote #1

Real Weapon Weight
0.7


Description: This plugin is supposed to make CS More realistic. As you all know every weapon has its own maxspeed. Like Knife: 250, m4a1: 230. So when you run with knife you run with 250 speed. This plugin calculates the weight of all weapons and then sets the users maxspeed depending on weapon in your hands. I know that someone didn't understand what i wrote above so...:
Quote:
Let's say i have - knife, usp, m4a1
We have base speed - 280(speed without ANY weapons(including knife))

Knife weights 10 weight points
Usp weights 11 weight points
M4A1 weights 19 weight points
10+11+19 = 40points

To get the speed we'll run with weapons whose maxspeed is 250 we should do like this:

BASEPOINTS - PlayerPoints
280 - 40 = 240(this is the speed with weapons which max speed is 250)

So if we have those 3 weapons and Knife(maxspeed 250) is in our hands we'll run with 240 speed.
If we'll have usp(maxspeed 250) in our hands we'll run with 240 maxspeed.
If we'll have m4a1(maxspeed 230) in our hands we'll run with 220 maxspeed.(Maxspeed = MaxPlayerSpeed-MaxWeaponSpeed).
If it's still hard to understand... just test the plugin in-game. You'll get the idea, fast.

Cvars:
amx_rww <1/0> <On/Off>
amx_rww_basespeed <###> <The speed you'll run without any weapons>

Includes:
Quote:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
Changes:
v0.7
*Initial Release

Download the compiled version, because web compiler doesn't support Hamsandwich module.

You must have AMXX 1.8.0 or higher to use this plugin. If you have >1.8.0 then just download hamsandwich module.



Attached Files
File Type: sma Get Plugin or Get Source (real_weapon_weight.sma - 3287 views - 2.1 KB)
File Type: amxx real_weapon_weight.amxx (4.0 KB, 1181 views)
__________________

Last edited by shine771; 06-18-2008 at 06:21.
shine771 is offline
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 06-17-2008 , 17:44   Re: Real Weapon Weight 0.7
Reply With Quote #2

Code:
public player_spawn(id) if(is_user_alive(id) && get_pcvar_num(onoff)) update_speed(id) public cur_weapon(id) if(is_user_alive(id) && get_pcvar_num(onoff)) update_speed(id) public update_speed(id) {     if(!is_user_alive(id) || !get_pcvar_num(onoff)) return PLUGIN_CONTINUE

You have a double check for if the user is alive and the cvar is set to !0. Recommendation would be to remove the check from the player_spawn and cur_weapon functions.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
AntiBots
Veteran Member
Join Date: May 2008
Location: La Plata, Bs As, Argenti
Old 06-17-2008 , 17:47   Re: Real Weapon Weight 0.7
Reply With Quote #3

I put now in my server an i Test.
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
shine771
Senior Member
Join Date: Jun 2007
Location: Latvia
Old 06-17-2008 , 17:50   Re: Real Weapon Weight 0.7
Reply With Quote #4

Ok i fixed that. Didn't make a new version because that just a little optimization. I'll include it in next versions changelog. Where i'm going to add a meter that shows how much overweight you have(like green - near 250, red - >230 e.c)
__________________
shine771 is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 06-17-2008 , 20:54   Re: Real Weapon Weight 0.7
Reply With Quote #5

I don't think that in reality pistol or knife really slows you down. But a primary weapon sure does so.
__________________
hleV is offline
WSZ
Junior Member
Join Date: Jun 2008
Old 06-18-2008 , 04:56   Re: Real Weapon Weight 0.7
Reply With Quote #6

hmm I can't compile this plugin.
shine please fix that.
WSZ is offline
shine771
Senior Member
Join Date: Jun 2007
Location: Latvia
Old 06-18-2008 , 06:21   Re: Real Weapon Weight 0.7
Reply With Quote #7

Forgot that web compiler doesn't support hamsandwich. Download the compiled version instead.
__________________
shine771 is offline
WSZ
Junior Member
Join Date: Jun 2008
Old 06-21-2008 , 05:01   Re: Real Weapon Weight 0.7
Reply With Quote #8

ok it's working very good thanks + karma for you
WSZ is offline
redboyke
Member
Join Date: May 2008
Old 06-22-2008 , 03:09   Re: Real Weapon Weight 0.7
Reply With Quote #9

Quote:
Originally Posted by shine771 View Post
Ok i fixed that. Didn't make a new version because that just a little optimization. I'll include it in next versions changelog. Where i'm going to add a meter that shows how much overweight you have(like green - near 250, red - >230 e.c)
can you give the spawntime fix please
cause i dont want the meter anyway.

thx
redboyke is offline
M249-M4A1
I <3 Mac
Join Date: May 2005
Location: Not interested
Old 06-23-2008 , 17:39   Re: Real Weapon Weight 0.7
Reply With Quote #10

Pretty cool. I thought it was just another maxspeed plugin but this plugin takes into account all weapons in the inventory.
__________________
M249-M4A1 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 23:08.


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