AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to Team Balance at Round Win/End? (https://forums.alliedmods.net/showthread.php?t=312840)

MihaiGamerXD 12-17-2018 14:10

How to Team Balance at Round Win/End?
 
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?

OciXCrom 12-17-2018 14:17

Re: How to Team Balance at Round Win/End?
 
What kind of an idea do you expect us to have when you provided 0 (zero) information about the code?

MihaiGamerXD 12-17-2018 17:42

Re: How to Team Balance at Round Win/End?
 
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)



E1_531G 12-18-2018 14:55

Re: How to Team Balance at Round Win/End?
 
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[])

OciXCrom 12-19-2018 07:00

Re: How to Team Balance at Round Win/End?
 
What's the point of using the "i" flag? You can't set a team on a user that isn't connected yet.

MihaiGamerXD 12-19-2018 09:36

Re: How to Team Balance at Round Win/End?
 
But I wanted to set team for connecting players, so that's wrong flag like "i"? Really?

E1_531G 12-19-2018 09:42

Re: How to Team Balance at Round Win/End?
 
Quote:

Originally Posted by MihaiGamerXD (Post 2629946)
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.

MihaiGamerXD 12-19-2018 10:05

Re: How to Team Balance at Round Win/End?
 
Ok, and show me an example of balance teams! Please!

OciXCrom 12-19-2018 14:11

Re: How to Team Balance at Round Win/End?
 
Open Google and write "amxmodx team balance". There are thousands of examples. Stop being lazy.

Natsheh 12-19-2018 14:23

Re: How to Team Balance at Round Win/End?
 
Set this cvar or similar i dont remember the exact mp_teambalance to 1


All times are GMT -4. The time now is 07:32.

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