Raised This Month: $ Target: $400
 0% 

About Round_End


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Near
BANNED
Join Date: Apr 2011
Location: Earth
Old 04-07-2011 , 10:59   About Round_End
Reply With Quote #1

Hi,I have a problem with this event,I don't know why,but I made a code ussing the TeamScore Event to get the scores of both teams,when the scores get 15 with CTScore+TScore it must swap the teams,but,when the last round is finished by Time (CT Must win that round) it doesn't check and don't swap the teams.

Example :

CT 7 - T 7 - Last Round - T don't plant the bomb and CT win by time,the teams must be swap but they don't.

Sorry for my bad English.

Last edited by Near; 04-07-2011 at 11:12.
Near is offline
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 04-07-2011 , 13:23   Re: About Round_End
Reply With Quote #2

Check the Scores at the Bombexplode event and in Roundend event. Otherwise give us some code to check it for you.
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
Near
BANNED
Join Date: Apr 2011
Location: Earth
Old 04-07-2011 , 13:27   Re: About Round_End
Reply With Quote #3

Quote:
Originally Posted by mottzi View Post
Check the Scores at the Bombexplode event and in Roundend event. Otherwise give us some code to check it for you.
But the round is winned by time,please read all.
Near is offline
matsi
Thinkosaur
Join Date: Sep 2006
Old 04-07-2011 , 15:55   Re: About Round_End
Reply With Quote #4

Quote:
Originally Posted by Near View Post
But the round is winned by time,please read all.
"Please read all."

We need to see the code in order to help you.
matsi is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-08-2011 , 00:51   Re: About Round_End
Reply With Quote #5

I would do something like this (CT is always sent right before T) :

PHP Code:
#include <amxmodx>

#define VERSION "0.0.1"
#define PLUGIN ""

#define MAX_ROUNDS 15

new g_iTScoreg_iCTScore

public plugin_init()
{
    
register_plugin(PLUGINVERSION"ConnorMcLeod")
    
register_event("TeamScore""Event_TeamScore""a")
}

public 
Event_TeamScore()
{
    new 
szTeam[2]
    
read_data(1szTeamcharsmax(szTeam))
    switch( 
szTeam[0] )
    {
        case 
'CT':
        {
            
g_iCTScore read_data(2)
        }
        case 
'T':
        {
            
g_iTScore read_data(2)
            
CheckScore()
        }
    }
}

CheckScore()
{
    if( 
g_iTScore g_iCTScore == MAX_ROUNDS )
    {
        
SwitchTeams_and_Restart()
    }
}

SwitchTeams_and_Restart()
{
    
// code

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Near
BANNED
Join Date: Apr 2011
Location: Earth
Old 04-08-2011 , 17:05   Re: About Round_End
Reply With Quote #6

I'll test it.Thanks.
Near is offline
Reply


Thread Tools
Display Modes

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 20:10.


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