Перейти к содержимому
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.

[Help] Spectact do not work when player die.

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

New day, new question ! Tosay I saw a bug in my mod since I have modified _menus.gsc, when a player die in SnD the camera is stuck on his body and he can't spectact his team. So I look in the code and found where is the bug but now.. I can't understand why it doesn't work.

 

Original thread.

beginClassChoice( forceNewChoice )
{
assert( self.pers["team"] == "axis" || self.pers["team"] == "allies" );

team = self.pers["team"];

self openpopupMenu( game[ "menu_changeclass_" + team ] );

if ( !isAlive( self ) )
	self thread maps\mp\gametypes\_playerlogic::predictAboutToSpawnPlayerOverTime( 0.1 );
}

 

My new thread.

beginClassChoice( forceNewChoice )
{
assert( self.pers["team"] == "axis" || self.pers["team"] == "allies" );

team = self.pers["team"];
//	self openpopupMenu( game[ "menu_changeclass_" + team ] );

if ( !isAlive( self ) )
//		self thread maps\mp\gametypes\_playerlogic::predictAboutToSpawnPlayerOverTime( 0.1 );
	self thread maps\mp\gametypes\_playerlogic::spawnClient();
}

 

With this new thread the mod work perfectly exept for the spectact thing.

Featured Replies

Опубликовано:
  • Автор
JoeyB":37g8u4ft]Add

set scr_game_spectatetype 2

Into your server.cfg

 

3 would be free spectate, 1 is 'stuck'/frozen camera

 

It' s not that. I think there is something in changeclass.menu that allow player to spectat their team or something like that.

Опубликовано:
JoeyB":3s7cjpr7]Add

set scr_game_spectatetype 2

Into your server.cfg

 

3 would be free spectate, 1 is 'stuck'/frozen camera

 

It' s not that. I think there is something in changeclass.menu that allow player to spectat their team or something like that.

This dvar allows you to spectate only your team, no one, or everyone. ._.

Опубликовано:
New day, new question ! Tosay I saw a bug in my mod since I have modified _menus.gsc, when a player die in SnD the camera is stuck on his body and he can't spectact his team.

 

What are you using the _menus.gsc for? Just for blocking the class choice menu to show up and some menu responses?

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

What are you using the _menus.gsc for? Just for blocking the class choice menu to show up and some menu responses?

 

Exactly. I create my own menu that allow player to buy weapon but in the second round the choose class menu popup if I do not modify this thread.

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

Ok, you just need to change this in _menu.gsc to get the class choice menu blocked:

 

In onMenuResponse() edit these lines out:

self openpopupMenu( game["menu_changeclass_allies"] );
self openpopupMenu( game["menu_changeclass_axis"] );

 

Change the beginClassChoice function to:

 

beginClassChoice( forceNewChoice )
{
assert( self.pers["team"] == "axis" || self.pers["team"] == "allies" );

team = self.pers["team"];

// menu_changeclass_team is the one where you choose one of the n classes to play as.
// menu_class_team is where you can choose to change your team, class, controls, or leave game.
//self openpopupMenu( game[ "menu_changeclass_" + team ] );
self menuClass(0);

if ( !isAlive( self ) )
	self thread maps\mp\gametypes\_playerlogic::predictAboutToSpawnPlayerOverTime( 0.1 );
}

 

And in menuClass( response ) change:

 

class = self maps\mp\gametypes\_class::getClassChoice( response );
primary = self maps\mp\gametypes\_class::getWeaponChoice( response );

to:

class = "class0";
primary = 0;

Опубликовано:
  • Автор
Ok, you just need to change this in _menu.gsc to get the class choice menu blocked:

 

In onMenuResponse() edit these lines out:

self openpopupMenu( game["menu_changeclass_allies"] );
self openpopupMenu( game["menu_changeclass_axis"] );

 

Change the beginClassChoice function to:

 

beginClassChoice( forceNewChoice )
{
assert( self.pers["team"] == "axis" || self.pers["team"] == "allies" );

team = self.pers["team"];

// menu_changeclass_team is the one where you choose one of the n classes to play as.
// menu_class_team is where you can choose to change your team, class, controls, or leave game.
//self openpopupMenu( game[ "menu_changeclass_" + team ] );
self menuClass(0);

if ( !isAlive( self ) )
	self thread maps\mp\gametypes\_playerlogic::predictAboutToSpawnPlayerOverTime( 0.1 );
}

 

And in menuClass( response ) change:

 

class = self maps\mp\gametypes\_class::getClassChoice( response );
primary = self maps\mp\gametypes\_class::getWeaponChoice( response );

to:

class = "class0";
primary = 0;

 

Again.. It work :) Thanks you banz you'r the best.

Join the conversation

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

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

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

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

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

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

Account

Navigation

Поиск

Поиск

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.