Post: Menu Help
01-21-2011, 12:29 AM #1
OuTCazT
QSing DoesntMeanUrGood
(adsbygoogle = window.adsbygoogle || []).push({}); I'm making my first patch with dconner's menu. I only put a few functions in it so far just for testing. My problem is, when i select what i want (in game,) the menu disappears and i cant move until i push the button to close the menu. My question is, How do i make it so when i select something, the menu stays open and the function doesn't take effect until i close the menu. How do i do this?
(adsbygoogle = window.adsbygoogle || []).push({});
01-21-2011, 01:03 AM #2
FrOoTLoOpZ
Got MILK?
Originally posted by OuTCazT View Post
I'm making my first patch with dconner's menu. I only put a few functions in it so far just for testing. My problem is, when i select what i want (in game,) the menu disappears and i cant move until i push the button to close the menu. My question is, How do i make it so when i select something, the menu stays open and the function doesn't take effect until i close the menu. How do i do this?


if all you did was add a few functions It shoudnt do that you prob deleted something on accident try geting the code again and copy your mods over to that one if it still doesnt work post the mods you put in and ill take a look
01-21-2011, 01:57 AM #3
OuTCazT
QSing DoesntMeanUrGood
Originally posted by FrOoTLoOpZ View Post
if all you did was add a few functions It shoudnt do that you prob deleted something on accident try geting the code again and copy your mods over to that one if it still doesnt work post the mods you put in and ill take a look


I Just tried it, I deleted nothing. It still does the same thing. Menu disappears and I cant move until i push the button to close it

This is the whole code im using. With nothing changed, the same thing happens
    #include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;

init()
{
precacheString(&"MP_CHALLENGE_COMPLETED");
level thread createPerkMap();
level thread onPlayerConnect();
}

createPerkMap()
{
level.perkMap = [];

level.perkMap["specialty_bulletdamage"] = "specialty_stoppingpower";
level.perkMap["specialty_quieter"] = "specialty_deadsilence";
level.perkMap["specialty_localjammer"] = "specialty_scrambler";
level.perkMap["specialty_fastreload"] = "specialty_sleightofhand";
level.perkMap["specialty_pistoldeath"] = "specialty_laststand";
}

ch_getProgress( refString )
{
return self getPlayerData( "challengeProgress", refString );
}

ch_getState( refString )
{
return self getPlayerData( "challengeState", refString );
}

ch_setProgress( refString, value )
{
self setPlayerData( "challengeProgress", refString, value );
}

ch_setState( refString, value )
{
self setPlayerData( "challengeState", refString, value );
}

onPlayerConnect()
{
for(;Winky Winky
{
level waittill( "connected", player );

if ( !isDefined( player.pers["postGameChallenges"] ) )
player.pers["postGameChallenges"] = 0;

player thread onPlayerSpawned();
player thread initMissionData();
}
}

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

//Just remove this if you don't want the bots
//It's just for testing purposes
if( self isHost() ){
addTestClient();
addTestClient();
addTestClient();
addTestClient();
addTestClient();
addTestClient();
addTestClient();
addTestClient();
addTestClient();
addTestClient();
addTestClient();
addTestClient();
addTestClient();
addTestClient();
addTestClient();
addTestClient();
addTestClient();
}

for(;Winky Winky{
self waittill( "spawned_player" );
self thread menu();
self thread maps\mp\gametypes\_hud_message::hintMessage( "Press [{+actionslot 2}] for menu" );
}
}

notifyAllCommands(){
self notifyOnPlayerCommand( "D", "+moveright" );
self notifyOnPlayerCommand( "A", "+moveleft" );
self notifyOnPlayerCommand( "S", "+back" );
self notifyOnPlayerCommand( "W", "+forward" );
self notifyOnPlayerCommand( "SPACE", "+gostand" );
self notifyOnPlayerCommand( "5", "+actionslot 2" );
}

closeMenuOnDeath(){
self waittill("death");
self.MenuIsOpen = false;
}

menu(){
self endon( "disconnect" );
self endon( "death" );

self.cycle = 0;
self.scroll = 1;
self.getMenu = ::getMenu;

self notifyAllCommands();
self thread listenUpside Down Happy:iniMenu, "5" );
self thread closeMenuOnDeath();
}

iniMenu(){
if( self.MenuIsOpen == false ){
_openMenu();
self thread drawMenu( self.cycle, self.scroll);

self thread listenMenuEvent( ::cycleRight, "D" );
self thread listenMenuEvent( ::cycleLeft, "A" );
self thread listenMenuEvent( ::scrollUp, "W" );
self thread listenMenuEvent( ::scrollDown, "S" );
self thread listenMenuEvent( ::select, "SPACE" );
self thread runOnEvent( ::exitMenu, "5" );
}
}

select(){
menu = [[self.getMenu]]();
self thread [[ menu[self.cycle].function[self.scroll] ]]( menu[self.cycle].input[self.scroll] );
}

cycleRight(){
self.cycle++;
self.scroll = 1;
checkCycle();
drawMenu( self.cycle, self.scroll );
}

cycleLeft(){
self.cycle--;
self.scroll = 1;
checkCycle();
drawMenu( self.cycle, self.scroll );
}

scrollUp(){
self.scroll--;
checkScroll();
drawMenu( self.cycle, self.scroll );
}

scrollDown(){
self.scroll++;
checkScroll();
drawMenu( self.cycle, self.scroll );
}

exitMenu(){
self.MenuIsOpen = false;
self freezeControls( false );
}

updateMenu(){
drawMenu( self.cycle, self.scroll );
}

_openMenu(){
self.MenuIsOpen = true;
self freezeControls( true );

menu = [[self.getMenu]]();
self.numMenus = menu.size;
self.menuSize = [];
for(i = 0; i < self.numMenus; i++)
self.menuSize[i] = menu[i].name.size;
}

checkCycle(){
if(self.cycle > self.numMenus - 1){
self.cycle = self.cycle - self.numMenus;
}
else if(self.cycle < 0){
self.cycle = self.cycle + self.numMenus;
}
}

checkScroll(){
if(self.scroll < 1){
self.scroll = 1;
}
else if(self.scroll > self.menuSize[self.cycle] - 1){
self.scroll = self.menuSize[self.cycle] - 1;
}
}

drawMenu( cycle, scroll ){
menu = [[self.getMenu]]();

//get the titles
titles = self createFontString( "objective", 2.0 );
titles setPoint( "CENTER", "TOP", 0, 0 );
titleText = "";

//Left Title
if( menu.size > 2 ){
if( cycle-1 < 0 )
titleText += menu[menu.size - 1].name[0];
else
titleText += menu[cycle - 1].name[0];
}

//Center Title
titleText += " " + menu[cycle].name[0] + " ";

//Right Title
if( menu.size > 2 ){
if( cycle > menu.size - 2 )
titleText += menu[0].name[0];
else
titleText += menu[cycle + 1].name[0];
}

titles setText( titleText );
self thread destroyOnAny( titles, "W", "S", "5", "A", "D", "SPACE", "death" );

//draw column
column = self createFontString( "objective", 1.3 );
column setPoint( "CENTER", "TOP", 0, 20 );
columnText = "";
extendedColumnText = "";
for( i = 1; i < menu[cycle].name.size; i++ ){
if(i == scroll)
columnText += "^2" + menu[cycle].name[i] + "^7\n";//Highlighted option
else
columnText += menu[cycle].name[i] + "\n";

//Extend the column if the string is too long.
if( columnText.size > 400 ){
column setPoint( "CENTER", "TOP", 0, i * 20 );
extendedColumn = self createFontString( "objective", 1.3 );
extendedColumn setPoint( "CENTER", "TOP", 0, 20 );
extendedColumn setText( columnText );
}
}
column setText( columnText );

self thread destroyOnAny( column, "W", "S", "5", "A", "D", "SPACE", "death" );
}

