Raised This Month: $ Target: $400
 0% 

Ham_TakeDamage plays only Sound in PreThink


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 05-25-2013 , 07:50   Ham_TakeDamage plays only Sound in PreThink
Reply With Quote #1

Hello everybody,

I've got this code
PHP Code:
public fw_PlayerPreThink(id)
{
    if(!
IsAlive(id) || cs_get_user_team(id) != CS_TEAM_CT
        return; 
    
    new 
Float:origin[3];
    
entity_get_vector(idEV_VEC_originorigin);
        
    if(
ExecuteHam(Ham_FVisibleg_iSlenderIdid
    && 
entity_range(g_iSlenderIdid) <= SLENDER_RADIUS 
    
&& is_in_viewcone(g_iSlenderId,origin
    && 
get_gametime() > g_flSlayDelay[id
    && 
is_user_connected(id
    && 
is_user_alive(id)) 
    {
        
client_print(idprint_chat"I get damage.")
        
ExecuteHam(Ham_TakeDamageid0g_iSlenderIdget_pcvar_num(cvar_damage), DMG_PARALYZE)
        
g_flSlayDelay[id] = get_gametime() + SLENDER_DELAY
    
}

But it only plays the sound of the damage, the player doesn't loose health. Any ideas why?
__________________
Kia 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 16:26.


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