Raised This Month: $ Target: $400
 0% 

!zspawn and auto respawn


Post New Thread Reply   
 
Thread Tools Display Modes
SirCole
Member
Join Date: Nov 2006
Old 12-21-2009 , 09:23   Re: !zspawn and auto respawn
Reply With Quote #21

0 for unlimited? and thankyou
SirCole is offline
rhelgeby
Veteran Member
Join Date: Oct 2008
Location: 0x4E6F72776179
Old 12-21-2009 , 11:49   Re: !zspawn and auto respawn
Reply With Quote #22

Seems like there are some logic bugs in zspawn code about the time limit. It's not actually checking the time at all, just if a time limit is enabled or not. But I don't have time to make a fix now.
__________________
Richard Helgeby

Zombie:Reloaded | PawnUnit | Object Library
(Please don't send private messages for support, they will be ignored. Use the forum.)
rhelgeby is offline
Send a message via MSN to rhelgeby
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 12-21-2009 , 14:25   Re: !zspawn and auto respawn
Reply With Quote #23

There's no fix to be made..

if (tZSpawn == INVALID_HANDLE) is the check.

tZSpawn is the handle to the timer that is started on round freeze end with zr_zspawn_timelimit_time as it's time. After it's callback has been called, tZSpawn is set to INVALID_HANDLE.

Code:
// Block is the time limit is up.
        new bool:zspawntimelimit = GetConVarBool(g_hCvarsList[CVAR_ZSPAWN_TIMELIMIT]);
        if (zspawntimelimit)
        {
            // IF THIS PASSES THEN THE TIMELIMIT HAS EXPIRED.
            if (tZSpawn == INVALID_HANDLE)
            {
                new zspawntimelimitzombie = GetConVarInt(g_hCvarsList[CVAR_ZSPAWN_TIMELIMIT_ZOMBIE]);
                switch(zspawntimelimitzombie)
                {
                    case -1:
                    {
                        // Get timelimit
                        new Float:zspawntime = GetConVarFloat(g_hCvarsList[CVAR_ZSPAWN_TIMELIMIT_TIME]);
                        
                        // Tell client the timelimit for this command has expired.
                        TranslationPrintToChat(client, "ZSpawn timelimit", RoundToNearest(zspawntime));
                        return false;
                    }
                    case 0:
                    {
                        teamzombie = false;
                    }
                    case 1:
                    {
                        teamzombie = true;
                    }
                }
            }
        }
__________________
Greyscale 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:21.


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