Raised This Month: $ Target: $400
 0% 

[SOLVED] "Extending freeze time" for one team


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Desikac
Senior Member
Join Date: Apr 2010
Location: Serbia
Old 04-20-2012 , 18:26   [SOLVED] "Extending freeze time" for one team
Reply With Quote #1

I want the players in the terrorist team to be frozen for 10 more seconds after the freeze time has expired and also be invisible for those 10 seconds.

This is my code:

PHP Code:
new freeze

public plugin_init() {
    
register_event("HLTV""nova_runda""a""1=0""2=0")  
    
register_logevent("roundstart"2"1=Round_Start")
    
register_event"CurWeapon""EventCurWeapon""be""1=1" )
}

public 
EventCurWeaponid ) {
    
    if(
cs_get_user_team(id) == CS_TEAM_T) {
        if(
freeze == 1) {
            
set_pev(idpev_maxspeed0.1)
            
client_print(idprint_chat"debug"//DEBUG
        
}
        else
            
set_pev(idpev_maxspeed350.0//terrorists have increased speed
    
}

    return 
PLUGIN_CONTINUE
}

public 
roundstart() {
    new 
players[32] , inum
    get_players
(playersinum)
    for(new 
0inum; ++a) {
        if(
cs_get_user_team(players[a]) == CS_TEAM_T) {
            
client_print(players[a], print_chat"Frozen cuz T!!"//DEBUG
            
set_pev(players[a], pev_maxspeed0.1)
            
set_user_renderingplayers[a], kRenderFxNone000kRenderTransAlpha1)
        }
    }
    
set_task(10.0"skinifreeze")
}

public 
nova_runda()
    
freeze 1

public skinifreeze() {
    
freeze 0
    
new players[32] , inum
    get_players
(playersinum)
    for(new 
0inum; ++a) {
        if(
cs_get_user_team(players[a]) == CS_TEAM_T) {
            
set_pev(players[a], pev_maxspeed350.0)
            
set_user_renderingplayers[a], kRenderFxNone000kRenderTransAlpha255)
        }
    }

They get invisibility but are still able to move.

Last edited by Desikac; 04-21-2012 at 10:41.
Desikac is offline
Send a message via MSN to Desikac Send a message via Skype™ to Desikac
 



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