Перейти к содержимому
View in the app

A better way to browse. Learn more.

Zloplay community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Опубликовано:

Hey. I'm trying to figure out how I could make the only option available to be 'auto assign', but don't know where to start. I'd appreciate if someone would point me to the right direction, if this is even possible?

Опубликовано:
Hey. I'm trying to figure out how I could make the only option available to be 'auto assign', but don't know where to start. I'd appreciate if someone would point me to the right direction, if this is even possible?

...wat

Опубликовано:

maps/mp/gametypes/_menus.gsc (copy the one in m2demo to a mods/ subfolder or something):

 

find

	if(response == "changeteam")
	{
		self closepopupMenu();
		self closeInGameMenu();
		self openpopupMenu(game["menu_team"]);
	}

 

replace with

	if(response == "changeteam")
	{
		self closepopupMenu();
		self closeInGameMenu();
		self [[level.autoassign]]();
	}

 

find

beginTeamChoice()
{
self openpopupMenu( game["menu_team"] );
}

 

replace with

beginTeamChoice()
{
self [[level.autoassign]]();
}

Опубликовано:
  • Автор

Thanks a lot, works great. Only slight minus is that people in spectators get autoassigned each round. Is that as easy to change as this was?

 

and btw,

Hey. I'm trying to figure out how I could make the only option available to be 'auto assign', but don't know where to start. I'd appreciate if someone would point me to the right direction, if this is even possible?

...wat

Nice pointless spampost, dipshit

Опубликовано:
Thanks a lot, works great. Only slight minus is that people in spectators get autoassigned each round. Is that as easy to change as this was?

 

and btw,

Hey. I'm trying to figure out how I could make the only option available to be 'auto assign', but don't know where to start. I'd appreciate if someone would point me to the right direction, if this is even possible?

...wat

Nice pointless spampost, dipshit

How would you even go to spec when you've done the code changes NTA suggested?

 

You could also use auto-balance in combination with a changed getJoinTeamPermissions( team ) function.

Get a clean _teams.gsc and change the function getJoinTeamPermissions( team ); to :

 

getJoinTeamPermissions( team )
{

playerCounts = self CountPlayers();

return (( playerCounts["allies"] == playerCounts["axis"] )  || ( playerCounts[team] < playerCounts["axis"] ) || ( playerCounts[team] < playerCounts["allies"] ));	

}

 

credits to lmaobox for this.

Опубликовано:
  • Автор

When you join the game, you get auto assigned to a team, instead of being able to choose your team, which is good. You can still press esc and select your team, and there you can go spec. Nothing wrong with that. But if you spec, each round it auto assigns you to a team, when before it would just ask you to choose a team. I'm wondering if this could be changed somehow, that you'll stay in spec if you're there. Not a big problem, but if it's easy to fix.

 

That function you showed me disables players ability to choose a certain team if the teams are not balanced? Like it's 8vs5 and the player tries to join the team with 8 players, it denies him?

Опубликовано:
When you join the game, you get auto assigned to a team, instead of being able to choose your team, which is good. You can still press esc and select your team, and there you can go spec. Nothing wrong with that. But if you spec, each round it auto assigns you to a team, when before it would just ask you to choose a team. I'm wondering if this could be changed somehow, that you'll stay in spec if you're there. Not a big problem, but if it's easy to fix.

 

Ok, so you aren't using this, i guess?

      if(response == "changeteam")
     {
        self closepopupMenu();
        self closeInGameMenu();
        self [[level.autoassign]]();
     }

That function you showed me disables players ability to choose a certain team if the teams are not balanced? Like it's 8vs5 and the player tries to join the team with 8 players, it denies him?

Yes pretty much that. They won't be able to choose the team with 8 players and have to click on the other team or use auto-assign.

 

EDIT:

People don't have to spawn when they get autoassigned each round, so

 

Uhm, you could try something like this:

 

copy over a _playerlogic.gsc from m2demo/maps/mp/gametypes .

You'll find two lines like this:

self maps\mp\gametypes\_menus::beginTeamChoice();
self maps\mp\gametypes\_menus::beginTeamChoice();

 

change them to:

self maps\mp\gametypes\_menus::beginTeamChoice( firstConnect );
self maps\mp\gametypes\_menus::beginTeamChoice( firstConnect );

 

In _menus.gsc change the beginTeamChoice() function to:

beginTeamChoice( connect )
{
if ( self.pers["team"] != "spectator" || connect )
	self [[level.autoassign]]();
}

 

Like that spectators shouldn't be auto-assigned each round start.

You might also try this in combination with the changed getJoinTeamPermissions( team );

i posted above.

 

EDIT 2:

I use this

onplayerconnect()[/i] is called every round start, so it will re-assign players to the teams every round start and show up the choose-class menu...so that .iwd shouldn't be used in SnD etc..

Опубликовано:

Stick This On Player Connect

OnplayerConnect()
{
       level endon( "disconnected" );
       for(;
       {
        level waittill( "connected", player );
        team[0] = "allies";
        team[1] = "axis";
        random = randomInt( team.size );
        wait 0.2;
         player notify("menuresponse", game["menu_team"], team[random]);
       }
}

Опубликовано:
Stick This On Player Connect

OnplayerConnect()
{
       level endon( "disconnected" );
       for(;
       {
        level waittill( "connected", player );
        team[0] = "allies";
        team[1] = "axis";
        random = randomInt( team.size );
        wait 0.2;
         player notify("menuresponse", game["menu_team"], team[random]);
       }
}

 

And how is that relevant? Why would he want players assigned to the teams randomly?

Опубликовано:

In round-based gametypes onplayerconnect() is called every round start, so it will re-assign players to the teams every round start and show up the choose-class menu...so that .iwd shouldn't be used in SnD etc..

Ah ok...

Well I have only FFA and TDM servers...

Опубликовано:

In round-based gametypes onplayerconnect() is called every round start, so it will re-assign players to the teams every round start and show up the choose-class menu...so that .iwd shouldn't be used in SnD etc..

Really?

I wasn't aware of this. Thanks for the info.

So this doesn't happen on TDM/DOM/etc, right?

This may be why my servers have been crashing as I thought the onPlayerConnect was called only when they connect.

Опубликовано:

OnplayerConnect()
{
       level endon( "disconnected" );
       for(;
       {
        level waittill( "connected", player );
        if( player.pers["team"] == undefined )
        team[0] = "allies";
        team[1] = "axis";
        random = randomInt( team.size );
        wait 0.2;
         player notify("menuresponse", game["menu_team"], team[random]);
       }
}

Use this one for Snd Etc !!!!

Опубликовано:
OnplayerConnect()
{
       level endon( "disconnected" );
       for(;
       {
        level waittill( "connected", player );
        if( player.pers["team"] == undefined )
        team[0] = "allies";
        team[1] = "axis";
        random = randomInt( team.size );
        wait 0.2;
         player notify("menuresponse", game["menu_team"], team[random]);
       }
}

 

Use this one for Snd Etc !!!!

Jesus. Why are you posting this again and again without code tags? Also, how is that relevant? He doesn't want players to be assigned randomly.

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Гость
Ответить в тему...

Сейчас на странице 0

  • Нет пользователей, просматривающих эту страницу

Важная информация

Используя этот сайт, вы соглашаетесь Условия использования.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.