Raised This Month: $ Target: $400
 0% 

Entity


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
NoLimit
Junior Member
Join Date: Apr 2012
Old 05-01-2012 , 11:23   Entity
Reply With Quote #1

Why doesn't work? I mean when throw the rock in someone no damage... Why?
PHP Code:
public touch_rock(rockid)
{
    if(!
IsAlive(id) || cInfo[id][Team] == 1)
        return 
PLUGIN_HANDLED
        
    
if(fm_get_speed(rock) <= 0.0) return PLUGIN_HANDLED
    
if(is_valid_ent(rock))
    {
        new 
attacker entity_get_edict(rockEV_ENT_owner)
        
        new 
origin[3], Floatdamage
        get_user_origin
(idorigin)
        
damage get_pcvar_float(cvar_rockdmg)
                    
        if (
attacker == id)
            return 
PLUGIN_HANDLED

        message_begin
(MSG_BROADCASTSVC_TEMPENTITY)
        
write_byte(TE_BLOOD)
        
write_coord(origin[0])
        
write_coord(origin[1])
        
write_coord(origin[2] + 10)
        
write_coord(random_num(-360360))
        
write_coord(random_num(-360360))
        
write_coord(-10)
        
write_byte(70)
        
write_byte(random_num(1535))
        
message_end() 
        
ExecuteHam(Ham_TakeDamagerockidattackerdamageDMG_GENERIC)
        
remove_task(rock+500)
        
remove_entity(rock)
    }
    return 
PLUGIN_HANDLED


Last edited by NoLimit; 05-01-2012 at 11:23.
NoLimit 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 07:49.


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