AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   New Plugin Submissions (https://forums.alliedmods.net/forumdisplay.php?f=26)
-   -   [Weapon] Newcomen (https://forums.alliedmods.net/showthread.php?t=298521)

Celena Luna 06-14-2017 16:57

[Weapon] Newcomen
 
1 Attachment(s)


A steam-operated submachine gun fed with 30 rounds of 4.6×30mm based on the H&K MP7. It is equipped with a Steam Engine that accumulates its damage for each shot and a 30-round burst as the secondary fire function.

Advantage
  • High rate of fire
  • Low recoil
  • Has burst fire mode
  • Very high damage in burst fire mode

Disadvantage
  • Low damage in normal mode
  • Long reloading time
  • Easy to run dry
  • Damage decreases over range in both modes
  • Inaccurate at long range in both modes


cmd: admin_get_newcomen

The file included 2 version, 1 for Zombie Plague (5.0) and 1 for normal with Admin command.

Change Log
  • 1.4: Release
  • 1.5.1: Fix & Optimized

If you have any problem, please let me know and I will fix it ^^

kristi 06-16-2017 06:18

Re: [Weapon] Newcomen
 
Remove the .amxx file, it is not allowed to upload compiled plugins here.

D3XT3R 06-16-2017 10:52

Re: [Weapon] Newcomen
 
Nice Job!

Natsheh 06-16-2017 18:37

Re: [Weapon] Newcomen
 
PHP Code:

public fw_TraceAttack_World(VictimAttackerFloat:DamageFloat:Direction[3], PtrDamageBits)
{
    if(!
is_user_connected(Attacker)) // this check is unnecessary.
        
return HAM_IGNORED    
    
if(get_user_weapon(Attacker) != CSW_MP5NAVY || !g_has_newcomen[Attacker])
        return 
HAM_IGNORED
        
    
static Float:flEnd[3], Float:vecPlane[3]
        
    
get_tr2(PtrTR_vecEndPosflEnd)
    
get_tr2(PtrTR_vecPlaneNormalvecPlane)      //this is not used so its useless.    
            
    
Make_BulletHole(AttackerflEndDamage)
    
    
SetHamParamFloat(3float(DAMAGE))
    
    return 
HAM_HANDLED


I checked the code it does need some optimization. Like use either is user alive or is user connected dont use both of them in the same check.

Use ham item deploy forward instead of hooking curweapon event its better.

And the video is not available.

Heres the correct link

iclassdon 06-16-2017 19:09

Re: [Weapon] Newcomen
 
Nice Job !

NITRO_GOD 06-17-2017 07:36

Re: [Weapon] Newcomen
 
Gj Luna :D :up:

PS:
Quote:

Modification: ALL Category: Admin Commands
Quote:

Modification: Counter-Strike Category: Gameplay

Celena Luna 06-18-2017 11:11

Re: [Weapon] Newcomen
 
@Natsheh Thank you ^^
I optimized it and remove parts that unnecessary ^^

Natsheh 06-19-2017 01:56

Re: [Weapon] Newcomen
 
Quote:

Originally Posted by Celena Luna (Post 2529624)
@Natsheh Thank you ^^
I optimized it and remove parts that unnecessary ^^

Youre welcomed.

1 problem you forgot to remove ths hook

register_event("CurWeapon","CurrentWeapon","b e","1=1")

Also a bug in death function
PHP Code:

public Death(id)   // theres no parameters are passed here
{
    new 
victim read_data(2

    if(!
g_has_newcomen[victim])// this must be if positive set to false, or you can set it directly false without a check.
        
g_has_newcomen[victim] = false



Celena Luna 06-19-2017 06:57

Re: [Weapon] Newcomen
 
Quote:

Originally Posted by Natsheh (Post 2529752)
Youre welcomed.

1 problem you forgot to remove ths hook

register_event("CurWeapon","CurrentWeapon","b e","1=1")

Also a bug in death function
PHP Code:

public Death(id)   // theres no parameters are passed here
{
    new 
victim read_data(2

    if(!
g_has_newcomen[victim])// this must be if positive set to false, or you can set it directly false without a check.
        
g_has_newcomen[victim] = false



Silly me :<
Fixed and Updated


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

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