Raised This Month: $51 Target: $400
 12% 

Disable RoundEnd Problem!!


Post New Thread Reply   
 
Thread Tools Display Modes
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 08-15-2020 , 12:52   Re: Disable RoundEnd Problem!!
Reply With Quote #11

Quote:
Originally Posted by Shadows Adi View Post
reGameDll have a built in function, search in game.cfg for mp_round_infinite.
Code:
// Disable round end by game scenario
// 0 - disabled (default behaviour)
// 1 - enabled (never end round)
//
// Flags for fine grained control (choose as many as needed)
// a - block round time round end check
// b - block needed players round end check
// c - block VIP assassination/success round end check
// d - block prison escape round end check
// e - block bomb round end check
// f - block team extermination round end check
// g - block hostage rescue round end check
//
// Example setting: "ae" - blocks round time and bomb round end checks
// Default value: "0"
mp_round_infinite 0
if i used it like server_cmd ("mp_round_infinite 0") on those codes, it will be work ? or not ?

Like this
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;
    
server_cmd ("mp_round_infinite 0")

    
// 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)
    }

Edit: i tested it but not worked

Last edited by Supremache; 08-15-2020 at 13:24.
Supremache is offline
ZaX
Senior Member
Join Date: Jan 2015
Old 08-15-2020 , 13:21   Re: Disable RoundEnd Problem!!
Reply With Quote #12

Dude, check your codes, seriously...This might be the problem
Youre not using the ID(youre getting random player index and storing it in 'id') as AN index IN cs_set_user_team. BUT youre using LEAVING_PLAYER index.

And no, mp_round_infinite 0 this means will disable the cvar. and every thing returns normally.
Check the flags, and use them -- EX: mp_round_infinite "a".

Last edited by ZaX; 08-15-2020 at 13:21.
ZaX is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 08-15-2020 , 21:33   Re: Disable RoundEnd Problem!!
Reply With Quote #13

Quote:
Originally Posted by ZaX View Post
Dude, check your codes, seriously...This might be the problem
Youre not using the ID(youre getting random player index and storing it in 'id') as AN index IN cs_set_user_team. BUT youre using LEAVING_PLAYER index.

And no, mp_round_infinite 0 this means will disable the cvar. and every thing returns normally.
Check the flags, and use them -- EX: mp_round_infinite "a".
Do you want me show full codes ?
I said i got those codes from zombieplague mod but i dont know why it's not work for bb mod
1. Please if you want to help me, Can you check zombie plague and tell me if i didn't added something.
2. Can you check zombie bb mod 6.5 if the problem from that mod not from those codes Or i can give you all codes from zombie plague but it will be more than 1000 lines.
Supremache 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 21:13.


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