Перейти к содержимому
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.
Опубликовано:

Hey, this is my better nuke code. Basically, when someone calls in a nuke, a harrier starts flying across the maps and drops a bomb. a few seconds before it hits the ground, it explodes, like a real nuke. But you can turn it into a moab, by dvar. If you set

set moab 1

the nuke wont end the game, only enemy players die, enemy team gets EMPed for a minute and moab team gets 2x XP.

 

With

set nuke_location 1

you can choose the location of the nuke.

 

 

Credit to:

death (zombiefan) for the better nuke sounds.

banz for his mini-release (I didn't copy any code from him, I only got inspired by his mod!)

 

Download: z_nuke.iwd

Featured Replies

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

Amazing.

Опубликовано:
  • Автор
2x XP after a MOAB might be a bit OP (specially on smaller maps)

Maybe you should include another command to disable 2x XP if it's the server host's opinion aswell.

 

lol, why should it be OP? But ok, i'll maybe add it as dvar.

Опубликовано:
2x XP after a MOAB might be a bit OP (specially on smaller maps)

Maybe you should include another command to disable 2x XP if it's the server host's opinion aswell.

 

lol, why should it be OP? But ok, i'll maybe add it as dvar.

 

When I call the MOAB on Rust...

But a nice release. Maybe I will add this to my servers.

Опубликовано:
there is a bug i think....if you use this mod....in some gametype the flah and stun granade kill in one hit...

Wait what... if you're on the enemy team of the nuke then of course you die. ._.

 

He meant if you flash someone, he will die instantly...

I justed tested it in private match with bots and he is right, actually. If you throw a flash at someone he dies. You even suicide sometimes if you flash yourself. :>

 

Bugs seems to be present when moab is set to 1 only.

Опубликовано:
there is a bug i think....if you use this mod....in some gametype the flah and stun granade kill in one hit...

Wait what... if you're on the enemy team of the nuke then of course you die. ._.

 

He meant if you flash someone, he will die instantly...

I justed tested it in private match with bots and he is right, actually. If you throw a flash at someone he dies. You even suicide sometimes if you flash yourself. :>

 

Bugs seems to be present when moab is set to 1 only.

Hmm okay that should be the damage when you call it in. I'll let you know the fix for it in a bit.

foreach( player in level.players )
{
	if ( isAlive( player ) )
	{
		if(level.moab==0)
			player thread maps\mp\gametypes\_damage::finishPlayerDamageWrapper( level.nukeInfo.player, level.nukeInfo.player, 999999, 0, "MOD_EXPLOSIVE", "nuke_mp", player.origin, player.origin, "none", 0, 0 );

		else
		{
			if( level.teamBased )
			{
				if( player.team != level.owner.team )
				{
					player thread maps\mp\gametypes\_damage::finishPlayerDamageWrapper( level.nukeInfo.player, level.nukeInfo.player, 999999, 0, "MOD_EXPLOSIVE", "nuke_mp", player.origin, player.origin, "none", 0, 0 );
					level thread launchEMP();
				}

				if ( player.team == level.owner.team )
				{
					if(player.health >= 10)
						player thread maps\mp\gametypes\_damage::finishPlayerDamageWrapper( level.nukeInfo.player, level.nukeInfo.player, 10, 0, "MOD_EXPLOSIVE", "nuke_mp", player.origin, player.origin, "none", 0, 0 );
				}
			}

			else
			{
				if ( player == level.owner )
				{
					if(player.health >= 10)
						player thread maps\mp\gametypes\_damage::finishPlayerDamageWrapper( level.nukeInfo.player, level.nukeInfo.player, 10, 0, "MOD_EXPLOSIVE", "nuke_mp", player.origin, player.origin, "none", 0, 0 );
				}

				else
				{
					player thread maps\mp\gametypes\_damage::finishPlayerDamageWrapper( level.nukeInfo.player, level.nukeInfo.player, 999999, 0, "MOD_EXPLOSIVE", "nuke_mp", player.origin, player.origin, "none", 0, 0 );
				}
			}
		}
	}
}

Somewhere is the problem.

Опубликовано:
there is a bug i think....if you use this mod....in some gametype the flah and stun granade kill in one hit...

Wait what... if you're on the enemy team of the nuke then of course you die. ._.

 

He meant if you flash someone, he will die instantly...

I justed tested it in private match with bots and he is right, actually. If you throw a flash at someone he dies. You even suicide sometimes if you flash yourself. :>

 

Bugs seems to be present when moab is set to 1 only.

Hmm okay that should be the damage when you call it in. I'll let you know the fix for it in a bit.

-dat_code-

 

No, it's not there. It only exists in FFA . The problem was here actually:

 

onPlayerSpawned()
{
       self endon("disconnect");

       for(;
       {
               self waittill( "spawned_player" );
              //level.owner is undefined until nuke is called...
               if ( level.moab!=0 && ( ( level.teambased && level.MoabXP[self.team] == true ) || ( level.owner == self && level.gameType == "dm" ) ) )
                       self.xpScaler = 2;  
       }
}

 

level.owner is not defined until someone calls in the nuke....so testing if

level.owner == self

causes the issue.

 

So 'retrieving' undefined variables seems to have pretty weird consequences. :>

 

A simple isDefined( level.owner ) fixes it though. (or you could add: level.owner = false; on init...)

 

Well, fixed code:

onPlayerSpawned()
{
       self endon("disconnect");

       for(;
       {
               self waittill( "spawned_player" );

               if ( level.moab!=0 && ( ( level.teambased && level.MoabXP[self.team] == true ) || ( isDefined( level.owner) && level.owner == self && level.gameType == "dm" ) ) )
                       self.xpScaler = 2;  
       }
}

  • 2 months 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

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

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

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

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.