Raised This Month: $ Target: $400
 0% 

[HELP] how to reset Terror deaths in next round?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
jc980
Veteran Member
Join Date: Jan 2010
Location: God is with us...
Old 07-24-2010 , 02:28   [HELP] how to reset Terror deaths in next round?
Reply With Quote #1

I tried this but it doesnt works.

PHP Code:
public event_round_start()
{
set_task(20.0"reset_deaths")
}

public 
reset_deaths(id) {       
    if(
cs_get_user_team(id) == CS_TEAM_T)
    {
        
cs_set_user_deaths id)
    }

Please help! thanks in advance!

also i got another problem:

The Custom Boss model doesnt work and only shows the Zombie model.
but after The player dies the boss model shows up in his respawn but its class is a normal zombie not a boss zombie.
PHP Code:
public ham_player_spawn(id)
{
    if(!
is_user_alive(id) || !cs_get_user_team(id))
        return
    
g_zombie[id] = cs_get_user_team(id) == CS_TEAM_T true false
    remove_task
(id 100)
    if(
g_zombie[id])
    {
        switch (
random_num(11))
        {
            case 
1copy(g_player_model[id], charsmaxg_player_model[] ), ZOMBIE_MODEL1)
                
/*case 2: copy(g_player_model[id], charsmax( g_player_model[] ), ZOMBIE_MODEL2)
                case 3: copy(g_player_model[id], charsmax( g_player_model[] ), ZOMBIE_MODEL3)
            case 4: copy(g_player_model[id], charsmax( g_player_model[] ), ZOMBIE_MODEL4)
                case 5: copy(g_player_model[id], charsmax( g_player_model[] ), ZOMBIE_MODEL5)
                case 6: copy(g_player_model[id], charsmax( g_player_model[] ), ZOMBIE_MODEL6)
                case 7: copy(g_player_model[id], charsmax( g_player_model[] ), ZOMBIE_MODEL7)
                case 8: copy(g_player_model[id], charsmax( g_player_model[] ), ZOMBIE_MODEL8)
                case 9: copy(g_player_model[id], charsmax( g_player_model[] ), ZOMBIE_MODEL9)
                case 10: copy(g_player_model[id], charsmax( g_player_model[] ), ZOMBIE_MODEL10)
                case 11: copy(g_player_model[id], charsmax( g_player_model[] ), ZOMBIE_MODEL11)
                case 12: copy(g_player_model[id], charsmax( g_player_model[] ), ZOMBIE_MODEL12)
                case 13: copy(g_player_model[id], charsmax( g_player_model[] ), ZOMBIE_MODEL13)
                case 14: copy(g_player_model[id], charsmax( g_player_model[] ), ZOMBIE_MODEL14)
                case 15: copy(g_player_model[id], charsmax( g_player_model[] ), ZOMBIE_MODEL15)*/
            
}
        if(
g_boss_class[id])
            {
                switch (
random_num(11))
                {
                    case 
1copy(g_player_model[id], charsmaxg_player_model[] ), ZOMBIE_MODEL15)
                }
            }
        new 
currentmodel[32]
        
fm_get_user_model(idcurrentmodelcharsmax(currentmodel))
        if(!
equal(currentmodelg_player_model[id]))
        {
            if(
get_gametime() - g_roundstart_time 5.0)
                
set_task(5.0 0.5"fm_user_model_update"id 100)
            else
                
fm_user_model_update(id 100)
        }
    }
        
    else if(
g_has_custom_model[id])
        {
            
fm_reset_user_model(id)
        }
    }
    
    public 
fm_client_key(id, const infobuffer[], const key[])
    {   
        if(
g_has_custom_model[id] && equal(key"model"))
            return 
FMRES_SUPERCEDE
        
return FMRES_IGNORED
    
}
    
    public 
fm_client_info(id)
    {
        if(!
g_has_custom_model[id])
            return 
FMRES_IGNORED
        
        
static currentmodel[32]
        
fm_get_user_model(idcurrentmodelcharsmax(currentmodel))
        if(!
equal(currentmodelg_player_model[id]) && !task_exists(id 100))
            
fm_set_user_model(id 100)
        return 
FMRES_IGNORED
    
}
    
    public 
fm_user_model_update(taskid)
    {
        static 
Float:current_time
        current_time 
get_gametime()
        
        if(
current_time g_models_target_time >= 0.5)
        {
            
fm_set_user_model(taskid)
            
g_models_target_time current_time
        
}
        else
        {
            
set_task((g_models_target_time 0.5) - current_time"fm_set_user_model"taskid)
            
g_models_target_time g_models_target_time 0.5
        
}
    }
    
    public 
fm_set_user_model(player)
    {
        
player -= 100
        engfunc
(EngFunc_SetClientKeyValueplayerengfunc(EngFunc_GetInfoKeyBufferplayer), "model"g_player_model[player])
        
g_has_custom_model[player] = true
    

__________________
jc980 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 00:10.


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