Raised This Month: $ Target: $400
 0% 

Check


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Vechta
Veteran Member
Join Date: Jun 2010
Old 07-29-2010 , 03:49   Check
Reply With Quote #1

How to check if counter-terrorits or terrorits win ?
Vechta is offline
Jack86
Veteran Member
Join Date: Dec 2008
Location: Belgrade, Serbia
Old 07-29-2010 , 04:54   Re: Check
Reply With Quote #2

Check for sound

register_event("SendAudio","endround_event"," a","2&%!MRAD_terwin","2&%!MRAD_ctwin")

or like this

register_event("TeamScore", "teamScore", "ab")
public teamScore(id) {
new team[2]
read_data(1,team,1)
client_print(0,print_chat,"%s win",(team[0]=='C')? "CT" : "Ter")

return PLUGIN_CONTINUE
}
__________________

Jack86 is offline
Vechta
Veteran Member
Join Date: Jun 2010
Old 07-29-2010 , 04:58   Re: Check
Reply With Quote #3

I want to make only 1 randomly terrorist into CT team but i dont find it :/

-If ct loose round change player
-If ct win round change player
-If ct left game pick 1 terror to ct team
Vechta is offline
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 07-29-2010 , 07:27   Re: Check
Reply With Quote #4

code comes, 1 moment
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers

Last edited by mottzi; 07-29-2010 at 07:33.
mottzi is offline
Send a message via MSN to mottzi
Gadzislaw007
Senior Member
Join Date: Nov 2009
Old 07-29-2010 , 07:42   Re: Check
Reply With Quote #5

Maybe this would more fit in 'request' section.

Quote:
-If ct loose round change player
-If ct win round change player
If (ct loose or ct win) = if roundend
by 'change player' you mean team swap? and of which player?
Maybe this way is easier?

Quote:
If ct left game pick 1 terror to ct team
PHP Code:
public player_disconnect(id)
{
new 
CsTeams:userTeam cs_get_user_team(id)
if (
userTeam == CS_TEAM_CT)
{
    
kupa()

}
}

public 
kupa()
{
            new 
Float:new_id random_num(1,32)
            new 
CsTeams:new_userTeam(new_id)
            if (
new_userTeam == CS_TEAM_T)
                                    
cs_set_user_team(new_idCS_TEAM_CT)
                                    return 
PLUGIN_HANDLED
            
else kupa()

You sure when left game? I'd better say when he lefts team. (for example he goes to for spect.)
I dunno, is there any register for change team?

Last edited by Gadzislaw007; 07-29-2010 at 08:21.
Gadzislaw007 is offline
Vechta
Veteran Member
Join Date: Jun 2010
Old 07-29-2010 , 07:53   Re: Check
Reply With Quote #6

Ye, if he left team pick random 1 from terrorist team to ct team..

Code:
 -If ct loose round change player
-If ct win round change player
If roundend switch random player to ct team and the ct players switch to Terrorist team

Sorry for my bad english :S
Vechta 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 00:15.


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