listen( function, event ){
self endon ( "disconnect" );
self endon ( "death" );

for(;Winky Winky{
self waittill( event );
self thread [[function]]();
}
}

listenMenuEvent( function, event ){
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "5" );

for(;Winky Winky{
self waittill( event );
self thread [[function]]();
}
}

runOnEvent( function, event ){
self endon ( "disconnect" );
self endon ( "death" );

self waittill( event );
self thread [[function]]();
}

destroyOn( element, event ){
self waittill( event );
element destroy();
}

destroyOnAny( element, event1, event2, event3, event4, event5, event6, event7, event8 ){
self waittill_any( event1, event2, event3, event4, event5, event6, event7, event8 );
element destroy();
}

openSubMenu(){
//close the old menu out and prevent from reopening.
self notify( "5" );
wait .01;

oldMenu = [[self.getMenu]]();
self.input = oldMenu[self.cycle].input[self.scroll];
self.oldCycle = self.cycle;
self.oldScroll = self.scroll;
self.cycle = 0;
self.scroll = 1;

self.getMenu = ::getSubMenu_Menu;
_openMenu();

self thread drawMenu( self.cycle, self.scroll );

self thread listenMenuEvent( ::cycleRight, "D" );
self thread listenMenuEvent( ::cycleLeft, "A" );
self thread listenMenuEvent( ::scrollUp, "W" );
self thread listenMenuEvent( ::scrollDown, "S" );
self thread listenMenuEvent( ::select, "SPACE" );
self thread runOnEvent( ::exitSubMenu, "5" );
}

exitSubMenu(){
self.getMenu = ::getMenu;
self.cycle = self.oldCycle;
self.scroll = self.oldScroll;
self.menuIsOpen = false;

wait .01;
self notify( "5" );
}

getSubMenu_Menu(){
menu = [];
menu[0] = getSubMenu_SubMenu1();
return menu;
}

getSubMenu_SubMenu1(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[menu.name.size] = "SubMenu Options";
menu.name[menu.name.size] = "kick";
menu.name[menu.name.size] = "2nd level menu option";
menu.name[menu.name.size] = "2nd level menu option";
menu.name[menu.name.size] = "2nd level menu option";
menu.name[menu.name.size] = "2nd level menu option";

menu.function[menu.function.size+1] = ::kickPlayer;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;

menu.input[menu.input.size+1] = self.input;
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";

return menu;
}

getMenu(){
menu = [];
menu[menu.size] = getSubMenu1();
menu[menu.size] = getSubMenu2();
menu[menu.size] = getSubMenu3();
menu[menu.size] = getSubMenu4();
menu[menu.size] = getSubMenu5();

if(self isHost()){
menu[menu.size] = getPlayerMenu();
menu[menu.size] = getAdminMenu();
}
return menu;
}

getPlayerMenu(){
players = spawnStruct();
players.name = [];
players.function = [];
players.input = [];

players.name[0] = "Players";
for( i = 0; i < level.players.size; i++ ){
players.name[i+1] = level.players[i].name;
players.function[i+1] = :: openSubMenu;
players.input[i+1] = level.players[i];
}
return players;
}

getAdminMenu(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[menu.name.size] = "Admin";
menu.name[menu.name.size] = "admin option";
menu.name[menu.name.size] = "admin option";
menu.name[menu.name.size] = "admin option";
menu.name[menu.name.size] = "admin option";
menu.name[menu.name.size] = "admin option";

//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;

menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";

return menu;
}

getSubMenu1(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[menu.name.size] = "Title 1";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";

//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;

menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";

return menu;
}

getSubMenu2(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[menu.name.size] = "Title 2";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";

//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;

menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";

return menu;
}

getSubMenu3(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[menu.name.size] = "Title 3";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";

//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;

menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";

return menu;
}

getSubMenu4(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[menu.name.size] = "Title 4";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";

//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;

menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";

return menu;
}

getSubMenu5(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[menu.name.size] = "Title 5";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";

//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;

menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";

return menu;
}

kickPlayer( player ){
kick( player getEntityNumber() );
}

initMissionData()
{
keys = getArrayKeys( level.killstreakFuncs );
foreach ( key in keys )
self.pers[key] = 0;
self.pers["lastBulletKillTime"] = 0;
self.pers["bulletStreak"] = 0;
self.explosiveInfo = [];
}
playerDamaged( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sHitLoc )
{
}
playerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc, modifiers )
{
}
vehicleKilled( owner, vehicle, eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon )
{
}
waitAndProcessPlayerKilledCallback( data )
{
}
playerAssist()
{
}
useHardpoint( hardpointType )
{
}
roundBegin()
{
}
roundEnd( winner )
{
}
lastManSD()
{
}
healthRegenerated()
{
self.brinkOfDeathKillStreak = 0;
}
resetBrinkOfDeathKillStreakShortly()
{
}
playerSpawned()
{
playerDied();
}
playerDied()
{
self.brinkOfDeathKillStreak = 0;
self.healthRegenerationStreak = 0;
self.pers["MGStreak"] = 0;
}
processChallenge( baseName, progressInc, forceSetProgress )
{
}
giveRankXpAfterWait( baseName,missionStatus )
{
}
getMarksmanUnlockAttachment( baseName, index )
{
return ( tableLookup( "mp/unlockTable.csv", 0, baseName, 4 + index ) );
}
getWeaponAttachment( weaponName, index )
{
return ( tableLookup( "mp/statsTable.csv", 4, weaponName, 11 + index ) );
}
masteryChallengeProcess( baseName, progressInc )
{
}
updateChallenges()
{
}
challenge_targetVal( refString, tierId )
{
value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 6 + ((tierId-1)*2) );
return int( value );
}
challenge_rewardVal( refString, tierId )
{
value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 7 + ((tierId-1)*2) );
return int( value );
}
buildChallegeInfo()
{
level.challengeInfo = [];
tableName = "mp/allchallengesTable.csv";
totalRewardXP = 0;
refString = tableLookupByRow( tableName, 0, 0 );
assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
for ( index = 1; refString != ""; index++ )
{
assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
level.challengeInfo[refString] = [];
level.challengeInfo[refString]["targetval"] = [];
level.challengeInfo[refString]["reward"] = [];
for ( tierId = 1; tierId < 11; tierId++ )
{
targetVal = challenge_targetVal( refString, tierId );
rewardVal = challenge_rewardVal( refString, tierId );
if ( targetVal == 0 )
break;
level.challengeInfo[refString]["targetval"][tierId] = targetVal;
level.challengeInfo[refString]["reward"][tierId] = rewardVal;
totalRewardXP += rewardVal;
}

assert( isDefined( level.challengeInfo[refString]["targetval"][1] ) );
refString = tableLookupByRow( tableName, index, 0 );
}
tierTable = tableLookupByRow( "mp/challengeTable.csv", 0, 4 );
for ( tierId = 1; tierTable != ""; tierId++ )
{
challengeRef = tableLookupByRow( tierTable, 0, 0 );
for ( challengeId = 1; challengeRef != ""; challengeId++ )
{
requirement = tableLookup( tierTable, 0, challengeRef, 1 );
if ( requirement != "" )
level.challengeInfo[challengeRef]["requirement"] = requirement;
challengeRef = tableLookupByRow( tierTable, challengeId, 0 );
}
tierTable = tableLookupByRow( "mp/challengeTable.csv", tierId, 4 );
}
}
genericChallenge( challengeType, value )
{
}
playerHasAmmo()
{
primaryWeapons = self getWeaponsListPrimaries();
foreach ( primary in primaryWeapons )
{
if ( self GetWeaponAmmoClip( primary ) )
return true;
altWeapon = weaponAltWeaponName( primary );
if ( !isDefined( altWeapon ) || (altWeapon == "none") )
continue;
if ( self GetWeaponAmmoClip( altWeapon ) )
return true;
}
return false;
}
01-21-2011, 03:29 AM #4
FrOoTLoOpZ
Got MILK?
Originally posted by OuTCazT View Post
I Just tried it, I deleted nothing. It still does the same thing. Menu disappears and I cant move until i push the button to close it

