Raised This Month: $ Target: $400
 0% 

Last player replace (on disconnect) without round end?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Eagle07
Veteran Member
Join Date: May 2014
Location: Morocco :D
Old 07-23-2014 , 22:59   Re: Last player replace (on disconnect) without round end?
Reply With Quote #1

Try
PHP Code:
public client_disconnect(id)

    if(!
g_bRoundEnd)
    static 
szName[32], randomplayer
    
new new_terr players[random(pnum)]
    if(
fnGetTeamPlayers(1) == 1){ 
        
cs_set_user_team(new_terrCS_TEAM_T);
        
get_user_name(new_terrszName31 ); // get the name 
        
client_print(0,print_chat,"The last TT left, %s is the new TT",szName); // advertise which player 
        
ExecuteHamB(Ham_CS_RoundRespawnnew_terr); // respawn the new last player 
    


fnGetTeamPlayers(team) { 
    static 
iiPls
    for (
0g_iMaxpli++){ 
        if (
is_user_connected(i)){ 
            switch(
team){ 
                case 
1:if (cs_get_user_team(i) == CS_TEAM_T)    iPls++; 
                case 
2:if (cs_get_user_team(i) == CS_TEAM_CT)    iPls++; 
            } 
        } 
    } 
    return 
iPls

__________________
Eagle07 is offline
Reply



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 13:15.


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