Raised This Month: $ Target: $400
 0% 

get_user_team


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Nutu_
AlliedModders Donor
Join Date: Mar 2016
Location: Germany
Old 02-02-2019 , 08:44   get_user_team
Reply With Quote #1

PHP Code:
public hook_death()
{
    if(
get_user_team(nKiller) == CS_TEAM_CT
    {
        
nKiller read_data(1)
        if ( (
read_data(3) == 1) && (read_data(5) == 0) )
        {
            
nHp_add get_pcvar_num (health_hs_add)
        }
        else
            
nHp_add get_pcvar_num (health_add)
        
nHp_max get_pcvar_num (health_max)
        if(!(
get_user_flags(nKiller) & ADMIN_LEVEL_H))
            return;
        
nKiller_hp get_user_health(nKiller)
        
nKiller_hp += nHp_add
        set_hudmessage
(00255, -1.00.1501.01.00.10.1, -1)
        
show_hudmessage(nKiller"+%d HP."nHp_add)
        if (
nKiller_hp nHp_maxnKiller_hp nHp_max
        set_user_health
(nKillernKiller_hp)
    }
    else if (
get_user_team(id) == CS_TEAM_T)
    {
        
client_print(nKillerprint_center"Zombies don't get health for kills.");
    }    

it shows me the client print, no matter if im ct or t, why?
__________________
a simple act of caring creates an endless ripple.
Nutu_ 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:36.


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