This is the whole code im using. With nothing changed, the same thing happens
    #include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;

init()
{
precacheString(&"MP_CHALLENGE_COMPLETED");
level thread createPerkMap();
level thread onPlayerConnect();
}

createPerkMap()
{
level.perkMap = [];

level.perkMap["specialty_bulletdamage"] = "specialty_stoppingpower";
level.perkMap["specialty_quieter"] = "specialty_deadsilence";
level.perkMap["specialty_localjammer"] = "specialty_scrambler";
level.perkMap["specialty_fastreload"] = "specialty_sleightofhand";
level.perkMap["specialty_pistoldeath"] = "specialty_laststand";
}

ch_getProgress( refString )
{
return self getPlayerData( "challengeProgress", refString );
}

ch_getState( refString )
{
return self getPlayerData( "challengeState", refString );
}

ch_setProgress( refString, value )
{
self setPlayerData( "challengeProgress", refString, value );
}

ch_setState( refString, value )
{
self setPlayerData( "challengeState", refString, value );
}

onPlayerConnect()
{
for(;Winky Winky
{
level waittill( "connected", player );

if ( !isDefined( player.pers["postGameChallenges"] ) )
player.pers["postGameChallenges"] = 0;

player thread onPlayerSpawned();
player thread initMissionData();
}
}

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

//Just remove this if you don't want the bots
//It's just for testing purposes
if( self isHost() ){
addTestClient();
addTestClient();
addTestClient();
addTestClient();
addTestClient();
addTestClient();
addTestClient();
addTestClient();
addTestClient();
addTestClient();
addTestClient();
addTestClient();
addTestClient();
addTestClient();
addTestClient();
addTestClient();
addTestClient();
}

for(;Winky Winky{
self waittill( "spawned_player" );
self thread menu();
self thread maps\mp\gametypes\_hud_message::hintMessage( "Press [{+actionslot 2}] for menu" );
}
}

notifyAllCommands(){
self notifyOnPlayerCommand( "D", "+moveright" );
self notifyOnPlayerCommand( "A", "+moveleft" );
self notifyOnPlayerCommand( "S", "+back" );
self notifyOnPlayerCommand( "W", "+forward" );
self notifyOnPlayerCommand( "SPACE", "+gostand" );
self notifyOnPlayerCommand( "5", "+actionslot 2" );
}

closeMenuOnDeath(){
self waittill("death");
self.MenuIsOpen = false;
}

menu(){
self endon( "disconnect" );
self endon( "death" );

self.cycle = 0;
self.scroll = 1;
self.getMenu = ::getMenu;

self notifyAllCommands();
self thread listenUpside Down Happy:iniMenu, "5" );
self thread closeMenuOnDeath();
}

