Raised This Month: $ Target: $400
 0% 

Suicide Bomb


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
vitorrossi
Senior Member
Join Date: Apr 2012
Location: NY, USA
Old 09-08-2012 , 21:24   Suicide Bomb
Reply With Quote #1

I am trying to build a suicide bomb plugin for CTs. I can't get the suicide bomb to cause the damage it is supposed to. The task to initial the count down and the explosion is working fine. In the task I set:

PHP Code:
new Float:flOrigin[3];
get_user_origin(idflOrigin0); 
and I also call the function that is supposed to cause the damage

PHP Code:
fm_radius_damage(idflOriginget_pcvar_float(g_pSuicideDamage), get_pcvar_float(g_pSuicideRadius)); 
PHP Code:
stock fm_radius_damage(idorig[3], dmg rad
{
    new 
Health;
    static 
Ent
    Ent 
= -1
       
    
while((Ent engfunc(EngFunc_FindEntityInSphereEntorigrad))) 
    {
        if(
is_user_alive(Ent))
        {
            if(
cs_get_user_team(Ent) == CS_TEAM_T)
            {            
                
Health get_user_health(Ent);
                
Health -= dmg;
        
                if(
Health <= 0.0){
                    
user_kill(Ent);
                    
set_user_frags(Ent,get_user_frags(Ent) + 1);
                }
                
                else{
                    
set_user_health(EntHealth);
                }
            }
        }
    }

This is not working though. Sometime the other player might be standing right next to the suicide bomber and it wont even hurt him. Could anyone help me out? Thank you

Last edited by vitorrossi; 09-08-2012 at 21:31.
vitorrossi 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 08:17.


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