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

Round_End don't support the round time?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 11-22-2010 , 04:24   Round_End don't support the round time?
Reply With Quote #1

I have a problem with this,because sometimes Round_End don't support the roundtime.

When T's doesn't plant the bomb,CT's must win that round by time,and that is the correct way to work.

But sometimes this makes a bug in my plugin,I don't know why.

Code...

PHP Code:
        new RoundsH get_pcvar_num(RoundsHalf)
        
        if(
ScoreCT ScoreT >= RoundsH && (!Half))
        {            
            
Half true
            
            FragsHalf 
Best_Fraggers()
            
BestFragger1 get_user_frags(FragsHalf)
            
            if(
get_pcvar_num(Swaper))
                
cmdSwap()
            
            
TotalCT ScoreT
            TotalT 
ScoreCT
            
            ScoreCT 
0
            ScoreT 
0
            
            set_pcvar_num
(pRestart,1)
        } 
Sorry for my english ^_^
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-22-2010 , 05:52   Re: Round_End don't support the round time?
Reply With Quote #2

If you are talking about maps that don't have any objective, round never ends before the whole team is dead, that's how the game works.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 11-22-2010 , 22:49   Re: Round_End don't support the round time?
Reply With Quote #3

Nope,Im talking about de_ maps.

Last edited by #8 SickneSS; 11-22-2010 at 23:16.
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 11-22-2010 , 23:31   Re: Round_End don't support the round time?
Reply With Quote #4

If round time expires without the bomb planted then the Counter-Terrorists win, and that "Round_End" log event is sent.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 11-23-2010 , 02:19   Re: Round_End don't support the round time?
Reply With Quote #5

Quote:
Originally Posted by Exolent[jNr] View Post
If round time expires without the bomb planted then the Counter-Terrorists win, and that "Round_End" log event is sent.
Yes,but sometimes bugs,I don't know why.:/
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-23-2010 , 03:42   Re: Round_End don't support the round time?
Reply With Quote #6

Then, your code fails.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 11-23-2010 , 04:39   Re: Round_End don't support the round time?
Reply With Quote #7

Can you tell me what is the problem in my code...?

PHP Code:

//Init
    
register_logevent("LogEventRoundEnd",2,"1=Round_End")

//Function
public LogEventRoundEnd() 
{    
    if(
get_pcvar_num(Enable))
    {    
        new 
RoundsH get_pcvar_num(RoundsHalf)
        new 
RoundsE get_pcvar_num(RoundsEnd)
        
        if(
ScoreCT ScoreT >= RoundsH && (!Half))
        {            
            
Half true
            
            FragsHalf 
Best_Fraggers()
            
BestFragger1 get_user_frags(FragsHalf)
            
            if(
get_pcvar_num(Swaper))
                
cmdSwap()
            
            
TotalCT ScoreT
            TotalT 
ScoreCT
            
            ScoreCT 
0
            ScoreT 
0
            
            set_pcvar_num
(pRestart,1)
        }
        
        if(
Half)
        {            
            if(
ScoreCT TotalCT >= RoundsE)
            {
                
set_hudmessage(6464255, -1.0, -1.01)
                
show_hudmessage(0,"Game Over^nCounter-Terrrorists Ganan El Mapa")
                
                
End true 
            
}
            
            if(
ScoreT TotalT >= RoundsE)
            {
                
set_hudmessage(2556464, -1.0, -1.01)
                
show_hudmessage(0,"Game Over^nTerrorist Team Ganan El Mapa")
                
                
End true
            
}
            
            if(
ScoreCT TotalCT >= RoundsH && ScoreT TotalT >= RoundsH)
            {
                
set_hudmessage(6425564, -1.0, -1.01)
                
show_hudmessage(0,"Game Over^nMapa Empatado")
                
                
End true
            
}
        }
        
        if(
End)
        {
            
FragsEnd Best_Fraggers()
            
BestFragger2 get_user_frags(FragsEnd)
            
            
End false
            Half 
false
            bChangeteam 
false
            server_cmd
("amx_new")
            
server_cmd("amx_on")
            
            if(
get_pcvar_num(ShowBestsFraggers))
                
set_task(5.0,"BestFrgrs")
        }
    }        

Thanks!
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-23-2010 , 05:18   Re: Round_End don't support the round time?
Reply With Quote #8

After each if, put a else and log what's happen with gametime.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 17:34.


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