Raised This Month: $ Target: $400
 0% 

[HELP] TeamScore Event - Never says who win?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
unSeen
Member
Join Date: Sep 2008
Old 08-10-2009 , 09:25   [HELP] TeamScore Event - Never says who win?
Reply With Quote #1

hey all,
I'm using in one of my plugins the TeamScore event.
In plugin_init() it look like that:
Code:
register_event("TeamScore", "on_TeamScore", "a")
That's how my on_TeamScore() function looks:
Code:
public on_TeamScore()
{
    // Variable definization.
    new szTeam[LEN_TEAM + STRING_OFFSET]
    
    
    // Read the team who was scored.
    read_data(1, szTeam, LEN_TEAM)
    
    server_print("onTeamScored: %s", szTeam) // debug.
        
    // If the team is CT..
    if (szTeam[0] == 'C')
    {
        server_print("CT WON!") // debug
    }
    // If the team is T..
    else if (szTeam[0] == 'T')
    {
        server_print("T WON!") // debug        
    }
    return PLUGIN_CONTINUE
}
The problem is, that each time team win, I mean if I'm in 1v1 in the terrorist side and I killed my enemy and it said T Win, i see in my server console:

Code:
onTeamScore: CT
CT WON!
onTeamScore: TERRORIST
T WON!

It calls 2 times the event, one time CT win, second time T win.



Anyone knows why?
__________________
List of important things:
1. Respect you'r mother.
2. Respect you'r father.
3. Do not hit anyone.
4. Do not steal.
5. Do not flame.
7. You didn't see that there is no number 6.
8. You checked if number 7 is true.
9. You are laughing now.
10. You are double laughing because you understand the joke ;)
unSeen is offline
 



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 18:32.


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