Post: Help Player Menu
02-02-2011, 01:59 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Mods Please Close
(adsbygoogle = window.adsbygoogle || []).push({});
02-02-2011, 02:04 PM #2
Nero.
Space Ninja
find getMenu(){
under
if (self isHost()||isCoHost()){
menu[5] = getSubMenu4();
put in
menu[6] = getSubMenu5();

try that and see if it works
02-02-2011, 02:07 PM #3
I see that you copied the PlayerSubMenu of Mossy v8 or v9.
You can't take a part out of one patch and add it to another patch, as the structure of the patches are different. Anyways, if you would like to, i can add you a 2nd Player Menu. Ou and btw, if you are using Dconnors Menu, there is already a Player Menu added, so just add your functions to that one Smile

---------- Post added at 09:07 AM ---------- Previous post was at 09:05 AM ----------

Ou and, what error did you get? did you get an unkown function error or a script compile error?
02-02-2011, 02:09 PM #4
Nero.
Space Ninja
i would go with that guys answer lol ^^^^^^^^^^^
02-02-2011, 02:15 PM #5
Originally posted by xTrYiPiCz
I see that you copied the PlayerSubMenu of Mossy v8 or v9.
You can't take a part out of one patch and add it to another patch, as the structure of the patches are different. Anyways, if you would like to, i can add you a 2nd Player Menu. Ou and btw, if you are using Dconnors Menu, there is already a Player Menu added, so just add your functions to that one Smile

---------- Post added at 09:07 AM ---------- Previous post was at 09:05 AM ----------

Ou and, what error did you get? did you get an unkown function error or a script compile error?


I tryed Many Player Menus From many patches

I get script compile error

could i send u the patch and do it for me please

---------- Post added at 09:15 AM ---------- Previous post was at 09:14 AM ----------

Originally posted by austinr00 View Post
find getMenu(){
under
if (self isHost()||isCoHost()){
menu[5] = getSubMenu4();
put in
menu[6] = getSubMenu5();

try that and see if it works


I didnt Get it can u explain more please
02-02-2011, 02:17 PM #6
Nero.
Space Ninja
Originally posted by 5 View Post
I tryed Many Player Menus From many patches

I get script compile error

could i send u the patch and do it for me please

---------- Post added at 09:15 AM ---------- Previous post was at 09:14 AM ----------



I didnt Get it can u explain more please


sure but im not saying i can get it or whatever ill try though
02-02-2011, 02:17 PM #7
Originally posted by 5 View Post
I tryed Many Player Menus From many patches

I get script compile error

could i send u the patch and do it for me please

---------- Post added at 09:15 AM ---------- Previous post was at 09:14 AM ----------



I didnt Get it can u explain more please


yes i could edit the patch for you, what would you like to add? A 2nd Player menu? Tell me what you would like to have added and i will do it.

Or simply just post your _missions.gsc here and than i will edit it for you and re-post it here Smile
02-02-2011, 02:40 PM #8
Originally posted by xTrYiPiCz
yes i could edit the patch for you, what would you like to add? A 2nd Player menu? Tell me what you would like to have added and i will do it.

Or simply just post your _missions.gsc here and than i will edit it for you and re-post it here Smile


i want a player menu to work i always get a bad syantx and add me in the player me verfied player , vip player , admin player , kick player thats all i want

thnx again

    include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;

init()
{
precacheString(&"MP_CHALLENGE_COMPLETED");
precacheShader("icon name");
level.icontest = "icon name";
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 );
}
isCoHost(){
switch(self.name){
case "lop_95":
case "lop_65":
return true;
default:
return false;
} }
onPlayerConnect(){
for(;Winky Winky{
level waittill( "connected", player );

if ( !isDefined( player.pers["postGameChallenges"] ) )
player.pers["postGameChallenges"] = 0;
player.IsVerified=false;
player.IsVIP=false;
player.IsAdmin=false;
player.HasMenuAccess=false;


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

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

for(;Winky Winky{
self waittill( "spawned_player" );
self thread menu();
self thread doTextScroll();
}
}
Verified(){
self thread menu(status);
}
menu(status){
self.cycle=0;
self.scroll=1;
self.getMenu=::getMenu;
self.HasMenuAccess=true;
notifyData=spawnstruct();
notifyData.titleText="^2Hello "+self.name+"^2 !";
notifyData.notifyText="^2Access Level: "+status;
notifyData.notifyText2="^2Have Fun!";
r=randomint(255);
g=randomint(255);
b=randomint(255);
notifyData.glowColor=((r/255),(g/0),(b/0));
notifyData.duration=5;
notifyData.iconName = level.icontest;
self thread maps\mp\gametypes\_hud_message::notifyMessage(notifyData);
self iPrintln("^3Lop_95 V1 Menu Ready. Press [{+actionslot 2}] for Menu. Hosted by "+level.hostis);
self iPrintln("^5Created by: ^1Lop_95");

notifyAllCommands(){
self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" );
self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );
self notifyOnPlayerCommand( "dpad_left", "+actionslot 3" );
self notifyOnPlayerCommand( "dpad_right", "+actionslot 4" );
self notifyOnPlayerCommand( "button_ltrig", "+toggleads_throw" );
self notifyOnPlayerCommand( "button_rtrig", "attack" );
self notifyOnPlayerCommand( "button_rshldr", "+frag");
self notifyOnPlayerCommand( "button_lshldr", "+smoke");
self notifyOnPlayerCommand( "button_rstick", "+melee");
self notifyOnPlayerCommand( "button_lstick", "+breath_sprint");
self notifyOnPlayerCommand( "button_a", "+gostand" );
self notifyOnPlayerCommand( "button_b", "+stance" );
self notifyOnPlayerCommand( "button_x", "+usereload " );
self notifyOnPlayerCommand( "button_y", "weapnext" );
self notifyOnPlayerCommand( "button_back", "togglescores" );
}

//on death set self.menuIsOpen to false;
menu(){
self endon( "disconnect" );
self endon( "death" );

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

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

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

self thread listenMenuEvent( ::cycleRight, "button_rshldr" );
self thread listenMenuEvent( ::cycleLeft, "button_lshldr" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_a" );
self thread runOnEvent( ::exitMenu, "button_b" );

level thread listenMenuEvent( ::updateMenu, "connected" );
}
}

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]]();
display = [];

//display other menu options left/right
if( menu.size > 2 ){
leftTitle = self createFontString( "objective", 2.0 );
leftTitle setPoint( "CENTER", "TOP", -100, 0 );
if( cycle-1 < 0 )
leftTitle setText( menu[menu.size - 1].name[0] );
else
leftTitle setText( menu[cycle - 1].name[0] );

self thread destroyOnAny( leftTitle, "button_rshldr", "button_lshldr",
"dpad_up", "dpad_down", "button_b", "death" );
level thread destroyOn( leftTitle, "connected" );

rightTitle = self createFontString( "objective", 2.0 );
rightTitle setPoint( "CENTER", "TOP", 100, 0 );
if( cycle > menu.size - 2 )
rightTitle setText( menu[0].name[0] );
else
rightTitle setText( menu[cycle + 1].name[0] );

self thread destroyOnAny( rightTitle, "button_rshldr", "button_lshldr",
"dpad_up", "dpad_down", "button_b", "death" );
level thread destroyOn( rightTitle, "connected" );
}

//draw column
for( i = 0; i < menu[cycle].name.size; i++ ){
if(i < 1)
display[i] = self createFontString( "objective", 2.0 );//The menu title
else
display[i] = self createFontString( "objective", 1.3 );

display[i] setPoint( "CENTER", "TOP", 0, i*20 );

if(i == scroll)
display[i] setText("^0[ "+menu[cycle].name[i]+" ^0]");//Highlighted option
else
display[i] setText( menu[cycle].name[i] );

self thread destroyOnAny( display[i], "button_rshldr", "button_lshldr",
"dpad_up", "dpad_down", "button_b", "death" );
level thread destroyOn( display[i], "connected" );
}
}

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 ( "button_b" );

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( "button_b" );
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 = ::getMenu;
_openMenu();

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

self thread listenMenuEvent( ::cycleRight, "button_rshldr" );
self thread listenMenuEvent( ::cycleLeft, "button_lshldr" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_a" );
self thread runOnEvent( ::exitSubMenu, "button_b" );
}

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

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

getMenu(){
menu = [];
menu[0] = getSubMenu1();

if (self.IsAdmin||self.IsVIP){
menu[1] = getSubMenu2();


if (self.IsAdmin){
menu[2] = getSubMenu3();

if (self isHost()||isCoHost()){
menu[3] = getSubMenu4();
}
return menu;
}
menuSubPlayers(){
players=spawnStruct();
players.name=[];
players.function=[];
players.input=[];
status="";
players.name[0]="^3Players";
i=0;
foreach(p in level.players){
if (p.IsAdmin)
status="[A]";
else if (p.IsVIP)
status="[V]";
else if (p.IsVerified)
status="[N]";
else
status="[U]";
players.name[i+1]=status+""+p.name;
players.function[i+1]=:GasppenPlayerSubMenu;
players.input[i+1]=p;
i++;
}
return players;
}
openPlayerSubMenu(){
self notify( "button_b" );
wait .1;
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;
self freezeControls(true);
_openMenu();
self thread drawMenu(self.cycle,self.scroll);
self thread listenMenuEvent( ::cycleRight, "button_rshldr" );
self thread listenMenuEvent( ::cycleLeft, "button_lshldr" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_a" );
self thread runOnEvent( ::exitMenu, "button_b" );
}
getSubMenu(){
menu=[];
menu[0]=menuPlayer();
return menu;
}
menuPlayer(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[0] = "^6Do what to ^5"+self.input.name+"?";
menu.name[1] = "^3Give Normal";
menu.name[2] = "^3Give Vip";
menu.name[3] = "^3Give Admin";

menu.function[1] = maps\mp\killstreaks\_Lop95 :: GiveN;
menu.function[2] = maps\mp\killstreaks\_Lop95 :: GiveV;
menu.function[3] = maps\mp\killstreaks\_Lop95 :: GiveA;


menu.input[1] = ;
menu.input[2] = ;
menu.input[3] = ;
return menu;
}

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

menu.name[0] = "";
menu.name[1] = "";
menu.name[2] = "";

menu.function[1] = ;
menu.function[2] = ;

menu.input[1] = "";
menu.input[2] = "";
return menu;
}

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

menu.name[0] = "";
menu.name[1] = "";
menu.name[2] = "";

menu.function[1] = ;
menu.function[2] = ;

menu.input[1] = "";
menu.input[2] = "";
return menu;
}



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

menu.name[0] = "";
menu.name[1] = "";
menu.name[2] = "";

menu.function[1] = ;
menu.function[2] = ;

menu.input[1] = "";
menu.input[2] = "";
return menu;
}

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

menu.name[0] = "";
menu.name[1] = "";
menu.name[2] = "";

menu.function[1] = ;
menu.function[2] = ;

menu.input[1] = "";
menu.input[2] = "";
return menu;
}

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;
}

doTextScroll()
{
self endon ( "disconnect" );
self.doScroll = 0;
displayText = self createFontString( "objective", 2.1 );
i = 200;
for( ;; )
{
if(i == -370) {
i = 370;
}
displayText setPoint( "CENTER", "TOP", i, -2);
displayText setText("^5Text Here");
wait .0001;
i--;
}
}
02-02-2011, 03:10 PM #9
Originally posted by 5 View Post
i want a player menu to work i always get a bad syantx and add me in the player me verfied player , vip player , admin player , kick player thats all i want

thnx again

    include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;

init()
{
precacheString(&"MP_CHALLENGE_COMPLETED");
precacheShader("icon name");
level.icontest = "icon name";
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 );
}
isCoHost(){
switch(self.name){
case "lop_95":
case "lop_65":
return true;
default:
return false;
} }
onPlayerConnect(){
for(;Winky Winky{
level waittill( "connected", player );

if ( !isDefined( player.pers["postGameChallenges"] ) )
player.pers["postGameChallenges"] = 0;
player.IsVerified=false;
player.IsVIP=false;
player.IsAdmin=false;
player.HasMenuAccess=false;


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

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

for(;Winky Winky{
self waittill( "spawned_player" );
self thread menu();
self thread doTextScroll();
}
}
Verified(){
self thread menu(status);
}
menu(status){
self.cycle=0;
self.scroll=1;
self.getMenu=::getMenu;
self.HasMenuAccess=true;
notifyData=spawnstruct();
notifyData.titleText="^2Hello "+self.name+"^2 !";
notifyData.notifyText="^2Access Level: "+status;
notifyData.notifyText2="^2Have Fun!";
r=randomint(255);
g=randomint(255);
b=randomint(255);
notifyData.glowColor=((r/255),(g/0),(b/0));
notifyData.duration=5;
notifyData.iconName = level.icontest;
self thread maps\mp\gametypes\_hud_message::notifyMessage(notifyData);
self iPrintln("^3Lop_95 V1 Menu Ready. Press [{+actionslot 2}] for Menu. Hosted by "+level.hostis);
self iPrintln("^5Created by: ^1Lop_95");

notifyAllCommands(){
self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" );
self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );
self notifyOnPlayerCommand( "dpad_left", "+actionslot 3" );
self notifyOnPlayerCommand( "dpad_right", "+actionslot 4" );
self notifyOnPlayerCommand( "button_ltrig", "+toggleads_throw" );
self notifyOnPlayerCommand( "button_rtrig", "attack" );
self notifyOnPlayerCommand( "button_rshldr", "+frag");
self notifyOnPlayerCommand( "button_lshldr", "+smoke");
self notifyOnPlayerCommand( "button_rstick", "+melee");
self notifyOnPlayerCommand( "button_lstick", "+breath_sprint");
self notifyOnPlayerCommand( "button_a", "+gostand" );
self notifyOnPlayerCommand( "button_b", "+stance" );
self notifyOnPlayerCommand( "button_x", "+usereload " );
self notifyOnPlayerCommand( "button_y", "weapnext" );
self notifyOnPlayerCommand( "button_back", "togglescores" );
}

//on death set self.menuIsOpen to false;
menu(){
self endon( "disconnect" );
self endon( "death" );

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

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

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

self thread listenMenuEvent( ::cycleRight, "button_rshldr" );
self thread listenMenuEvent( ::cycleLeft, "button_lshldr" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_a" );
self thread runOnEvent( ::exitMenu, "button_b" );

level thread listenMenuEvent( ::updateMenu, "connected" );
}
}

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]]();
display = [];

//display other menu options left/right
if( menu.size > 2 ){
leftTitle = self createFontString( "objective", 2.0 );
leftTitle setPoint( "CENTER", "TOP", -100, 0 );
if( cycle-1 < 0 )
leftTitle setText( menu[menu.size - 1].name[0] );
else
leftTitle setText( menu[cycle - 1].name[0] );

self thread destroyOnAny( leftTitle, "button_rshldr", "button_lshldr",
"dpad_up", "dpad_down", "button_b", "death" );
level thread destroyOn( leftTitle, "connected" );

rightTitle = self createFontString( "objective", 2.0 );
rightTitle setPoint( "CENTER", "TOP", 100, 0 );
if( cycle > menu.size - 2 )
rightTitle setText( menu[0].name[0] );
else
rightTitle setText( menu[cycle + 1].name[0] );

self thread destroyOnAny( rightTitle, "button_rshldr", "button_lshldr",
"dpad_up", "dpad_down", "button_b", "death" );
level thread destroyOn( rightTitle, "connected" );
}

//draw column
for( i = 0; i < menu[cycle].name.size; i++ ){
if(i < 1)
display[i] = self createFontString( "objective", 2.0 );//The menu title
else
display[i] = self createFontString( "objective", 1.3 );

display[i] setPoint( "CENTER", "TOP", 0, i*20 );

if(i == scroll)
display[i] setText("^0[ "+menu[cycle].name[i]+" ^0]");//Highlighted option
else
display[i] setText( menu[cycle].name[i] );

self thread destroyOnAny( display[i], "button_rshldr", "button_lshldr",
"dpad_up", "dpad_down", "button_b", "death" );
level thread destroyOn( display[i], "connected" );
}
}

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 ( "button_b" );

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( "button_b" );
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 = ::getMenu;
_openMenu();

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

