Reklam gösterimini engelleyici yazılım kullandığınızı görüyoruz.
Sitemizin ayakta kalıp sizlere hizmet edebilmek için en büyük gelir kaynağı sayfamızda gösterilen reklamlardır.
Reklam gösterimde bizim sayfamıza ayrıcalık tanıyarak ayakta kalmamıza destek olmak ister misiniz ?

Silinmiş Konu   | cvar ayarı

Konu

#1
Son Düzenleme: 24-06-2018, Saat: 01:55, Düzenleyen: 1damardan1.
sa arkadaşlar bu bıçağa cvar ayarları ekliyebilcek varmı acaba damage knockback gravity gibi elinde bıçak varken yüksek zıplama  1 roundluk mu kalıcımı olsun gibi 

PHP Kod:
#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
#include <cstrike>
#include <xs>
#include <zombieplague>

#define PLUGIN "[ZP] Extra Item: Dragon Sword"
#define VERSION "2.0"
#define AUTHOR "Dias Leon"

#define V_MODEL "models/v_dragonsword2.mdl"
#define P_MODEL "models/p_dragonsword.mdl"

#define CSW_DRAGONSWORD CSW_KNIFE
#define weapon_dragonsword "weapon_knife"
#define WEAPON_ANIMEXT "knife" //"skullaxe"

#define DRAW_TIME 1.0

#define SLASH_ROTATE_DAMAGE 250.0
#define SLASH_ROTATE_RADIUS 120.0
#define SLASH_ROTATE_POINT_DIS 60.0
#define SLASH_ROTATE_DELAY_TIME 0.7
#define SLASH_ROTATE_RESET_TIME 1.0

#define SLASH_AHEAD_DAMAGE 350.0
#define SLASH_AHEAD_RADIUS 100.0
#define SLASH_AHEAD_POINT_DIS 30.0
#define SLASH_AHEAD_DELAY_TIME 0.3
#define SLASH_AHEAD_RESET_TIME 0.9

#define STAB_DAMAGE 550.0
#define STAB_RADIUS 110.0
#define STAB_POINT_DIS 80.0
#define STAB_TIME 0.657
#define STAB_RESET_TIME 0.75

#define TASK_SLASHING 2033+20
#define TASK_STABING 2033+10

// OFFSET
const PDATA_SAFE 2
const OFFSET_LINUX_WEAPONS 4
const OFFSET_WEAPONOWNER 41
const m_flNextAttack 83
const m_szAnimExtention 492

new const DragonSword_Sound[8][] = 
{
    
"weapons/dragonsword_draw.wav",
    
"weapons/dragonsword_hit1.wav",
    
"weapons/dragonsword_hit2.wav",
    
"weapons/dragonsword_idle.wav",
    
"weapons/dragonsword_slash1.wav",
    
"weapons/dragonsword_slash2.wav",
    
"weapons/dragonsword_stab_hit.wav",
    
"weapons/dragonsword_wall.wav"
}

enum
{
    
ATTACK_SLASH_ROTATE 1,
    
ATTACK_SLASH_AHEAD,
    
ATTACK_STAB
}

enum
{
    
DS_ANIM_IDLE 0,
    
DS_ANIM_SLASH_ROTATE,
    
DS_ANIM_SLASH_AHEAD,
    
DS_ANIM_DRAW,
    
DS_ANIM_STAB_BEGIN,
    
DS_ANIM_STAB_END
}

enum
{
    
HIT_NOTHING 0,
    
HIT_ENEMY,
    
HIT_WALL
}

new 
g_DragonSword
new g_Had_DragonSword[33], g_Slashing_Mode[33], g_Attack_Mode[33], g_Checking_Mode[33], g_Hit_Ing[33]
new 
g_Old_Weapon[33], g_Ham_Botg_MaxPlayers

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event("HLTV""Event_NewRound""a""1=0""2=0")
    
register_event("CurWeapon""Event_CurWeapon""be""1=1")
    
    
register_forward(FM_EmitSound"fw_EmitSound")
    
register_forward(FM_CmdStart"fw_CmdStart")
    
register_forward(FM_TraceLine"fw_TraceLine")
    
