Raised This Month: $ Target: $400
 0% 

Disable RoundEnd Problem!!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 08-12-2020 , 03:53   Disable RoundEnd Problem!!
Reply With Quote #1

Hey guys,

Sorry for what i will say but i dont know how to exmple that, i hope someone know what i mean!!!
I need help, I added code from zombie plague mod to basebuilder for check round task check that we still have both zombies and humans on a round and it's working without anyproblems but my problem is i have to disable roundend for round didn't end if user did disconnect and i did it but not worked
My question is : how to disable roundend from those code ?
2: I dont want round end when those code working, because Basebuilder mod working like: if last zombie/human disconnecting from the server round will stay work but if there who connecting to the server at the same round will join to Empty team but i dont want that, so can someone tell me where i can edit that from bb mod /?
PHP Code:
// Check Round Task -check that we still have both zombies and humans on a round-
check_round(leaving_player)
{
    
// Round ended or make_a_zombie task still active
    
if (g_boolRoundEnded)
        return;
    
    
// Get alive players count
    
static iPlayersnumid
    iPlayersnum 
fnGetAlive()
    
    
// Last alive player, don't bother
    
if (iPlayersnum 2)
        return;
    
    
// Last zombie disconnecting
    
if (g_isZombie[leaving_player] && fnGetZombies() == 1)
    {
        
// Only one CT left, don't bother
        
if (fnGetHumans() == && fnGetCTs() == 1)
            return;
        
        
// Pick a random one to take his place
        
while ((id fnGetRandomAlive(random_num(1iPlayersnum))) == leaving_player ) { /* keep looping */ }
        
        
// Show last zombie left notice
        
print_color(0"%s The last zombie has left,^x03 %s^x01 is the new zombie!"MODNAMEg_playername[id])
        
        
// Turn into a Nemesis, Assassin or just a zombie?
        
cs_set_user_team(leaving_playerCS_TEAM_T)
        
ExecuteHamB(Ham_CS_RoundRespawnid)
        
    }
    
    
// Last human disconnecting
    
else if (!g_isZombie[leaving_player] && fnGetHumans() == 1)
    {
        
// Only one T left, don't bother
        
if (fnGetZombies() == && fnGetTs() == 1)
            return;
        
        
// Pick a random one to take his place
        
while ((id fnGetRandomAlive(random_num(1iPlayersnum))) == leaving_player ) { /* keep looping */ }
        
        
// Show last human left notice
        
print_color(0"%s The last zombie has left,^x03 %s^x01 is the new zombie!"MODNAMEg_playername[id])
        
        
// Turn into a Survivor, Sniper or just a human?
        
cs_set_user_team(leaving_playerCS_TEAM_CT)
        
ExecuteHamB(Ham_CS_RoundRespawnid)
    }


Last edited by Supremache; 08-12-2020 at 04:23.
Supremache 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 13:56.


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