AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Check (https://forums.alliedmods.net/showthread.php?t=133825)

Vechta 07-29-2010 03:49

Check
 
How to check if counter-terrorits or terrorits win ?

Jack86 07-29-2010 04:54

Re: Check
 
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
}

Vechta 07-29-2010 04:58

Re: Check
 
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

mottzi 07-29-2010 07:27

Re: Check
 
code comes, 1 moment

Gadzislaw007 07-29-2010 07:42

Re: Check
 
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?

Vechta 07-29-2010 07:53

Re: Check
 
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


All times are GMT -4. The time now is 00:15.

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