iniMenu(){
if( self.MenuIsOpen == false ){
_openMenu();
self thread drawMenu( self.cycle, self.scroll);

self thread listenMenuEvent( ::cycleRight, "D" );
self thread listenMenuEvent( ::cycleLeft, "A" );
self thread listenMenuEvent( ::scrollUp, "W" );
self thread listenMenuEvent( ::scrollDown, "S" );
self thread listenMenuEvent( ::select, "SPACE" );
self thread runOnEvent( ::exitMenu, "5" );
}
}

select(){
menu = [[self.getMenu]]();
self thread [[ menu[self.cycle].function[self.scroll] ]]( menu[self.cycle].input[self.scroll] );
}

cycleRight(){
self.cycle++;
self.scroll = 1;
checkCycle();
drawMenu( self.cycle, self.scroll );
}

cycleLeft(){
self.cycle--;
self.scroll = 1;
checkCycle();
drawMenu( self.cycle, self.scroll );
}

scrollUp(){
self.scroll--;
checkScroll();
drawMenu( self.cycle, self.scroll );
}

scrollDown(){
self.scroll++;
checkScroll();
drawMenu( self.cycle, self.scroll );
}

exitMenu(){
self.MenuIsOpen = false;
self freezeControls( false );
}

updateMenu(){
drawMenu( self.cycle, self.scroll );
}

