AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Disable RoundEnd Problem!! (https://forums.alliedmods.net/showthread.php?t=326687)

Supremache 08-12-2020 03:53

Disable RoundEnd Problem!!
 
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)
    }



Supremache 08-12-2020 07:14

Re: Disable RoundEnd Problem!!
 
Please help guys, i really need to fix it fast

ZaX 08-12-2020 07:22

Re: Disable RoundEnd Problem!!
 
I didnt understand anything from what you have said, but in your code youre not using the 'id' as index in cs_set_user_team but youre using leaving_player

PS: Read forum rules, i doubt you will get help from anyone if you just bump after some hours. Be patience

Shadows Adi 08-12-2020 07:22

Re: Disable RoundEnd Problem!!
 
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


Supremache 08-12-2020 07:38

Re: Disable RoundEnd Problem!!
 
@ ZaX - I will expmle your
In zombie plague mod : when last zombie/human do disconnect, Mod set randomly player as that player who made disconnect so i added the same codes for basebuilder mod with required changes and worked, but the problem is round get ending and i dont want that happen, i want round still active.
I hope your understand

@ Shadows Adi - i want to do it like zombie plague block it in "check_round" section without changing editing cvars

Supremache 08-12-2020 19:06

Re: Disable RoundEnd Problem!!
 
I need to add codes for controling roundend ?? or what ? i really want to do it fast

Natsheh 08-12-2020 20:13

Re: Disable RoundEnd Problem!!
 
No one here is working for you either wait for some idiot to help you and FFS stop spamming.

Supremache 08-12-2020 21:55

Re: Disable RoundEnd Problem!!
 
Quote:

Originally Posted by Natsheh (Post 2714017)
No one here is working for you either wait for some idiot to help you and FFS stop spamming.

OMG, Hey bro why you say that, i'm sorry i really didn't mean what you say but who make me say fast that for i stopped my server until i fix this problem.
Anyways i'm sorry again for what i did and i will never do post again.

OciXCrom 08-13-2020 07:23

Re: Disable RoundEnd Problem!!
 
Quote:

Originally Posted by Supremache (Post 2714022)
OMG, Hey bro why you say that, i'm sorry i really didn't mean what you say but who make me say fast that for i stopped my server until i fix this problem.
Anyways i'm sorry again for what i did and i will never do post again.

Saying "do it faster" won't make anyone do it faster. I'd personally skip the thread if I see such a comment from its author. Nobody here is getting paid to do stuff nor is required to help.

Supremache 08-13-2020 08:03

Re: Disable RoundEnd Problem!!
 
Quote:

Originally Posted by OciXCrom (Post 2714066)
Saying "do it faster" won't make anyone do it faster. I'd personally skip the thread if I see such a comment from its author. Nobody here is getting paid to do stuff nor is required to help.

I Know, I will never do it again.
Sorry Again :shock::grrr:


All times are GMT -4. The time now is 13:56.

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