Raised This Month: $51 Target: $400
 12% 

How to Team Balance at Round Win/End?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MihaiGamerXD
Member
Join Date: Aug 2018
Old 12-17-2018 , 14:10   How to Team Balance at Round Win/End?
Reply With Quote #1

Hello again, I wanted to Team Balance at Round Win/End since when playing with 31 bots, and when the game is over, the game goes to main menu! What the hell is that? Any ideas?
MihaiGamerXD is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-17-2018 , 14:17   Re: How to Team Balance at Round Win/End?
Reply With Quote #2

What kind of an idea do you expect us to have when you provided 0 (zero) information about the code?
__________________

Last edited by OciXCrom; 12-19-2018 at 06:55.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
MihaiGamerXD
Member
Join Date: Aug 2018
Old 12-17-2018 , 17:42   Re: How to Team Balance at Round Win/End?
Reply With Quote #3

Ok here's the code:
PHP Code:
new iCT[32], iCTNum
new iT[32], iTNum
get_players
(iCT,iCTNum,"ie","CT")
get_players(iT,iTNum,"ie","T")
new 
iPlayersNum get_playersnum()
if (
iCTNum iPlayersNum/2) {
    
cs_set_user_team(iCT[iCTNum],CS_TEAM_T)
}
if (
iTNum iPlayersNum/2) {
    
cs_set_user_team(iT[iTNum],CS_TEAM_CT)

MihaiGamerXD is offline
E1_531G
Senior Member
Join Date: Dec 2017
Old 12-18-2018 , 14:55   Re: How to Team Balance at Round Win/End?
Reply With Quote #4

Valid players are from 0 till iCTNum - 1. (the same for iTNum).
In other words, here:
Quote:
cs_set_user_team(iCT[iCTNum],CS_TEAM_T)
iCT[iCTNum] is equal to 0. (the same for iT[])
__________________
My English is A0
E1_531G is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-19-2018 , 07:00   Re: How to Team Balance at Round Win/End?
Reply With Quote #5

What's the point of using the "i" flag? You can't set a team on a user that isn't connected yet.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
MihaiGamerXD
Member
Join Date: Aug 2018
Old 12-19-2018 , 09:36   Re: How to Team Balance at Round Win/End?
Reply With Quote #6

But I wanted to set team for connecting players, so that's wrong flag like "i"? Really?

Last edited by MihaiGamerXD; 12-19-2018 at 09:36.
MihaiGamerXD is offline
E1_531G
Senior Member
Join Date: Dec 2017
Old 12-19-2018 , 09:42   Re: How to Team Balance at Round Win/End?
Reply With Quote #7

Quote:
Originally Posted by MihaiGamerXD View Post
But I wanted to set team for connecting players, so that's wrong flag like "i"? Really?
You can't. Connecting != connected. Only connected players can have a team.
__________________
My English is A0
E1_531G is offline
MihaiGamerXD
Member
Join Date: Aug 2018
Old 12-19-2018 , 10:05   Re: How to Team Balance at Round Win/End?
Reply With Quote #8

Ok, and show me an example of balance teams! Please!
MihaiGamerXD is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-19-2018 , 14:11   Re: How to Team Balance at Round Win/End?
Reply With Quote #9

Open Google and write "amxmodx team balance". There are thousands of examples. Stop being lazy.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Natsheh
Veteran Member
Join Date: Sep 2012
Old 12-19-2018 , 14:23   Re: How to Team Balance at Round Win/End?
Reply With Quote #10

Set this cvar or similar i dont remember the exact mp_teambalance to 1
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 12-19-2018 at 14:27.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
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 12:11.


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