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

(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
Location: Muslim and proud!
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 API MODE 100% done !
@User Tag Prefix 100% done !
@Mystery Box 100% done !

@Arena Mod 90% done !


Donate for more
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: Rajasthan, 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"
__________________
CSIndia The only Indian Scripters Community

Last edited by instinctpt1; 06-10-2018 at 03:49.
instinctpt1 is offline
CrAzY MaN
Senior Member
Join Date: Mar 2017
Location: Nadiad/Gujarat/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")
__________________
My Plugins:

Whatsapp Group Join Request v3.0
XP + Level + Rank System v2.2

Confusing Fun Mod - 95% Completed
CrAzY MaN is online now
Relaxing
Veteran Member
Join Date: Jun 2016
Location: Catlands
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.
__________________
Have A Relaxing Day | Wiki
aim_relaxing | not online


Relaxing is offline
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Rajasthan, 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..
__________________
CSIndia The only Indian Scripters Community

Last edited by instinctpt1; 06-10-2018 at 05:21. Reason: x
instinctpt1 is offline
Relaxing
Veteran Member
Join Date: Jun 2016
Location: Catlands
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))
__________________
Have A Relaxing Day | Wiki
aim_relaxing | not online


Relaxing is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Location: Muslim and proud!
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 API MODE 100% done !
@User Tag Prefix 100% done !
@Mystery Box 100% done !

@Arena Mod 90% done !


Donate for more

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: Nadiad/Gujarat/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
__________________
My Plugins:

Whatsapp Group Join Request v3.0
XP + Level + Rank System v2.2

Confusing Fun Mod - 95% Completed
CrAzY MaN is online now
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 09:15.


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