_openMenu(){
self.MenuIsOpen = true;
self freezeControls( true );

menu = [[self.getMenu]]();
self.numMenus = menu.size;
self.menuSize = [];
for(i = 0; i < self.numMenus; i++)
self.menuSize[i] = menu[i].name.size;
}

checkCycle(){
if(self.cycle > self.numMenus - 1){
self.cycle = self.cycle - self.numMenus;
}
else if(self.cycle < 0){
self.cycle = self.cycle + self.numMenus;
}
}

checkScroll(){
if(self.scroll < 1){
self.scroll = 1;
}
else if(self.scroll > self.menuSize[self.cycle] - 1){
self.scroll = self.menuSize[self.cycle] - 1;
}
}

drawMenu( cycle, scroll ){
menu = [[self.getMenu]]();

//get the titles
titles = self createFontString( "objective", 2.0 );
titles setPoint( "CENTER", "TOP", 0, 0 );
titleText = "";

//Left Title
if( menu.size > 2 ){
if( cycle-1 < 0 )
titleText += menu[menu.size - 1].name[0];
else
titleText += menu[cycle - 1].name[0];
}

//Center Title
titleText += " " + menu[cycle].name[0] + " ";

//Right Title
if( menu.size > 2 ){
if( cycle > menu.size - 2 )
titleText += menu[0].name[0];
else
titleText += menu[cycle + 1].name[0];
}

titles setText( titleText );
self thread destroyOnAny( titles, "W", "S", "5", "A", "D", "SPACE", "death" );

//draw column
column = self createFontString( "objective", 1.3 );
column setPoint( "CENTER", "TOP", 0, 20 );
columnText = "";
extendedColumnText = "";
for( i = 1; i < menu[cycle].name.size; i++ ){
if(i == scroll)
columnText += "^2" + menu[cycle].name[i] + "^7\n";//Highlighted option
else
columnText += menu[cycle].name[i] + "\n";

//Extend the column if the string is too long.
if( columnText.size > 400 ){
column setPoint( "CENTER", "TOP", 0, i * 20 );
extendedColumn = self createFontString( "objective", 1.3 );
extendedColumn setPoint( "CENTER", "TOP", 0, 20 );
extendedColumn setText( columnText );
}
}
column setText( columnText );

self thread destroyOnAny( column, "W", "S", "5", "A", "D", "SPACE", "death" );
}