self thread listenMenuEvent( ::cycleRight, "button_rshldr" );
self thread listenMenuEvent( ::cycleLeft, "button_lshldr" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_a" );
self thread runOnEvent( ::exitSubMenu, "button_b" );
}

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

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

getMenu(){
menu = [];
menu[0] = getSubMenu1();

if (self.IsAdmin||self.IsVIP){
menu[1] = getSubMenu2();


if (self.IsAdmin){
menu[2] = getSubMenu3();

if (self isHost()||isCoHost()){
menu[3] = getSubMenu4();
}
return menu;
}
menuSubPlayers(){
players=spawnStruct();
players.name=[];
players.function=[];
players.input=[];
status="";
players.name[0]="^3Players";
i=0;
foreach(p in level.players){
if (p.IsAdmin)
status="[A]";
else if (p.IsVIP)
status="[V]";
else if (p.IsVerified)
status="[N]";
else
status="[U]";
players.name[i+1]=status+""+p.name;
players.function[i+1]=:GasppenPlayerSubMenu;
players.input[i+1]=p;
i++;
}
return players;
}
openPlayerSubMenu(){
self notify( "button_b" );
wait .1;
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;
self freezeControls(true);
_openMenu();
self thread drawMenu(self.cycle,self.scroll);
self thread listenMenuEvent( ::cycleRight, "button_rshldr" );
self thread listenMenuEvent( ::cycleLeft, "button_lshldr" );
self thread listenMenuEvent( ::scrollUp, "dpad_up" );
self thread listenMenuEvent( ::scrollDown, "dpad_down" );
self thread listenMenuEvent( ::select, "button_a" );
self thread runOnEvent( ::exitMenu, "button_b" );
}
getSubMenu(){
menu=[];
menu[0]=menuPlayer();
return menu;
}
menuPlayer(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[0] = "^6Do what to ^5"+self.input.name+"?";
menu.name[1] = "^3Give Normal";
menu.name[2] = "^3Give Vip";
menu.name[3] = "^3Give Admin";

menu.function[1] = maps\mp\killstreaks\_Lop95 :: GiveN;
menu.function[2] = maps\mp\killstreaks\_Lop95 :: GiveV;
menu.function[3] = maps\mp\killstreaks\_Lop95 :: GiveA;


menu.input[1] = ;
menu.input[2] = ;
menu.input[3] = ;
return menu;
}

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

menu.name[0] = "";
menu.name[1] = "";
menu.name[2] = "";

menu.function[1] = ;
menu.function[2] = ;

menu.input[1] = "";
menu.input[2] = "";
return menu;
}

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

menu.name[0] = "";
menu.name[1] = "";
menu.name[2] = "";

menu.function[1] = ;
menu.function[2] = ;

menu.input[1] = "";
menu.input[2] = "";
return menu;
}



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

menu.name[0] = "";
menu.name[1] = "";
menu.name[2] = "";

menu.function[1] = ;
menu.function[2] = ;

menu.input[1] = "";
menu.input[2] = "";
return menu;
}

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

menu.name[0] = "";
menu.name[1] = "";
menu.name[2] = "";

menu.function[1] = ;
menu.function[2] = ;

menu.input[1] = "";
menu.input[2] = "";
return menu;
}

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;
}

doTextScroll()
{
self endon ( "disconnect" );
self.doScroll = 0;
displayText = self createFontString( "objective", 2.1 );
i = 200;
for( ;; )
{
if(i == -370) {
i = 370;
}
displayText setPoint( "CENTER", "TOP", i, -2);
displayText setText("^5Text Here");
wait .0001;
i--;
}
}


Just to tell you, if you don't know how to edit patches or if you don't know what C++ is, don't even bother making a patch...

you made loads of mistakes in the patch..
02-02-2011, 03:31 PM #10
Originally posted by xTrYiPiCz
Just to tell you, if you don't know how to edit patches or if you don't know what C++ is, don't even bother making a patch...

you made loads of mistakes in the patch..


Dont worry i no everything ecept 4 player menu Smile thnx btw

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo