AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Weapons MaxSpeed (https://forums.alliedmods.net/showthread.php?t=139521)

ConnorMcLeod 10-02-2010 07:49

Weapons MaxSpeed
 
3 Attachment(s)
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.





Arkshine 10-02-2010 08:32

Re: Weapons MaxSpeed
 
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.

ConnorMcLeod 10-02-2010 08:56

Re: Weapons MaxSpeed
 
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;
}


Arkshine 10-02-2010 09:34

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

ConnorMcLeod 10-02-2010 10:18

Re: Weapons MaxSpeed
 
Removed, would be crazy to set such a high value though.

Kidev 10-02-2010 18:28

Re: Weapons MaxSpeed
 
Holyshit! Nice plugin man!

yxin1 10-03-2010 06:22

Re: Weapons MaxSpeed
 
can someone give me a definition of 'maxspeed'?

ConnorMcLeod 10-03-2010 07:11

Re: Weapons MaxSpeed
 
Max speed (units per second) a player can gain when runing with a specific weapon.
See first post to know default weapons speed.

Hunter-Digital 10-03-2010 21:22

Re: Weapons MaxSpeed
 
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 :lol:

ConnorMcLeod 10-04-2010 00:53

Re: Weapons MaxSpeed
 
Quote:

Originally Posted by Hunter-Digital (Post 1315058)
and that's not zooming at all :lol:

True :mrgreen:


All times are GMT -4. The time now is 04:51.

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