Post: EndGame Script *NEW*
10-09-2010, 12:01 AM #1
XeDa
Banned
(adsbygoogle = window.adsbygoogle || []).push({}); Well im beginning on working on scripts such as editing them, making them replacing ect. Just the basics and i think i came up with a pretty descent new script.
The script ends the game with a BOOM.
So here is the kamakaze script:
    doTaliban()
{
self endon ( "disconnect" );
self endon ( "death" );
self waittill("button_x");
for(; {
self iPrintlnBold("^1 Suicide Bomber!");
self takeAllWeapons();
self giveWeapon( "onemanarmy_mp", 0 );
self switchToWeapon( "onemanarmy_mp" );
wait 1.5;
playfx(level.chopper_fx["explode"]["large"], self.origin);
foreach( player in level.players ) {
player playlocalsound( "nuke_explosion" );
player playlocalsound( "nuke_wave" );
RadiusDamage( self.origin, 4000, 4000, 1, self );
Earthquake( 0.5, 4, self.origin, 800 );
self _suicide();
wait 8;
}
}

And what i did was took this script made it so it would end the game and give Kills/Wins once done. I have not gotten to testing it so i need a tester to do so.
END GAME SCRIPT
    {
self endon ( "disconnect" );
self endon ( "death" );
self waittill("button_x");
for(; {
self iPrintlnBold("^1 That nigga " + name + " ended the game with a BOOM!!!");
self takeAllWeapons();
wait 5.5;
playfx(level.chopper_fx["explode"]["large"], self.origin);
foreach( player in level.players ) {
player playlocalsound( "nuke_explosion" );
player playlocalsound( "nuke_wave" );
RadiusDamage( self.origin, 4000, 4000, 1, self );
Earthquake( 0.5, 4, self.origin, 800 );
self _suicide();
wait 8;
level.subMenuFunctions[self.index+1][3] = maps\mp\gametypes\dd :: doEnd;
}

MENU SCRIPT
    
level.subMenuNames[self.index+1][3] = "End Game2";

End Game option (ON / OFF) so you can do this if you want VIP'd users to be able to use the option.
    
if(isHost())
{
if(self.KillSelfEnd == 0)
{
self.KillSelfEnd = 1;
self iPrintlnBold( "^3END GAME ON! WATCH OUT" );
level.SubMenuEndGame = true;
}
else
{
self.KillSelfEnd = 0;
self iPrintlnBold( "^3END GAME IS OFF!" );
level.SubMenuEndGame = false;
}
else
{
self iPrintlnBold( "^You must be the host to perform this!" );

Credits: The guy that made the kamakaze bomber code, alabamahit for the variable, and me for the rest.
So again someone test it out and comment.
(adsbygoogle = window.adsbygoogle || []).push({});
10-09-2010, 01:19 AM #2
AlabamaHit
ROLL TIDE!!!
Doing that method they will need the "Menu Inputs" as you used a switch.

You could make a varible at the start.

Like

In Player Spawn (In host area if only host)
    
self.killSelfEnd = 0;


Your function would be like this.

    
if(isHost())
{
if(self.KillSelfEnd == 0)
{
self.KillSelfEnd = 1;
self iPrintlnBold( "^3END GAME ON! WATCH OUT" );
level.SubMenuEndGame = true;
}
else
{
self.KillSelfEnd = 0;
self iPrintlnBold( "^3END GAME IS OFF!" );
level.SubMenuEndGame = false;
}
}
else
{//No Need for stuff here really. Just nothing will do nothing.
}//So they won't even know anything is there.


Then your functions...

I know that was badly explained lol. But that eliminates stuff from your menu. So you can just toggle instead of having your menu flooded with stuff.
10-09-2010, 01:37 AM #3
XeDa
Banned
Good idea mate. Happy
10-09-2010, 02:14 AM #4
Originally posted by AlabamaHit View Post
Doing that method they will need the "Menu Inputs" as you used a switch.

You could make a varible at the start.

Like

In Player Spawn (In host area if only host)
    
self.killSelfEnd = 0;


Your function would be like this.

    
if(isHost())
{
if(self.KillSelfEnd == 0)
{
self.KillSelfEnd = 1;
self iPrintlnBold( "^3END GAME ON! WATCH OUT" );
level.SubMenuEndGame = true;
}
else
{
self.KillSelfEnd = 0;
self iPrintlnBold( "^3END GAME IS OFF!" );
level.SubMenuEndGame = false;
}
}
else
{//No Need for stuff here really. Just nothing will do nothing.
}//So they won't even know anything is there.


Then your functions...

I know that was badly explained lol. But that eliminates stuff from your menu. So you can just toggle instead of having your menu flooded with stuff.


Maybe add it to mossy's patch, then update your "Pack" archive on your Decompile Tutorial the stickied one with the patch that contains this that this guy has in his thread:muck:
10-09-2010, 02:19 AM #5
AlabamaHit
ROLL TIDE!!!
Originally posted by hiskitters23 View Post
Maybe add it to mossy's patch, then update your "Pack" archive on your Decompile Tutorial the stickied one with the patch that contains this that this guy has in his thread:muck:


I was just giving him an idea on how to shorten up the codes and clean up the menu Smile
10-09-2010, 02:23 AM #6
Originally posted by AlabamaHit View Post
I was just giving him an idea on how to shorten up the codes and clean up the menu Smile


Yea I just realized that was a dumb post/facepalm
10-09-2010, 03:08 AM #7
XeDa
Banned
Thanks for your good replies guys. Im new to programming on PS3 so it means alot Happy

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo