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

Weapons MaxSpeed


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay        Approver:   Arkshine (91)
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-02-2010 , 08:49   Weapons MaxSpeed
Reply With Quote #1

Weapons MaxSpeed




.: Description :.


This plugin lets you alter weapons maxspeed, also when zoomed or when player has a shield.
Plugin was requested by sooN.



.: Commands :.

  • amx_weapon_maxspeed <weapon shortname> <maxspeed> [zoom maxspeed] [shield maxspeed]
    • weapon shortname : See list below
    • maxspeed : Default MaxSpeed, set 0 to disable the plugin on a specific weapon
    • zoom maxspeed : MaxSpeed when weapon is zoomed
    • shield maxspeed : MaxSpeed when player uses shield


Weapons short names are :
  • p228
  • scout
  • hegrenade
  • xm1014
  • c4
  • mac10
  • aug
  • smokegrenade
  • elite
  • fiveseven
  • ump45
  • sg550
  • galil
  • famas
  • usp
  • glock18
  • awp
  • mp5navy
  • m249
  • m3
  • m4a1
  • tmp
  • g3sg1
  • flashbang
  • deagle
  • sg552
  • ak47
  • knife
  • p90


Default Maxspeeds are :

Code:
|---------------------------------------------------------------------|
| Weapon Name         | No Zoom Speed |   Zoom Speed  |  Shield Speed |
|---------------------|---------------|---------------|---------------|
| weapon_p228         |        250.0  |               |        180.0  |
| weapon_scout        |        260.0  |        220.0  |               |
| weapon_hegrenade    |        250.0  |               |        180.0  |
| weapon_xm1014       |        240.0  |               |               |
| weapon_c4           |        250.0  |               |               |
| weapon_mac10        |        250.0  |               |               |
| weapon_aug          |        240.0  |               |               |
| weapon_smokegrenade |        250.0  |               |        180.0  |
| weapon_elite        |        250.0  |               |               |
| weapon_fiveseven    |        250.0  |               |        180.0  |
| weapon_ump45        |        250.0  |               |               |
| weapon_sg550        |        210.0  |        150.0  |               |
| weapon_galil        |        240.0  |               |               |
| weapon_famas        |        240.0  |               |               |
| weapon_usp          |        250.0  |               |        180.0  |
| weapon_glock18      |        250.0  |               |        180.0  |
| weapon_awp          |        210.0  |        150.0  |               |
| weapon_mp5navy      |        250.0  |               |               |
| weapon_m249         |        220.0  |               |               |
| weapon_m3           |        230.0  |               |               |
| weapon_m4a1         |        230.0  |               |               |
| weapon_tmp          |        250.0  |               |               |
| weapon_g3sg1        |        210.0  |        150.0  |               |
| weapon_flashbang    |        250.0  |               |        180.0  |
| weapon_deagle       |        250.0  |               |        180.0  |
| weapon_sg552        |        235.0  |        200.0  |               |
| weapon_ak47         |        221.0  |               |               |
| weapon_knife        |        250.0  |               |        180.0  |
| weapon_p90          |        245.0  |               |               |
|---------------------------------------------------------------------|


.: Modules :.


FakeMeta
HamSandwich



.: Notes :.


If you don't set the maxspeed for zoomed of shield, when the weapon is zoomed or player uses shield, default maxspeed value will be used.
Set it if you don't want that the plugin default value is used.

Examples :

amx_weapon_maxspeed usp 270
->
default maxspeed : 270
shield maxspeed : 270


amx_weapon_maxspeed usp 270 0 210
->
default maxspeed : 270
shield maxspeed : 210



amx_weapon_maxspeed usp 0
->
default maxspeed : 250
shield maxspeed : 180



Make sure that server cvars sv_maxspeed and sv_maxvelocity are set in consequence to the plugin settings.
Also, you have to alter client cvars cl_forwardspeed, cl_backspeed and cl_sidespeed if you want to have more than 400 as maxspeed.




Attached Files
File Type: sma Get Plugin or Get Source (weapons_maxspeed.sma - 6873 views - 4.4 KB)
__________________
- tired and retired -

Last edited by ConnorMcLeod; 10-02-2010 at 11:18.
ConnorMcLeod is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-02-2010 , 09:32   Re: Weapons MaxSpeed
Reply With Quote #2

Why clamping to 2000 instead of sv_maxvelocity ?
Also people may not aware it would need to modify the client cvar manually after 320. A note should be added since that's not integrated into the plugin.
__________________
Arkshine is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-02-2010 , 09:56   Re: Weapons MaxSpeed
Reply With Quote #3

Changed to 3464, tell me if the value so you are granted that IsInWorld function is passed is wrong.

Code:
BOOL CBaseEntity :: IsInWorld( void )
{
	// position 
	if (pev->origin.x >= 4096) return FALSE;
	if (pev->origin.y >= 4096) return FALSE;
	if (pev->origin.z >= 4096) return FALSE;
	if (pev->origin.x <= -4096) return FALSE;
	if (pev->origin.y <= -4096) return FALSE;
	if (pev->origin.z <= -4096) return FALSE;
	// speed
	if (pev->velocity.x >= 2000) return FALSE;
	if (pev->velocity.y >= 2000) return FALSE;
	if (pev->velocity.z >= 2000) return FALSE;
	if (pev->velocity.x <= -2000) return FALSE;
	if (pev->velocity.y <= -2000) return FALSE;
	if (pev->velocity.z <= -2000) return FALSE;

	return TRUE;
}
__________________
- tired and retired -
ConnorMcLeod is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-02-2010 , 10:34   Re: Weapons MaxSpeed
Reply With Quote #4

That's not used on player. Even if it was, we should avoiding hardcoding as much we can.
__________________

Last edited by Arkshine; 10-02-2010 at 10:42.
Arkshine is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-02-2010 , 11:18   Re: Weapons MaxSpeed
Reply With Quote #5

Removed, would be crazy to set such a high value though.
__________________
- tired and retired -
ConnorMcLeod is offline
Kidev
Veteran Member
Join Date: Jun 2010
Location: France
Old 10-02-2010 , 19:28   Re: Weapons MaxSpeed
Reply With Quote #6

Holyshit! Nice plugin man!
__________________
Kidev is offline
yxin1
Junior Member
Join Date: Aug 2010
Old 10-03-2010 , 07:22   Re: Weapons MaxSpeed
Reply With Quote #7

can someone give me a definition of 'maxspeed'?
yxin1 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-03-2010 , 08:11   Re: Weapons MaxSpeed
Reply With Quote #8

Max speed (units per second) a player can gain when runing with a specific weapon.
See first post to know default weapons speed.
__________________
- tired and retired -
ConnorMcLeod is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 10-03-2010 , 22:22   Re: Weapons MaxSpeed
Reply With Quote #9

You could check for zoom if FOV is less than 90, because some plugins might set FOV above 90 and that's not zooming at all
__________________
Hunter-Digital is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-04-2010 , 01:53   Re: Weapons MaxSpeed
Reply With Quote #10

Quote:
Originally Posted by Hunter-Digital View Post
and that's not zooming at all
True
__________________
- tired and retired -
ConnorMcLeod 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 20:10.


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