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

[Help] AWP Shoot Straight


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 03-10-2014 , 09:15   [Help] AWP Shoot Straight
Reply With Quote #1

I tried but i still can't shoot it straight with no-zoom
Could someone tell me how to do it ?

PHP Code:
public fw_TraceAttack_Player(entattackerFloat:DamageFloat:fDir[3], ptriDamageType)
{
    if(!
Get_BitVar(g_IsAliveattacker))
        return 
HAM_IGNORED    
    
if(get_user_weapon(attacker) != CSW_AWP)
        return 
HAM_IGNORED

    
static Float:AimOrigin[3]; fm_get_aim_origin(attackerAimOrigin)
    
set_tr2(ptrTR_vecEndPosAimOrigin)

    return 
HAM_HANDLED
}

public 
fw_TraceAttack_World(entattackerFloat:DamageFloat:fDir[3], ptriDamageType)
{
    if(!
Get_BitVar(g_IsAliveattacker))
        return 
HAM_IGNORED
    
if(get_user_weapon(attacker) != CSW_AWP)
        return 
HAM_IGNORED

    
static Float:AimOrigin[3]; fm_get_aim_origin(attackerAimOrigin)
    
set_tr2(ptrTR_vecEndPosAimOrigin)

    return 
HAM_HANDLED

and also tried but not work
PHP Code:
public fw_Weapon_PriAttack(Ent)
{
    if(
pev_valid(Ent) != 2)
        return
    static 
IdId get_pdata_cbase(Ent414)
    if(
get_pdata_cbase(Id373) != Ent)
        return
        
    
pev(Idpev_velocityg_Velocity[Id])
    
set_pev(Idpev_velocity, {0.00.00.0})
}

public 
fw_Weapon_PriAttack_Post(Ent)
{
    if(
pev_valid(Ent) != 2)
        return
    static 
IdId get_pdata_cbase(Ent414)
    if(
get_pdata_cbase(Id373) != Ent)
        return

    
set_pev(Idpev_velocityg_Velocity[Id])


Last edited by dias; 03-10-2014 at 09:38.
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
m4m3ts
Senior Member
Join Date: Jun 2012
Old 04-10-2014 , 09:21   Re: [Help] AWP Shoot Straight
Reply With Quote #2

public fw_TraceAttack(iEnt, iAttacker, Float:flDamage, Float:fDir[3], ptr, iDamageType)
{
if(!is_user_alive(iAttacker))
return

new g_currentweapon = get_user_weapon(iAttacker)

if(g_currentweapon != CSW_AWP || !awp[iAttacker])
return

static Float:flEnd[3]
get_tr2(ptr, TR_vecEndPos, flEnd)

if(!is_user_alive(iEnt))
{
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_DECAL)
write_coord_f(flEnd[0])
write_coord_f(flEnd[1])
write_coord_f(flEnd[2])
write_byte(GUNSHOT_DECALS[random_num (0, sizeof GUNSHOT_DECALS -1)])
write_short(iEnt)
message_end()

message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_WORLDDECAL)
write_coord_f(flEnd[0])
write_coord_f(flEnd[1])
write_coord_f(flEnd[2])
write_byte(GUNSHOT_DECALS[random_num (0, sizeof GUNSHOT_DECALS -1)])
message_end()

message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_GUNSHOTDECAL)
write_coord_f(flEnd[0])
write_coord_f(flEnd[1])
write_coord_f(flEnd[2])
write_short(iAttacker)
write_byte(GUNSHOT_DECALS[random_num (0, sizeof GUNSHOT_DECALS -1)])
message_end()
}
}

Last edited by m4m3ts; 09-06-2014 at 04:36. Reason: try
m4m3ts 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 15:29.


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