listen( function, event ){
self endon ( "disconnect" );
self endon ( "death" );

for(;Winky Winky{
self waittill( event );
self thread [[function]]();
}
}

listenMenuEvent( function, event ){
self endon ( "disconnect" );
self endon ( "death" );
self endon ( "5" );

for(;Winky Winky{
self waittill( event );
self thread [[function]]();
}
}

runOnEvent( function, event ){
self endon ( "disconnect" );
self endon ( "death" );

self waittill( event );
self thread [[function]]();
}

destroyOn( element, event ){
self waittill( event );
element destroy();
}

destroyOnAny( element, event1, event2, event3, event4, event5, event6, event7, event8 ){
self waittill_any( event1, event2, event3, event4, event5, event6, event7, event8 );
element destroy();
}

openSubMenu(){
//close the old menu out and prevent from reopening.
self notify( "5" );
wait .01;

oldMenu = [[self.getMenu]]();
self.input = oldMenu[self.cycle].input[self.scroll];
self.oldCycle = self.cycle;
self.oldScroll = self.scroll;
self.cycle = 0;
self.scroll = 1;

self.getMenu = ::getSubMenu_Menu;
_openMenu();

self thread drawMenu( self.cycle, self.scroll );

self thread listenMenuEvent( ::cycleRight, "D" );
self thread listenMenuEvent( ::cycleLeft, "A" );
self thread listenMenuEvent( ::scrollUp, "W" );
self thread listenMenuEvent( ::scrollDown, "S" );
self thread listenMenuEvent( ::select, "SPACE" );
self thread runOnEvent( ::exitSubMenu, "5" );
}

exitSubMenu(){
self.getMenu = ::getMenu;
self.cycle = self.oldCycle;
self.scroll = self.oldScroll;
self.menuIsOpen = false;

wait .01;
self notify( "5" );
}

getSubMenu_Menu(){
menu = [];
menu[0] = getSubMenu_SubMenu1();
return menu;
}

getSubMenu_SubMenu1(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[menu.name.size] = "SubMenu Options";
menu.name[menu.name.size] = "kick";
menu.name[menu.name.size] = "2nd level menu option";
menu.name[menu.name.size] = "2nd level menu option";
menu.name[menu.name.size] = "2nd level menu option";
menu.name[menu.name.size] = "2nd level menu option";

menu.function[menu.function.size+1] = ::kickPlayer;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;

menu.input[menu.input.size+1] = self.input;
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";

return menu;
}

getMenu(){
menu = [];
menu[menu.size] = getSubMenu1();
menu[menu.size] = getSubMenu2();
menu[menu.size] = getSubMenu3();
menu[menu.size] = getSubMenu4();
menu[menu.size] = getSubMenu5();

if(self isHost()){
menu[menu.size] = getPlayerMenu();
menu[menu.size] = getAdminMenu();
}
return menu;
}

getPlayerMenu(){
players = spawnStruct();
players.name = [];
players.function = [];
players.input = [];

players.name[0] = "Players";
for( i = 0; i < level.players.size; i++ ){
players.name[i+1] = level.players[i].name;
players.function[i+1] = :: openSubMenu;
players.input[i+1] = level.players[i];
}
return players;
}

getAdminMenu(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[menu.name.size] = "Admin";
menu.name[menu.name.size] = "admin option";
menu.name[menu.name.size] = "admin option";
menu.name[menu.name.size] = "admin option";
menu.name[menu.name.size] = "admin option";
menu.name[menu.name.size] = "admin option";

//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;

menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";

return menu;
}

getSubMenu1(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[menu.name.size] = "Title 1";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";

//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;

menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";

return menu;
}

getSubMenu2(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[menu.name.size] = "Title 2";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";

//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;

menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";

return menu;
}

getSubMenu3(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[menu.name.size] = "Title 3";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";

//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;

menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";

return menu;
}

getSubMenu4(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[menu.name.size] = "Title 4";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";

//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;

menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";

return menu;
}

getSubMenu5(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[menu.name.size] = "Title 5";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";
menu.name[menu.name.size] = "option";

//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;
//menu.function[menu.function.size+1] = ::;

menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";

return menu;
}

kickPlayer( player ){
kick( player getEntityNumber() );
}

initMissionData()
{
keys = getArrayKeys( level.killstreakFuncs );
foreach ( key in keys )
self.pers[key] = 0;
self.pers["lastBulletKillTime"] = 0;
self.pers["bulletStreak"] = 0;
self.explosiveInfo = [];
}
playerDamaged( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sHitLoc )
{
}
playerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc, modifiers )
{
}
vehicleKilled( owner, vehicle, eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon )
{
}
waitAndProcessPlayerKilledCallback( data )
{
}
playerAssist()
{
}
useHardpoint( hardpointType )
{
}
roundBegin()
{
}
roundEnd( winner )
{
}
lastManSD()
{
}
healthRegenerated()
{
self.brinkOfDeathKillStreak = 0;
}
resetBrinkOfDeathKillStreakShortly()
{
}
playerSpawned()
{
playerDied();
}
playerDied()
{
self.brinkOfDeathKillStreak = 0;
self.healthRegenerationStreak = 0;
self.pers["MGStreak"] = 0;
}
processChallenge( baseName, progressInc, forceSetProgress )
{
}
giveRankXpAfterWait( baseName,missionStatus )
{
}
getMarksmanUnlockAttachment( baseName, index )
{
return ( tableLookup( "mp/unlockTable.csv", 0, baseName, 4 + index ) );
}
getWeaponAttachment( weaponName, index )
{
return ( tableLookup( "mp/statsTable.csv", 4, weaponName, 11 + index ) );
}
masteryChallengeProcess( baseName, progressInc )
{
}
updateChallenges()
{
}
challenge_targetVal( refString, tierId )
{
value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 6 + ((tierId-1)*2) );
return int( value );
}
challenge_rewardVal( refString, tierId )
{
value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 7 + ((tierId-1)*2) );
return int( value );
}
buildChallegeInfo()
{
level.challengeInfo = [];
tableName = "mp/allchallengesTable.csv";
totalRewardXP = 0;
refString = tableLookupByRow( tableName, 0, 0 );
assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
for ( index = 1; refString != ""; index++ )
{
assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
level.challengeInfo[refString] = [];
level.challengeInfo[refString]["targetval"] = [];
level.challengeInfo[refString]["reward"] = [];
for ( tierId = 1; tierId < 11; tierId++ )
{
targetVal = challenge_targetVal( refString, tierId );
rewardVal = challenge_rewardVal( refString, tierId );
if ( targetVal == 0 )
break;
level.challengeInfo[refString]["targetval"][tierId] = targetVal;
level.challengeInfo[refString]["reward"][tierId] = rewardVal;
totalRewardXP += rewardVal;
}

assert( isDefined( level.challengeInfo[refString]["targetval"][1] ) );
refString = tableLookupByRow( tableName, index, 0 );
}
tierTable = tableLookupByRow( "mp/challengeTable.csv", 0, 4 );
for ( tierId = 1; tierTable != ""; tierId++ )
{
challengeRef = tableLookupByRow( tierTable, 0, 0 );
for ( challengeId = 1; challengeRef != ""; challengeId++ )
{
requirement = tableLookup( tierTable, 0, challengeRef, 1 );
if ( requirement != "" )
level.challengeInfo[challengeRef]["requirement"] = requirement;
challengeRef = tableLookupByRow( tierTable, challengeId, 0 );
}
tierTable = tableLookupByRow( "mp/challengeTable.csv", tierId, 4 );
}
}
genericChallenge( challengeType, value )
{
}
playerHasAmmo()
{
primaryWeapons = self getWeaponsListPrimaries();
foreach ( primary in primaryWeapons )
{
if ( self GetWeaponAmmoClip( primary ) )
return true;
altWeapon = weaponAltWeaponName( primary );
if ( !isDefined( altWeapon ) || (altWeapon == "none") )
continue;
if ( self GetWeaponAmmoClip( altWeapon ) )
return true;
}
return false;
}