register_forward(FM_TraceHull"fw_TraceHull")    
    
    
RegisterHam(Ham_TraceAttack"player""fw_PlayerTraceAttack")
    
    
g_MaxPlayers get_maxplayers()
    
//register_clcmd("admin_get_dragonsword", "get_dragonsword", ADMIN_KICK)
}

public 
plugin_precache()
{
    
engfunc(EngFunc_PrecacheModelV_MODEL)
    
engfunc(EngFunc_PrecacheModelP_MODEL)
    
    for(new 
0sizeof(DragonSword_Sound); i++)
        
engfunc(EngFunc_PrecacheSoundDragonSword_Sound[i])
        
    
g_DragonSword zp_register_extra_item("Dragon Sword"10ZP_TEAM_HUMAN)
}

public 
zp_user_infected_post(idremove_dragonsword(id)
public 
zp_extra_item_selected(idItemID)
{
    if(
ItemID == g_DragonSwordget_dragonsword(id)
}

public 
get_dragonsword(id)
{
    if(!
is_user_alive(id))
        return
        
    
remove_task(id+TASK_SLASHING)
    
remove_task(id+TASK_STABING)
        
    
g_Had_DragonSword[id] = 1
    g_Slashing_Mode
[id] = 0
    g_Attack_Mode
[id] = 0
    g_Checking_Mode
[id] = 0
    g_Hit_Ing
[id] = 0
    
    
if(get_user_weapon(id) == CSW_KNIFE)
    {
        
set_pev(idpev_viewmodel2V_MODEL)
        
set_pev(idpev_weaponmodel2P_MODEL)    
        
        
set_weapon_anim(idDS_ANIM_DRAW)
        
set_player_nextattack(idDRAW_TIME)
    } else {
        
engclient_cmd(idweapon_dragonsword)
    }
}

public 
remove_dragonsword(id)
{
    
remove_task(id+TASK_SLASHING)
    
remove_task(id+TASK_STABING)
        
    
g_Had_DragonSword[id] = 0
    g_Slashing_Mode
[id] = 0
    g_Attack_Mode
[id] = 0
    g_Checking_Mode
[id] = 0
    g_Hit_Ing
[id] = 0
}

public 
client_putinserver(id)
{
    if(!
g_Ham_Bot && is_user_bot(id))
    {
        
g_Ham_Bot 1
        set_task
(0.1"Do_RegisterHam_Bot"id)
    }
}

public 
Do_RegisterHam_Bot(id)
{
    
RegisterHamFromEntity(Ham_TraceAttackid"fw_PlayerTraceAttack")
}

public 
Event_NewRound()
{
    for(new 
0g_MaxPlayersi++)
        
remove_dragonsword(i)
}

public 
Event_CurWeapon(id)
{
    if(!
is_user_alive(id))
        return

    
// Problem Here ?. SHUT THE FUCK UP
    
if((read_data(2) == CSW_DRAGONSWORD && g_Old_Weapon[id] != CSW_DRAGONSWORD) && g_Had_DragonSword[id])
    {
        
set_pev(idpev_viewmodel2V_MODEL)
        
set_pev(idpev_weaponmodel2P_MODEL)
    
        
set_weapon_anim(idDS_ANIM_DRAW)
        
set_player_nextattack(idDRAW_TIME)
        
        
set_pdata_string(idm_szAnimExtention 4WEAPON_ANIMEXT, -20)
    }
        
    
g_Old_Weapon[id] = read_data(2)
}

public 
fw_EmitSound(idchannel, const sample[], Float:volumeFloat:attnflagspitch)
{
    if(!
is_user_connected(id))
        return 
FMRES_IGNORED
    
if(/*get_user_weapon(id) != CSW_DRAGONSWORD || */!g_Had_DragonSword[id])
        return 
FMRES_IGNORED
        
    
if(sample[8] == 'k' && sample[9] == 'n' && sample[10] == 'i')
    {
        if(
sample[14] == 's' && sample[15] == 'l' && sample[16] == 'a')
            return 
FMRES_SUPERCEDE
        
if (sample[14] == 'h' && sample[15] == 'i' && sample[16] == 't')
        {
            if (
sample[17] == 'w'// wall
            
{
                
g_Hit_Ing[id] = HIT_WALL
                
return FMRES_SUPERCEDE
            
} else {
                
g_Hit_Ing[id] = HIT_ENEMY
                
return FMRES_SUPERCEDE
            
}
        }
        if (
sample[14] == 's' && sample[15] == 't' && sample[16] == 'a')
            return 
FMRES_SUPERCEDE;
    }
    
    return 
FMRES_IGNORED
}

public 
fw_CmdStart(iduc_handleseed)
{
    if (!
is_user_alive(id)) 
        return
    if(
get_user_weapon(id) != CSW_DRAGONSWORD || !g_Had_DragonSword[id])
        return
    
    static 
entent fm_get_user_weapon_entity(idCSW_DRAGONSWORD)
    
    if(!
pev_valid(ent))
        return
    if(
get_pdata_float(ent46OFFSET_LINUX_WEAPONS) > 0.0 || get_pdata_float(ent47OFFSET_LINUX_WEAPONS) > 0.0
        return
    
    static 
CurButton
    CurButton 
get_uc(uc_handleUC_Buttons)
    
    if (
CurButton IN_ATTACK)
    {
        
set_uc(uc_handleUC_ButtonsCurButton & ~IN_ATTACK)
        
        if(!
g_Slashing_Mode[id])
        {
            
g_Attack_Mode[id] = ATTACK_SLASH_ROTATE
            g_Checking_Mode
[id] = 1
            ExecuteHamB
(Ham_Weapon_PrimaryAttackent)
            
g_Checking_Mode[id] = 0
    
            set_pev
(idpev_framerate1.5)
            
set_weapons_timeidle(idCSW_DRAGONSWORDSLASH_ROTATE_RESET_TIME)
            
set_player_nextattack(idSLASH_ROTATE_RESET_TIME)
            
            
set_weapon_anim(idDS_ANIM_SLASH_ROTATE)
            
set_task(SLASH_ROTATE_DELAY_TIME"Do_Slashing_Rotate"id+TASK_SLASHING)
        } else {
            
g_Attack_Mode[id] = ATTACK_SLASH_AHEAD
            g_Checking_Mode
[id] = 1
            ExecuteHamB
(Ham_Weapon_PrimaryAttackent)
            
g_Checking_Mode[id] = 0
            
            set_pev
(idpev_framerate2.0)
            
set_weapons_timeidle(idCSW_DRAGONSWORDSLASH_AHEAD_RESET_TIME)
            
set_player_nextattack(idSLASH_AHEAD_RESET_TIME)
            
            
set_weapon_anim(idDS_ANIM_SLASH_AHEAD)
            
set_task(SLASH_AHEAD_DELAY_TIME"Do_Slashing_Ahead"id+TASK_SLASHING)
        }
        
        
g_Slashing_Mode[id] = !g_Slashing_Mode[id]
    } else if (
CurButton IN_ATTACK2) {
        
set_uc(uc_handleUC_ButtonsCurButton & ~IN_ATTACK2)
        
        
g_Attack_Mode[id] = ATTACK_STAB
        g_Checking_Mode
[id] = 1
        ExecuteHamB
(Ham_Weapon_SecondaryAttackent)
        
g_Checking_Mode[id] = 0
        
        set_pev
(idpev_framerate1.5)
        
set_weapons_timeidle(idCSW_DRAGONSWORDSTAB_TIME 0.1)
        
set_player_nextattack(idSTAB_TIME 0.1)
        
        
set_weapon_anim(idDS_ANIM_STAB_BEGIN)
        
        
remove_task(id+TASK_STABING)
        
set_task(STAB_TIME"Do_StabNow"id+TASK_STABING)
    }
}

public 
Do_Slashing_Rotate(id)
{
    
id -= TASK_SLASHING
    
    
if(!is_user_alive(id))
        return
    if(
get_user_weapon(id) != CSW_DRAGONSWORD || !g_Had_DragonSword[id])
        return
        
    if(
Check_Attack(idATTACK_SLASH_ROTATE))
    {
        
emit_sound(idCHAN_WEAPONDragonSword_Sound[1], 1.0ATTN_NORM0PITCH_NORM)
    } else {
        if(
g_Hit_Ing[id] == HIT_WALLemit_sound(idCHAN_WEAPONDragonSword_Sound[7], 1.0ATTN_NORM0PITCH_NORM)
        else if(
g_Hit_Ing[id] == HIT_NOTHINGemit_sound(idCHAN_WEAPONDragonSword_Sound[4], 1.0ATTN_NORM0PITCH_NORM)
    }
    
    
g_Attack_Mode[id] = 0
    g_Hit_Ing
[id] = 0
}

public 
Do_Slashing_Ahead(id)
{
    
id -= TASK_SLASHING
    
    
if(!is_user_alive(id))
        return
    if(
get_user_weapon(id) != CSW_DRAGONSWORD || !g_Had_DragonSword[id])
        return
        
    if(
Check_Attack(idATTACK_SLASH_AHEAD))
    {
        
emit_sound(idCHAN_WEAPONDragonSword_Sound[2], 1.0ATTN_NORM0PITCH_NORM)
    } else {
        if(
g_Hit_Ing[id] == HIT_WALLemit_sound(idCHAN_WEAPONDragonSword_Sound[7], 1.0ATTN_NORM0PITCH_NORM)
        else if(
g_Hit_Ing[id] == HIT_NOTHINGemit_sound(idCHAN_WEAPONDragonSword_Sound[5], 1.0ATTN_NORM0PITCH_NORM)
    }
    
    
g_Attack_Mode[id] = 0
    g_Hit_Ing
[id] = 0
}

public 
Do_StabNow(id)
{
    
id -= TASK_STABING
    
    
if (!is_user_alive(id)) 
        return
    if(!
g_Had_DragonSword[id])
        return        
        
    
set_weapon_anim(idDS_ANIM_STAB_END)
    
    if(
get_user_weapon(id) != CSW_DRAGONSWORD)
    {
        
set_weapons_timeidle(idCSW_DRAGONSWORD0.0)
        
set_player_nextattack(id0.0)
    } else {
        
set_weapons_timeidle(idCSW_DRAGONSWORDSTAB_RESET_TIME)
        
set_player_nextattack(idSTAB_RESET_TIME)
    }        

    if(
Check_Attack(idATTACK_STAB))
    {
        
emit_sound(idCHAN_WEAPONDragonSword_Sound[1], 1.0ATTN_NORM0PITCH_NORM)
    } else {
        if(
g_Hit_Ing[id] == HIT_WALLemit_sound(idCHAN_WEAPONDragonSword_Sound[7], 1.0ATTN_NORM0PITCH_NORM)
        else if(
g_Hit_Ing[id] == HIT_NOTHINGemit_sound(idCHAN_WEAPONDragonSword_Sound[6], 1.0ATTN_NORM0PITCH_NORM)
    }

    
g_Attack_Mode[id] = 0
    g_Hit_Ing
[id] = 0
}


public 
Check_Attack(idMode)
{
    static 
Float:Max_DistanceFloat:Point[4][3], Float:TB_DistanceFloat:Point_Dis
    
    
if(Mode == ATTACK_SLASH_ROTATE)
    {
        
Point_Dis SLASH_ROTATE_POINT_DIS
        Max_Distance 
SLASH_ROTATE_RADIUS
        TB_Distance 
Max_Distance 4.0
    
} else if(Mode == ATTACK_SLASH_AHEAD) {
        
Point_Dis SLASH_AHEAD_POINT_DIS
        Max_Distance 
SLASH_AHEAD_RADIUS
        TB_Distance 
Max_Distance 4.0
    
} else if(Mode == ATTACK_STAB) {
        
Point_Dis STAB_POINT_DIS
        Max_Distance 
STAB_RADIUS
        TB_Distance 
Max_Distance 4.0
    
}
    
    static 
Float:VicOrigin[3], Float:MyOrigin[3]
    
pev(idpev_originMyOrigin)
    
    for(new 
04i++)
        
get_position(idTB_Distance * (1), 0.00.0Point[i])
        
    static 
Have_VictimHave_Victim 0
    
static ent
    ent 
fm_get_user_weapon_entity(idget_user_weapon(id))
        
    if(!
pev_valid(ent))
        return 
0
        
    
for(new 0get_maxplayers(); i++)
    {
        if(!
is_user_alive(i))
            continue
        if(
id == i)
            continue
        if(
entity_range(idi) > Max_Distance)
            continue
    
        
pev(ipev_originVicOrigin)
        if(
is_wall_between_points(MyOriginVicOriginid))
            continue
            
        if(
get_distance_f(VicOriginPoint[0]) <= Point_Dis
        
|| get_distance_f(VicOriginPoint[1]) <= Point_Dis
        
|| get_distance_f(VicOriginPoint[2]) <= Point_Dis
        
|| get_distance_f(VicOriginPoint[3]) <= Point_Dis)
        {
            if(!
Have_VictimHave_Victim 1
            
if(Mode == ATTACK_SLASH_ROTATE)
                
do_attack(idientSLASH_ROTATE_DAMAGE)
            else if(
Mode == ATTACK_SLASH_AHEAD)
                
do_attack(idientSLASH_AHEAD_DAMAGE)
            else if(
Mode == ATTACK_STAB)
                
do_attack(idientSTAB_DAMAGE)
        }
    }    
    
    if(
Have_Victim)
        return 
1
    
else
        return 
0
    
    
return 0
}    

public 
fw_TraceLine(Float:vector_start[3], Float:vector_end[3], ignored_monsteridhandle)
{
    if (!
is_user_alive(id))
        return 
FMRES_IGNORED    
    
if (get_user_weapon(id) != CSW_DRAGONSWORD || !g_Had_DragonSword[id])
        return 
FMRES_IGNORED
    
    
static Float:vecStart[3], Float:vecEnd[3], Float:v_angle[3], Float:v_forward[3], Float:view_ofs[3], Float:fOrigin[3]
    
    
pev(idpev_originfOrigin)
    
pev(idpev_view_ofsview_ofs)
    
xs_vec_add(fOriginview_ofsvecStart)
    
pev(idpev_v_anglev_angle)
    
    
engfunc(EngFunc_MakeVectorsv_angle)
    
get_global_vector(GL_v_forwardv_forward)

    if(
g_Attack_Mode[id] == ATTACK_SLASH_ROTATExs_vec_mul_scalar(v_forwardSLASH_ROTATE_RADIUSv_forward)
    else if(
g_Attack_Mode[id] == ATTACK_SLASH_AHEADxs_vec_mul_scalar(v_forwardSLASH_AHEAD_RADIUSv_forward)
    else if(
g_Attack_Mode[id] == ATTACK_STABxs_vec_mul_scalar(v_forwardSTAB_RADIUSv_forward)
    else 
xs_vec_mul_scalar(v_forward0.0v_forward)
    
xs_vec_add(vecStartv_forwardvecEnd)
    
    
engfunc(EngFunc_TraceLinevecStartvecEndignored_monsteridhandle)
    
    return 
FMRES_SUPERCEDE
}

public 
fw_TraceHull(Float:vector_start[3], Float:vector_end[3], ignored_monsterhullidhandle)
{
    if (!
is_user_alive(id))
        return 
FMRES_IGNORED    
    
if (get_user_weapon(id) != CSW_DRAGONSWORD || !g_Had_DragonSword[id])
        return 
FMRES_IGNORED
    
    
static Float:vecStart[3], Float:vecEnd[3], Float:v_angle[3], Float:v_forward[3], Float:view_ofs[3], Float:fOrigin[3]
    
    
pev(idpev_originfOrigin)
    
pev(idpev_view_ofsview_ofs)
    
xs_vec_add(fOriginview_ofsvecStart)
    
pev(idpev_v_anglev_angle)
    
    
engfunc(EngFunc_MakeVectorsv_angle)
    
get_global_vector(GL_v_forwardv_forward)
    
    if(
g_Attack_Mode[id] == ATTACK_SLASH_ROTATExs_vec_mul_scalar(v_forwardSLASH_ROTATE_RADIUSv_forward)
    else if(
g_Attack_Mode[id] == ATTACK_SLASH_AHEADxs_vec_mul_scalar(v_forwardSLASH_AHEAD_RADIUSv_forward)
    else if(
g_Attack_Mode[id] == ATTACK_STABxs_vec_mul_scalar(v_forwardSTAB_RADIUSv_forward)
    else 
xs_vec_mul_scalar(v_forward0.0v_forward)
    
xs_vec_add(vecStartv_forwardvecEnd)
    
    
engfunc(EngFunc_TraceHullvecStartvecEndignored_monsterhullidhandle)
    
    return 
FMRES_SUPERCEDE
}

public 
fw_PlayerTraceAttack(VictimAttackerFloat:DamageFloat:Direction[3], TraceResultDamageBits
{
    if(!
is_user_alive(Attacker))    
        return 
HAM_IGNORED
    
if(!g_Had_DragonSword[Attacker] || !g_Checking_Mode[Attacker])
        return 
HAM_IGNORED
        
    
return HAM_SUPERCEDE
}

do_attack(AttackerVictimInflictorFloat:fDamage)
{
    
fake_player_trace_attack(AttackerVictimfDamage)
    
fake_take_damage(AttackerVictimfDamageInflictor)
}

fake_player_trace_attack(iAttackeriVictim, &Float:fDamage)
{
    
// get fDirection
    
new Float:fAngles[3], Float:fDirection[3]
    
pev(iAttackerpev_anglesfAngles)
    
angle_vector(fAnglesANGLEVECTOR_FORWARDfDirection)
    
    
// get fStart
    
new Float:fStart[3], Float:fViewOfs[3]
    
pev(iAttackerpev_originfStart)
    
pev(iAttackerpev_view_ofsfViewOfs)
    
xs_vec_add(fViewOfsfStartfStart)
    
    
// get aimOrigin
    
new iAimOrigin[3], Float:fAimOrigin[3]
    
get_user_origin(iAttackeriAimOrigin3)
    
IVecFVec(iAimOriginfAimOrigin)
    
    
// TraceLine from fStart to AimOrigin
    
new ptr create_tr2() 
    
engfunc(EngFunc_TraceLinefStartfAimOriginDONT_IGNORE_MONSTERSiAttackerptr)
    new 
pHit get_tr2(ptrTR_pHit)
    new 
iHitgroup get_tr2(ptrTR_iHitgroup)
    new 
Float:fEndPos[3]
    
get_tr2(ptrTR_vecEndPosfEndPos)

    
// get target & body at aiming
    
new iTargetiBody
    get_user_aiming
(iAttackeriTargetiBody)
    
    
// if aiming find target is iVictim then update iHitgroup
    
if (iTarget == iVictim)
    {
        
iHitgroup iBody
    
}
    
    
// if ptr find target not is iVictim
    
else if (pHit != iVictim)
    {
        
// get AimOrigin in iVictim
        
new Float:fVicOrigin[3], Float:fVicViewOfs[3], Float:fAimInVictim[3]
        
pev(iVictimpev_originfVicOrigin)
        
pev(iVictimpev_view_ofsfVicViewOfs
        
xs_vec_add(fVicViewOfsfVicOriginfAimInVictim)
        
fAimInVictim[2] = fStart[2]
        
fAimInVictim[2] += get_distance_f(fStartfAimInVictim) * floattanfAngles[0] * 2.0degrees )
        
        
// check aim in size of iVictim
        
new iAngleToVictim get_angle_to_target(iAttackerfVicOrigin)
        
iAngleToVictim abs(iAngleToVictim)
        new 
Float:fDis 2.0 get_distance_f(fStartfAimInVictim) * floatsinfloat(iAngleToVictim) * 0.5degrees )
        new 
Float:fVicSize[3]
        
pev(iVictimpev_size fVicSize)
        if ( 
fDis <= fVicSize[0] * 0.5 )
        {
            
// TraceLine from fStart to aimOrigin in iVictim
            
new ptr2 create_tr2() 
            
engfunc(EngFunc_TraceLinefStartfAimInVictimDONT_IGNORE_MONSTERSiAttackerptr2)
            new 
pHit2 get_tr2(ptr2TR_pHit)
            new 
iHitgroup2 get_tr2(ptr2TR_iHitgroup)
            
            
// if ptr2 find target is iVictim
            
if ( pHit2 == iVictim && (iHitgroup2 != HIT_HEAD || fDis <= fVicSize[0] * 0.25) )
            {
                
pHit iVictim
                iHitgroup 
iHitgroup2
                get_tr2
(ptr2TR_vecEndPosfEndPos)
            }
            
            
free_tr2(ptr2)
        }
        
        
// if pHit still not is iVictim then set default HitGroup
        
if (pHit != iVictim)
        {
            
// set default iHitgroup
            
iHitgroup HIT_GENERIC
            
            
new ptr3 create_tr2() 
            
engfunc(EngFunc_TraceLinefStartfVicOriginDONT_IGNORE_MONSTERSiAttackerptr3)
            
get_tr2(ptr3TR_vecEndPosfEndPos)
            
            
// free ptr3
            
free_tr2(ptr3)
        }
    }
    
    
// set new Hit & Hitgroup & EndPos
    
set_tr2(ptrTR_pHitiVictim)
    
set_tr2(ptrTR_iHitgroupiHitgroup)
    
set_tr2(ptrTR_vecEndPosfEndPos)
    
    
// hitgroup multi fDamage
    
new Float:fMultifDamage 
    
switch(iHitgroup)
    {
        case 
HIT_HEADfMultifDamage  4.0
        
case HIT_STOMACHfMultifDamage  1.25
        
case HIT_LEFTLEGfMultifDamage  0.75
        
case HIT_RIGHTLEGfMultifDamage  0.75
        
default: fMultifDamage  1.0
    
}
    
    
fDamage *= fMultifDamage
    
    
// ExecuteHam
    
fake_trake_attack(iAttackeriVictimfDamagefDirectionptr)
    
    
// free ptr
    
free_tr2(ptr)
}

stock fake_trake_attack(iAttackeriVictimFloat:fDamageFloat:fDirection[3], iTraceHandleiDamageBit = (DMG_NEVERGIB DMG_BULLET))
{
    
ExecuteHamB(Ham_TraceAttackiVictimiAttackerfDamagefDirectioniTraceHandleiDamageBit)
}

stock fake_take_damage(iAttackeriVictimFloat:fDamageiInflictor 0iDamageBit = (DMG_NEVERGIB DMG_BULLET))
{
    
iInflictor = (!iInflictor) ? iAttacker iInflictor
    ExecuteHamB
(Ham_TakeDamageiVictimiInflictoriAttackerfDamageiDamageBit)
}

stock get_angle_to_target(id, const Float:fTarget[3], Float:TargetSize 0.0)
{
    new 
Float:fOrigin[3], iAimOrigin[3], Float:fAimOrigin[3], Float:fV1[3]
    
pev(idpev_originfOrigin)
    
get_user_origin(idiAimOrigin3// end position from eyes
    
IVecFVec(iAimOriginfAimOrigin)
    
xs_vec_sub(fAimOriginfOriginfV1)
    
    new 
Float:fV2[3]
    
xs_vec_sub(fTargetfOriginfV2)
    
    new 
iResult get_angle_between_vectors(fV1fV2)
    
    if (
TargetSize 0.0)
    {
        new 
Float:fTan TargetSize get_distance_f(fOriginfTarget)
        new 
fAngleToTargetSize floatroundfloatatan(fTandegrees) )
        
iResult -= (iResult 0) ? fAngleToTargetSize : -fAngleToTargetSize
    
}
    
    return 
iResult
}

stock get_angle_between_vectors(const Float:fV1[3], const Float:fV2[3])
{
    new 
Float:fA1[3], Float:fA2[3]
    
engfunc(EngFunc_VecToAnglesfV1fA1)
    
engfunc(EngFunc_VecToAnglesfV2fA2)
    
    new 
iResult floatround(fA1[1] - fA2[1])
    
iResult iResult 360
    iResult 
= (iResult 180) ? (iResult 360) : iResult
    
    
return iResult
}

stock fm_cs_get_weapon_ent_owner(ent)
{
    if (
pev_valid(ent) != PDATA_SAFE)
        return -
1
    
    
return get_pdata_cbase(entOFFSET_WEAPONOWNEROFFSET_LINUX_WEAPONS)
}

stock set_weapon_anim(idanim)
{
    if(!
is_user_alive(id))
        return
        
    
set_pev(idpev_weaponanimanim)
    
    
message_begin(MSG_ONE_UNRELIABLESVC_WEAPONANIM_id)
    
write_byte(anim)
    
write_byte(0)
    
message_end()    
}

stock set_weapons_timeidle(idWeaponId ,Float:TimeIdle)
{
    if(!
is_user_alive(id))
        return
        
    static 
entwpnentwpn fm_get_user_weapon_entity(idWeaponId)
    if(!
pev_valid(entwpn)) 
        return
        
    
set_pdata_float(entwpn46TimeIdleOFFSET_LINUX_WEAPONS)
    
set_pdata_float(entwpn47TimeIdleOFFSET_LINUX_WEAPONS)
    
set_pdata_float(entwpn48TimeIdle 0.5OFFSET_LINUX_WEAPONS)
}

stock set_player_nextattack(idFloat:nexttime)
{
    if(!
is_user_alive(id))
        return
        
    
set_pdata_float(idm_flNextAttacknexttime5)
}

stock is_valid_entity(ent)
{
    if(
pev_valid(ent) != PDATA_SAFE)
        return 
0
        
    
return 1
}

stock get_position(entFloat:forwFloat:rightFloat:upFloat:vStart[])
{
    static 
Float:vOrigin[3], Float:vAngle[3], Float:vForward[3], Float:vRight[3], Float:vUp[3]
    
    
pev(entpev_originvOrigin)
    
pev(entpev_view_ofs,vUp//for player
    
xs_vec_add(vOrigin,vUp,vOrigin)
    
pev(entpev_v_anglevAngle// if normal entity ,use pev_angles
    
    
angle_vector(vAngle,ANGLEVECTOR_FORWARD,vForward//or use EngFunc_AngleVectors
    
angle_vector(vAngle,ANGLEVECTOR_RIGHT,vRight)
    
angle_vector(vAngle,ANGLEVECTOR_UP,vUp)
    
    
vStart[0] = vOrigin[0] + vForward[0] * forw vRight[0] * right vUp[0] * up
    vStart
[1] = vOrigin[1] + vForward[1] * forw vRight[1] * right vUp[1] * up
    vStart
[2] = vOrigin[2] + vForward[2] * forw vRight[2] * right vUp[2] * up
}
    

stock is_wall_between_points(Float:start[3], Float:end[3], ignore_ent)
{
    static 
ptr
    ptr 
create_tr2()

    
engfunc(EngFunc_TraceLinestartendIGNORE_MONSTERSignore_entptr)
    
    static 
Float:EndPos[3]
    
get_tr2(ptrTR_vecEndPosEndPos)

    
free_tr2(ptr)
    return 
floatround(get_distance_f(endEndPos))




#2
Not update



#3
Forum kurallarına aykırı olduğun için konunuz silinmiştir .


Bir Hata Söz Konusu Olursa Bizlere Ulaşarak Düzeltebilirsiniz.






Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da

Konu ile Alakalı Benzer Konular
Konular Yazar Yorumlar Okunma Son Yorum
Silinmiş Konu   | Menu SMA Ayari jurse99 2 380 01-12-2019, Saat: 15:33
Son Yorum: By.KinG
Silinmiş Konu   | Tab Skor Ayarı By Hazard 1 261 04-08-2019, Saat: 22:42
Son Yorum: Smash
Silinmiş Konu   | Jbmenü Mg Ayarı Bozuk Yardım. ! xxkukulxx 1 334 12-10-2018, Saat: 07:29
Son Yorum: ITenGriTR
Silinmiş Konu   | CONSOLE AYARI necromancer123 2 384 02-09-2018, Saat: 12:13
Son Yorum: ITenGriTR
Silinmiş Konu   | Cvar Nasıl Kapatılır? Hunkas 1 426 01-07-2018, Saat: 21:51
Son Yorum: MawiLarq

Task