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

Subplugin Submission [ZP] Nemesis Control v 0.1


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
arvEL.
Senior Member
Join Date: Dec 2014
Location: Iraq
Old 11-15-2015 , 04:19   [ZP] Nemesis Control v 0.1
Reply With Quote #1

NEMESIS CONTROL v0.1
DESCRIPTION:
this plugin give nemesis a good control when the players shot nemesis
he will not stop it's remains moving

AUTHOR:
old source code by (ConnorMcLeod) developed by (arvEL.-)

NOTE:
i'm not professional programmer
only at the beginning of the road

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#pragma tabsize 0

native zp_get_user_nemesis(id)
new 
g_nemesis[33]

public 
plugin_init()
{
    
register_plugin("Nemesis control""0.1""ConnorMcLeod + arvEL.-")
    
register_event("HLTV""EventHLTV""a""1=0""2=0")
    
RegisterHam(Ham_Player_Jump"player""Player_Jump")
}

public 
EventHLTV()
{
    
set_task(0.1"Player_Jump")
}

public 
plugin_natives()
{
    
register_native("zp_get_user_zombie""native_get_user_zombie"1)
}

public 
Player_Jump(id)
{    
    if(!
zp_get_user_nemesis(id))
    return

    static 
iOldButtons iOldButtons pev(idpev_oldbuttons)
    if((
iOldButtons IN_JUMP && pev(idpev_flags) & FL_ONGROUND))
    {
    
iOldButtons &= ~IN_JUMP
    set_pev
(idpev_oldbuttonsiOldButtons)
    
set_pev(idpev_gaitsequence6)
    
set_pev(idpev_frame0.0)
    return
    }

    static 
iFlags iFlags pev(idpev_flags)
    if( !(
iFlags FL_ONGROUND) )
    {
        return
    }
    
    if(
iOldButtons IN_JUMP)
    {
        return
    }
    
    
set_pev(idpev_oldbuttonsiOldButtons IN_JUMP)
    static 
Float:fVelocity[3]
    
pev(idpev_velocityfVelocity)
    static 
Float:fFrameTimeFloat:fPlayerGravity
    global_get
(glb_frametimefFrameTime)
    
pev(idpev_gravityfPlayerGravity)
    new 
iLJ
    
if(    (pev(idpev_bInDuck) || iFlags FL_DUCKING)
    &&    
get_pdata_int(id356)
    &&  
pev(idpev_button) & IN_JUMP IN_DUCK == IN_JUMP IN_DUCK
    
&&    pev(idpev_flDuckTime))
    {
    static 
Float:fPunchAngle[3], Float:fForward[3]
    
pev(idpev_punchanglefPunchAngle)
    
fPunchAngle[0] = -5.0
    set_pev
(idpev_punchanglefPunchAngle)
    
global_get(glb_v_forwardfForward)
    
fVelocity[0] = fForward[0] * 560
    fVelocity
[1] = fForward[1] * 560
    fVelocity
[2] = 299.33259094191531084669989858532
    iLJ 
1
    
}    
    else
    {
    
fVelocity[2] = 268.32815729997476356910084024775
    
}
    
    
fVelocity[2] -= fPlayerGravity fFrameTime 0.5 get_cvar_pointer("sv_gravity")
    
set_pev(idpev_velocityfVelocity)
    
set_pev(idpev_gaitsequence6+iLJ)
    
set_pev(idpev_frame0.0)
}

public 
native_get_user_nemesis(id)
{
return 
g_nemesis[id];


Attached Files
File Type: sma Get Plugin or Get Source (NesmsisControl.sma - 805 views - 2.1 KB)
__________________
arvEL. is offline
Send a message via Skype™ to arvEL.
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 02:59.


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