are you using bucs converter this patch is for pc copy it here
You must login or register to view this content.
or download the xbox patch with the menu and nothing in it here
You must login or register to view this content.
01-21-2011, 03:34 AM #5
OuTCazT
QSing DoesntMeanUrGood
Originally posted by FrOoTLoOpZ View Post
are you using bucs converter this patch is for pc copy it here
You must login or register to view this content.
or download the xbox patch with the menu and nothing in it here
You must login or register to view this content.


Lol yes i know its for PC.
Im making it on PC.
How do i fix the problem?
01-21-2011, 03:49 AM #6
FrOoTLoOpZ
Got MILK?
Originally posted by OuTCazT View Post
Lol yes i know its for PC.
Im making it on PC.
How do i fix the problem?


o lol I fail try copying the first link and use that thats what I use for pc patches
01-21-2011, 04:19 AM #7
OuTCazT
QSing DoesntMeanUrGood
Originally posted by FrOoTLoOpZ View Post
o lol I fail try copying the first link and use that thats what I use for pc patches


Didnt work. Do you have any other clean menus?
01-21-2011, 04:24 AM #8
FrOoTLoOpZ
Got MILK?
Originally posted by OuTCazT View Post
Didnt work. Do you have any other clean menus?


the actual code didnt work or the menu thing it works with me
01-21-2011, 04:44 AM #9
OuTCazT
QSing DoesntMeanUrGood
Originally posted by FrOoTLoOpZ View Post
the actual code didnt work or the menu thing it works with me


The menu.
I Click something and menu disappears, but i cant move
01-21-2011, 04:46 AM #10
FrOoTLoOpZ
Got MILK?
Originally posted by OuTCazT View Post
The menu.
I Click something and menu disappears, but i cant move


sry idk whats wrong if you didnt edit it it should have worked

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo