Raised This Month: $32 Target: $400
 8% 

(HELP) Check if all in one team


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Question x Mark
Junior Member
Join Date: May 2018
Old 06-10-2018 , 02:33   (HELP) Check if all in one team
Reply With Quote #1

How do i check if all the players are in one team.
If all of them are in one team, then do round win/end an balance team.
Question x Mark is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 06-10-2018 , 02:39   Re: (HELP) Check if all in one team
Reply With Quote #2

get teams players num check if team1 players are 0 and the other has players restart the round.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 06-10-2018 , 03:48   Re: (HELP) Check if all in one team
Reply With Quote #3

Something like this maybe ..
PHP Code:
new players[32], count

    get_players
(playerscount"e""CT")
    if(
count 31server_cmd("sv_restart 1")
    else if(
count == 0server_cmd("sv_restart 1"

Last edited by instinctpt1; 06-10-2018 at 03:49.
instinctpt1 is offline
CrAzY MaN
Senior Member
Join Date: Mar 2017
Location: India
Old 06-10-2018 , 04:27   Re: (HELP) Check if all in one team
Reply With Quote #4

Quote:
Originally Posted by instinctpt1 View Post
Something like this maybe ..
PHP Code:
new players[32], count

    get_players
(playerscount"e""CT")
    if(
count 31server_cmd("sv_restart 1")
    else if(
count == 0server_cmd("sv_restart 1"
Doesn't need to check
Code:
if(count > 31) server_cmd("sv_restart 1")
__________________
CrAzY MaN is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 06-10-2018 , 04:39   Re: (HELP) Check if all in one team
Reply With Quote #5

You must check current online players before doing any of these.
__________________
Relaxing is offline
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 06-10-2018 , 05:17   Re: (HELP) Check if all in one team
Reply With Quote #6

What if there are 32 CTS ?

It is req. to perform both checks i guess..

Last edited by instinctpt1; 06-10-2018 at 05:21. Reason: x
instinctpt1 is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 06-10-2018 , 06:02   Re: (HELP) Check if all in one team
Reply With Quote #7

Checking if there's 32 CTs but in fact there's 20 current players it will be marked as a false return.
Code:
new current_players = get_playersnum() if (count == (current_players - current_bots))
__________________
Relaxing is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 06-10-2018 , 11:33   Re: (HELP) Check if all in one team
Reply With Quote #8

Why are you all complicating things

Just check if one of teams has players and the other doesnt.

if(terr_num > 1 && !ctnum || ctnum > 1 && !terr_num)
.......
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 06-10-2018 at 11:38.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
CrAzY MaN
Senior Member
Join Date: Mar 2017
Location: India
Old 06-10-2018 , 12:01   Re: (HELP) Check if all in one team
Reply With Quote #9

Quote:
Originally Posted by Natsheh View Post
Why are you all complicating things

Just check if one of teams has players and the other doesnt.

if(terr_num > 1 && !ctnum || ctnum > 1 && !terr_num)
.......
Thats what i said
__________________
CrAzY MaN 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:13.


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