Raised This Month: $ Target: $400
 0% 

need help with hud message


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 06-09-2009 , 07:16   Re: need help with hud message
Reply With Quote #3

PHP Code:
    x_Enabled register_cvar("zwx_enable""1")
    
enable_grenades register_cvar("zwx_grenades""1")
    
SaveXP register_cvar("SaveXP""1")
     
XP_Kill register_cvar("XP_Kill""10")
    
XP_Hs register_cvar("XP_Hs""5")
    
death_msg_enable register_cvar("zwx_dmsg","1")

            
// Comands //
    
register_clcmd("say level""ShowLevel")
        
register_clcmd("say /level""ShowLevel")

    
register_clcmd("say zmrank""ShowRank")
    
register_clcmd("say /zmrank""ShowRank")

            
// Other //
    
register_dictionary("zombiewarxp.txt");
    
register_menu("Level by Menu"KEYSMENU"menu_level")
}

public 
ev_NewRound()
{
    for(new 
<= g_maxplayers i++)
    {
        if(
is_user_connected(i))
        {
        if (
iKills[i] == random_num(04))
        {
        
PlayerMedals[i] += 1
        
static name[32] ; get_user_name(inamecharsmax(name));
        
client_printcolor(0"/y[/gZombie War/y] /gSurvivor /ctr%s /ygot /ctr%d /ya /gmedal for a /ctrhonor."nameiKills[i])
        }
            
        
iKills[i] = 0
        
}
    }
}
public 
event_deathmsg()
{
    new 
g_attacker read_data(1)
    new 
g_victim read_data(2)
    new 
g_headshot read_data(3)

    new 
attacker_msg[32]
    new 
victim_msg[32]
    
get_user_name(g_attackerattacker_msg31)
    
get_user_name(g_victimvictim_msg31)

    static 
iAtt iAtt read_data(1)

    if(
g_headshot)PlayerXP[g_attacker] += get_pcvar_num(XP_Hs)

    
set_hudmessage(0255500.450.3312.02.0)
    
show_hudmessage(g_attacker"%L"LANG_SERVER"HS_XP"get_pcvar_num(XP_Hs))

    
PlayerXP[g_attacker] >= get_pcvar_num(XP_Kill)

    
set_hudmessage(0255500.500.3312.02.1)
    
show_hudmessage(g_attacker"%L"LANG_SERVER"KILL_XP"get_pcvar_num(XP_Kill))

    while(
PlayerXP[g_attacker] >= LEVELS[PlayerLevel[g_attacker]])
    {
        
PlayerLevel[g_attacker] += 1
        client_cmd
(g_attacker"spk %s"levelup)

        
client_printcolor(g_attacker"%L"LANG_SERVER"LEVEL_UP"PlayerLevel[g_attacker])
    }

    if(
PlayerXP[g_attacker] <= 34980)
        {
            
PlayerXP[g_attacker] += get_pcvar_num(XP_Kill)
        }
    if (
get_user_team(g_attacker) == 2// ct killed t
        
{
            if((
<= g_attacker <= g_maxplayers))
            {
                    
iKills[g_attacker]++;
            }
            if(
get_pcvar_num(death_msg_enable) == 1)
            {
                    
set_hudmessage(052550.010.3110.013.00.010.012
                    
show_hudmessage(0"%L"LANG_SERVER"CT_KILLED_T"victim_msgattacker_msg)
                    
client_cmd0"spk %s"music2[random_num(0,sizeof music2 1)])
            }
            
PlayerZombieDeaths[g_victim] += 1
            PlayerZombieKills
[g_attacker] += 1
        
}
    if (
get_user_team(g_attacker) == 1// t killed ct
        
{
            if(
get_pcvar_num(death_msg_enable) == 1)
            {
                    
set_hudmessage(2550100.010.2110.013.00.010.013
                    
show_hudmessage(0"%L"LANG_SERVER"T_KILLED_CT"victim_msgattacker_msg)
                    
client_cmd0"spk %s"music1[random_num(0,sizeof music1 1)])
            }
            
PlayerHumanDeaths[g_victim] += 1
            PlayerHumanKills
[g_attacker] += 1
        
}

    
ShowLevel(g_attacker)
    
SaveLevel(g_attacker)

~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
 



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 23:36.


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