Raised This Month: $ Target: $400
 0% 

delay fire (flamethrower) and survivors can't use


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
EclipseCP
BANNED
Join Date: Dec 2010
Old 03-23-2011 , 22:42   delay fire (flamethrower) and survivors can't use
Reply With Quote #1

hello.

I wanted to make a fire to cast a flamethrower every 0.2 seconds, but can not find how: S, I hope you can help me.

PHP Code:
public fw_PlayerPostThink(id)
{
    if(!
is_user_connected(id) || !is_user_alive(id))
        return 
FMRES_IGNORED
        
    
if(zp_get_user_zombie(id))
    {
        
Event_WeaponDrop(id)
        return 
FMRES_IGNORED
    
}
        
    if(!
g_hasFlamethrower[id] || !g_Activated[id])
        return 
FMRES_IGNORED
        
    
if(entity_get_int(idEV_INT_waterlevel) > 1)
        return 
FMRES_IGNORED

    
if(has_shield(id))
    {
        
drop_flamethrower(id)
        return 
FMRES_IGNORED
    
}
    
    if(
g_FireFlamethrower[id])
    {
            
            new 
Float:fOrigin[3], Float:fVelocity[3]
            
entity_get_vector(id,EV_VEC_originfOrigin)
            
VelocityByAim(id35fVelocity)
        
            new 
Float:fTemp[3], iFireOrigin[3]
            
xs_vec_add(fOriginfVelocityfTemp)
            
FVecIVec(fTempiFireOrigin)
            
            new 
Float:fFireVelocity[3], iFireVelocity[3]
            
VelocityByAim(idget_pcvar_num(g_damage_dis), fFireVelocity)
            
FVecIVec(fFireVelocityiFireVelocity)
            
            
create_flames_n_sounds(idiFireOriginiFireVelocity)
            
            new 
doDamage
            
switch(get_cvar_num("mp_friendlyfire"))
            {
                case 
0doDamage 0
                
case 1doDamage 0
            
}
            
            
direct_damage(iddoDamage)
            
indirect_damage(iddoDamage)
            
custom_weapon_shot(wpn_ftid)
    }
    return 
FMRES_IGNORED
}

public 
think_Flamethrower(ent)
{
    if(
is_valid_ent(ent) && entity_get_float(entEV_FL_health) < 950.0
    {
        new 
Float:fOrigin[3], iOrigin[3]
        
entity_get_vector(entEV_VEC_originfOrigin)
        
FVecIVec(fOriginiOrigin)
    
        
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
        
write_byte(99)
        
write_short(ent)
        
message_end()
    
        
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
        
write_byte(3)
        
write_coord(iOrigin[0])
        
write_coord(iOrigin[1])
        
write_coord(iOrigin[2])
        
write_short(sprite_xplo)
        
write_byte(50)
        
write_byte(15)
        
write_byte(0)
        
message_end()
        
        
RadiusDamage(fOriginget_pcvar_num(g_xplode_dmg), entity_get_int(entEV_INT_iuser4))
        
remove_entity(ent)
    }
    if(
is_valid_ent(ent)) entity_set_float(entEV_FL_nextthinkhalflife_time() + 0.01)

EclipseCP 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 14:29.


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