Raised This Month: $ Target: $400
 0% 

Grenades...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
pokemonmaster
princess milk
Join Date: Nov 2010
Location: Somewhere in this world
Old 09-14-2013 , 03:09   Re: Grenades...
Reply With Quote #3

i did some tests on this and ended up with having this
PHP Code:
#include <amxmodx>
#include <csx>
#include <engine>
#include <fakemeta>

public plugin_init()
{
    
register_touch("*""grenade""fw_GrenadeTouch")
}

public 
grenade_throw(idiEntwId)
{
    if(
wId != CSW_HEGRENADE)
    {
        return;
    }
    
    new 
Float:flNewVelocity[3]
    
velocity_by_aim(id500flNewVelocity)
    
entity_set_vector(iEntEV_VEC_velocityflNewVelocity)
    
    
//entity_set_float(iEnt, EV_FL_gravity, 0.0)
    
entity_set_int(iEntEV_INT_movetypeMOVETYPE_FLY)
    
    
// Working but not as it should be ..
    //new Float:flVelocity[3]
    //entity_get_vector(iEnt, EV_VEC_velocity, flVelocity)
    //flVelocity[2] = 0.0
    //entity_set_vector(iEnt, EV_VEC_velocity, flVelocity)
    
    
    
entity_set_float(iEntEV_FL_dmgtime9999.0)
    
    
set_rendering(iEntkRenderFxGlowShell25500kRenderNormal16)
}

public 
fw_GrenadeTouch(iTouchedEntiGrenade)
{
    if(!
IsGrenade(iGrenade))
    {
        return;
    }

    if( 
entity_get_int(iTouchedEntEV_INT_solid) == SOLID_TRIGGER )
    {
        return;
    }
    
    
set_rendering(iGrenade)
    
entity_set_float(iGrenadeEV_FL_dmgtime1.0)
}

IsGrenadeiEnt // VEN
{
    if (
get_pdata_int(iEnt114) & (1<<0))
    {
        return 
1
    
}
    
    return 
0

__________________
اَشْهَدُ اَنْ لَّآ اِلٰهَ اِلَّا اللہُ وَحْدَه لَا شَرِيْكَ لَه وَ اَشْهَدُ اَنَّ مُحَمَّدًا عَبْدُه وَرَسُوْلُه
No longer active in AMXX. Sorry.
pokemonmaster is offline
 



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 18:46.


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