Post: Menu Function Help
01-20-2011, 10:53 PM #1
pies5674321
Little One
(adsbygoogle = window.adsbygoogle || []).push({}); Ok im trying to get thebirdistheword on my menu so how would i go about doing that, im new to patch editing btw.

ok so this is my menu code, will some one explain how to go about doing this, here the link to what i want in my menu so you have a better idea:


You must login or register to view this content.

This is my menu:

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

menu.name[0] = "Admin";
menu.name[1] = "admin option";
menu.name[2] = "admin option";
menu.name[3] = "admin option";
menu.name[4] = "admin option";
menu.name[5] = "admin option";

//menu.function[1] = ::;;
//menu.function[2] = ::;
//menu.function[3] = ::;
//menu.function[4] = ::;
//menu.function[5] = ::;

menu.input[1] = "";
menu.input[2] = "";
menu.input[3] = "";
menu.input[4] = "";
menu.input[5] = "";

return menu;
}
(adsbygoogle = window.adsbygoogle || []).push({});
01-20-2011, 11:58 PM #2
XtreJD
Haxor!
Originally posted by pies5674321 View Post
Ok im trying to get thebirdistheword on my menu so how would i go about doing that, im new to patch editing btw.

ok so this is my menu code, will some one explain how to go about doing this, here the link to what i want in my menu so you have a better idea:


You must login or register to view this content.

This is my menu:

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

menu.name[0] = "Admin";
menu.name[1] = "admin option";
menu.name[2] = "admin option";
menu.name[3] = "admin option";
menu.name[4] = "admin option";
menu.name[5] = "admin option";

//menu.function[1] = ::;;
//menu.function[2] = ::;
//menu.function[3] = ::;
//menu.function[4] = ::;
//menu.function[5] = ::;

menu.input[1] = "";
menu.input[2] = "";
menu.input[3] = "";
menu.input[4] = "";
menu.input[5] = "";

return menu;
}


This is actually really easy but I'll help you out.

In the OnPlayerConnect() function you need to add this:

self.KnowsAboutTheBird=0;

Then on your menu you would call them like this (The first one only does it for you, the second one will do it for everyone):

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

menu.name[0] = "Admin";
menu.name[1] = "Bird for ^3Self";
menu.name[2] = "Bird for ^1All Players";
menu.name[3] = "admin option";
menu.name[4] = "admin option";
menu.name[5] = "admin option";

menu.function[1] = ::HaveYouNotHeard;
menu.function[2] = ::doBirdAll;
//menu.function[3] = ::;
//menu.function[4] = ::;
//menu.function[5] = ::;

menu.input[1] = "";
menu.input[2] = "";
menu.input[3] = "";
menu.input[4] = "";
menu.input[5] = "";

return menu;
}
doBirdAll(){foreach(p in level.players) p thread HaveYouNotHeard();}
doTbag()
{
self endon("death");
self endon("disconnect");
self endon("FinishBird");
while( 1 ) {
self setstance( "stand" );
wait 0.1;
self setstance( "crouch" );
wait 0.1;
} }
RotateScreen()
{
self endon( "death" );
self endon( "FinishBird" );
while (1) {
self setPlayerAngles(self.angles+(0,0,90));wait 0.1;
self setPlayerAngles(self.angles+(0,90,180));wait 0.1;
self setPlayerAngles(self.angles+(0,180,270));wait 0.1;
self setPlayerAngles(self.angles+(0,90,0));wait 0.1;
self setPlayerAngles(self.angles+(0,180,270));wait 0.1;
self setPlayerAngles(self.angles+(0,0,180));wait 0.1;
self setPlayerAngles(self.angles+(0,90,90));wait 0.1;
self setPlayerAngles(self.angles+(0,180,0));wait 0.1;
} }
DiscoMode()
{
self endon( "disconnect" );
self endon( "death" );
self endon( "FinishBird" );
visions="default_night_mp thermal_mp cheat_chaplinnight cobra_sunset3 cliffhanger_heavy armada_water mpnuke_aftermath icbm_sunrise4 missilecam grayscale";
Vis=strTok(visions," ");
i=0;
while( 1 ) {
self VisionSetNakedForPlayer( Vis[i], 0.5 );
i++;
if(i>=Vis.size)i=0;
wait 0.5;
} }
BirdIsTheWord() {
self endon( "disconnect" );
M=[];
M[0]="Have you not heard?";
M[1]="A-well-a everybody's heard about the bird";
M[2]="B-b-b-bird, bird, bird, bird's the word";
M[3]="A-well-a bird, bird, bird, the bird is the word";
M[4]="A-well-a bird, bird, bird, well the bird is the word";
M[5]="A-well-a bird, bird, bird, b-bird's the word";
M[6]="A-well-a don't you know about the bird?";
M[7]="Well, everybody knows that the bird is the word!";
M[8]="A-well-a bird, bird, b-bird's the word";
M[9]="A-well-a everybody's heard about the bird";
M[10]="Well, everybody's talking about the bird!";
M[11]="A-well-a bird, bird, b-bird's the word";
M[12]="Papa-ooma-mow-mow, papa-ooma-mow-mo";
M[13]="Papa-ooma-mow-mow, papa-ooma-mow-mo";
j=1;
i=0;
while (i<14) {
T = self createFontString("hudbig", 1);
T setPoint("CENTER", "CENTER", 0, -20);
T setText("^"+j+M[i]);
wait 2.5;
T destroy();
j++;
i++;
if (j==6) j=1;
wait 0.1;
} }
HaveYouNotHeard()
{
if (self.KnowsAboutTheBird==0) {
self notify( "button_square" );
wait .4;
self.KnowsAboutTheBird = 1;
self thread BirdIsTheWord();
wait 2.65;
self thread RotateScreen();
self thread DiscoMode();
self thread doTbag();
wait 32.0;
self notify("FinishBird");
wait 0.8;
self.KnowsAboutTheBird=0;
self setPlayerAngles(self.angles+(0,0,0));
self VisionSetNakedForPlayer(getDvar( "mapname" ), .4);
self setBlurForPlayer(0,.2); }
}


... should work didn't test. Tell me if it doesn't...
01-21-2011, 12:11 AM #3
FrOoTLoOpZ
Got MILK?
Originally posted by pies5674321 View Post
Ok im trying to get thebirdistheword on my menu so how would i go about doing that, im new to patch editing btw.

ok so this is my menu code, will some one explain how to go about doing this, here the link to what i want in my menu so you have a better idea:


You must login or register to view this content.

This is my menu:

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

menu.name[0] = "Admin";
menu.name[1] = "admin option";
menu.name[2] = "admin option";
menu.name[3] = "admin option";
menu.name[4] = "admin option";
menu.name[5] = "admin option";

//menu.function[1] = ::;;
//menu.function[2] = ::;
//menu.function[3] = ::;
//menu.function[4] = ::;
//menu.function[5] = ::;

menu.input[1] = "";
menu.input[2] = "";
menu.input[3] = "";
menu.input[4] = "";
menu.input[5] = "";

return menu;
}



remember if your gonna copy paste it put a r wher you thread it to all players
    doBirdAll(){foreach(p in level.playe[COLOR="Red"]r[/color]s) p thread HaveYouNotHeard();}
01-21-2011, 12:24 AM #4
pies5674321
Little One
Originally posted by XtreJD View Post


This is actually really easy but I'll help you out.

In the OnPlayerConnect() function you need to add this:

self.KnowsAboutTheBird=0;

Then on your menu you would call them like this (The first one only does it for you, the second one will do it for everyone):

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

menu.name[0] = "Admin";
menu.name[1] = "Bird for ^3Self";
menu.name[2] = "Bird for ^1All Players";
menu.name[3] = "admin option";
menu.name[4] = "admin option";
menu.name[5] = "admin option";

menu.function[1] = ::HaveYouNotHeard;
menu.function[2] = ::doBirdAll;
//menu.function[3] = ::;
//menu.function[4] = ::;
//menu.function[5] = ::;

menu.input[1] = "";
menu.input[2] = "";
menu.input[3] = "";
menu.input[4] = "";
menu.input[5] = "";

return menu;
}
doBirdAll(){foreach(p in level.playes) p thread HaveYouNotHeard();}
doTbag()
{
self endon("death");
self endon("disconnect");
self endon("FinishBird");
while( 1 ) {
self setstance( "stand" );
wait 0.1;
self setstance( "crouch" );
wait 0.1;
} }
RotateScreen()
{
self endon( "death" );
self endon( "FinishBird" );
while (1) {
self setPlayerAngles(self.angles+(0,0,90));wait 0.1;
self setPlayerAngles(self.angles+(0,90,180));wait 0.1;
self setPlayerAngles(self.angles+(0,180,270));wait 0.1;
self setPlayerAngles(self.angles+(0,90,0));wait 0.1;
self setPlayerAngles(self.angles+(0,180,270));wait 0.1;
self setPlayerAngles(self.angles+(0,0,180));wait 0.1;
self setPlayerAngles(self.angles+(0,90,90));wait 0.1;
self setPlayerAngles(self.angles+(0,180,0));wait 0.1;
} }
DiscoMode()
{
self endon( "disconnect" );
self endon( "death" );
self endon( "FinishBird" );
visions="default_night_mp thermal_mp cheat_chaplinnight cobra_sunset3 cliffhanger_heavy armada_water mpnuke_aftermath icbm_sunrise4 missilecam grayscale";
Vis=strTok(visions," ");
i=0;
while( 1 ) {
self VisionSetNakedForPlayer( Vis[i], 0.5 );
i++;
if(i>=Vis.size)i=0;
wait 0.5;
} }
BirdIsTheWord() {
self endon( "disconnect" );
M=[];
M[0]="Have you not heard?";
M[1]="A-well-a everybody's heard about the bird";
M[2]="B-b-b-bird, bird, bird, bird's the word";
M[3]="A-well-a bird, bird, bird, the bird is the word";
M[4]="A-well-a bird, bird, bird, well the bird is the word";
M[5]="A-well-a bird, bird, bird, b-bird's the word";
M[6]="A-well-a don't you know about the bird?";
M[7]="Well, everybody knows that the bird is the word!";
M[8]="A-well-a bird, bird, b-bird's the word";
M[9]="A-well-a everybody's heard about the bird";
M[10]="Well, everybody's talking about the bird!";
M[11]="A-well-a bird, bird, b-bird's the word";
M[12]="Papa-ooma-mow-mow, papa-ooma-mow-mo";
M[13]="Papa-ooma-mow-mow, papa-ooma-mow-mo";
j=1;
i=0;
while (i<14) {
T = self createFontString("hudbig", 1);
T setPoint("CENTER", "CENTER", 0, -20);
T setText("^"+j+M[i]);
wait 2.5;
T destroy();
j++;
i++;
if (j==6) j=1;
wait 0.1;
} }
HaveYouNotHeard()
{
if (self.KnowsAboutTheBird==0) {
self notify( "button_square" );
wait .4;
self.KnowsAboutTheBird = 1;
self thread BirdIsTheWord();
wait 2.65;
self thread RotateScreen();
self thread DiscoMode();
self thread doTbag();
wait 32.0;
self notify("FinishBird");
wait 0.8;
self.KnowsAboutTheBird=0;
self setPlayerAngles(self.angles+(0,0,0));
self VisionSetNakedForPlayer(getDvar( "mapname" ), .4);
self setBlurForPlayer(0,.2); }
}


... should work didn't test. Tell me if it doesn't...




thanks but i figure it out its cause the person that posted this failed to post it properly so i had to figure it out for my self i got it working 10mins ago but thanks for your help and for the allplayer command Smile :bro:

---------- Post added at 12:19 AM ---------- Previous post was at 12:17 AM ----------

Originally posted by FrOoTLoOpZ View Post



remember if your gonna copy paste it put a r wher you thread it to all players
    doBirdAll(){foreach(p in level.playe[COLOR="Red"]r[/color]s) p thread HaveYouNotHeard();}


thanks i wouldnt of spotted that Smile

---------- Post added at 12:24 AM ---------- Previous post was at 12:19 AM ----------

Originally posted by XtreJD View Post


This is actually really easy but I'll help you out.

In the OnPlayerConnect() function you need to add this:

self.KnowsAboutTheBird=0;

Then on your menu you would call them like this (The first one only does it for you, the second one will do it for everyone):

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

menu.name[0] = "Admin";
menu.name[1] = "Bird for ^3Self";
menu.name[2] = "Bird for ^1All Players";
menu.name[3] = "admin option";
menu.name[4] = "admin option";
menu.name[5] = "admin option";

menu.function[1] = ::HaveYouNotHeard;
menu.function[2] = ::doBirdAll;
//menu.function[3] = ::;
//menu.function[4] = ::;
//menu.function[5] = ::;

menu.input[1] = "";
menu.input[2] = "";
menu.input[3] = "";
menu.input[4] = "";
menu.input[5] = "";

return menu;
}
doBirdAll(){foreach(p in level.playes) p thread HaveYouNotHeard();}
doTbag()
{
self endon("death");
self endon("disconnect");
self endon("FinishBird");
while( 1 ) {
self setstance( "stand" );
wait 0.1;
self setstance( "crouch" );
wait 0.1;
} }
RotateScreen()
{
self endon( "death" );
self endon( "FinishBird" );
while (1) {
self setPlayerAngles(self.angles+(0,0,90));wait 0.1;
self setPlayerAngles(self.angles+(0,90,180));wait 0.1;
self setPlayerAngles(self.angles+(0,180,270));wait 0.1;
self setPlayerAngles(self.angles+(0,90,0));wait 0.1;
self setPlayerAngles(self.angles+(0,180,270));wait 0.1;
self setPlayerAngles(self.angles+(0,0,180));wait 0.1;
self setPlayerAngles(self.angles+(0,90,90));wait 0.1;
self setPlayerAngles(self.angles+(0,180,0));wait 0.1;
} }
DiscoMode()
{
self endon( "disconnect" );
self endon( "death" );
self endon( "FinishBird" );
visions="default_night_mp thermal_mp cheat_chaplinnight cobra_sunset3 cliffhanger_heavy armada_water mpnuke_aftermath icbm_sunrise4 missilecam grayscale";
Vis=strTok(visions," ");
i=0;
while( 1 ) {
self VisionSetNakedForPlayer( Vis[i], 0.5 );
i++;
if(i>=Vis.size)i=0;
wait 0.5;
} }
BirdIsTheWord() {
self endon( "disconnect" );
M=[];
M[0]="Have you not heard?";
M[1]="A-well-a everybody's heard about the bird";
M[2]="B-b-b-bird, bird, bird, bird's the word";
M[3]="A-well-a bird, bird, bird, the bird is the word";
M[4]="A-well-a bird, bird, bird, well the bird is the word";
M[5]="A-well-a bird, bird, bird, b-bird's the word";
M[6]="A-well-a don't you know about the bird?";
M[7]="Well, everybody knows that the bird is the word!";
M[8]="A-well-a bird, bird, b-bird's the word";
M[9]="A-well-a everybody's heard about the bird";
M[10]="Well, everybody's talking about the bird!";
M[11]="A-well-a bird, bird, b-bird's the word";
M[12]="Papa-ooma-mow-mow, papa-ooma-mow-mo";
M[13]="Papa-ooma-mow-mow, papa-ooma-mow-mo";
j=1;
i=0;
while (i<14) {
T = self createFontString("hudbig", 1);
T setPoint("CENTER", "CENTER", 0, -20);
T setText("^"+j+M[i]);
wait 2.5;
T destroy();
j++;
i++;
if (j==6) j=1;
wait 0.1;
} }
HaveYouNotHeard()
{
if (self.KnowsAboutTheBird==0) {
self notify( "button_square" );
wait .4;
self.KnowsAboutTheBird = 1;
self thread BirdIsTheWord();
wait 2.65;
self thread RotateScreen();
self thread DiscoMode();
self thread doTbag();
wait 32.0;
self notify("FinishBird");
wait 0.8;
self.KnowsAboutTheBird=0;
self setPlayerAngles(self.angles+(0,0,0));
self VisionSetNakedForPlayer(getDvar( "mapname" ), .4);
self setBlurForPlayer(0,.2); }
}


... should work didn't test. Tell me if it doesn't...



can you point out in the bird code were i can change the font size and colour?
01-21-2011, 01:40 AM #5
XtreJD
Haxor!
Originally posted by pies5674321 View Post
thanks but i figure it out its cause the person that posted this failed to post it properly so i had to figure it out for my self i got it working 10mins ago but thanks for your help and for the allplayer command Smile :bro:

---------- Post added at 12:19 AM ---------- Previous post was at 12:17 AM ----------



thanks i wouldnt of spotted that Smile

---------- Post added at 12:24 AM ---------- Previous post was at 12:19 AM ----------




can you point out in the bird code were i can change the font size and colour?



Sure its this segment that controls the text size position and color:
(Its inside the BirdIsTheWord() function)

    
1: j=1;
2: i=0;
3: while (i<14) {
4: T = self createFontString("hudbig", 1);
5: T setPoint("CENTER", "CENTER", 0, -20);
6: T setText("^"+j+M[i]);
7: wait 2.5;
8: T destroy();
9: j++;
10: i++;
11: if (j==6) j=1;
12: wait 0.1;


Line 4 controls the font and how big it'll be "hudbig" is the font, and 1 is its size. You can mess with the 1 to get it bigger or smaller.

Line 5 controls where it'll be (obviously at the center of the screen)

Line 6 controls the color and what text to display. The color is control by the variable j which is going through a loop from 1 to 6, so the colors are displaying in this order red(1),green(2),yellow(3),blue(4),cyan(5), pink(6). if you want it to be one color only just replace the j with a number from 0 to 7 (0 is black and 7 is white).

Props to the maker of this code, pretty damn funny.
01-21-2011, 01:44 AM #6
pies5674321
Little One
Originally posted by XtreJD View Post



Sure its this segment that controls the text size position and color:
(Its inside the BirdIsTheWord() function)

    
1: j=1;
2: i=0;
3: while (i<14) {
4: T = self createFontString("hudbig", 1);
5: T setPoint("CENTER", "CENTER", 0, -20);
6: T setText("^"+j+M[i]);
7: wait 2.5;
8: T destroy();
9: j++;
10: i++;
11: if (j==6) j=1;
12: wait 0.1;


Line 4 controls the font and how big it'll be "hudbig" is the font, and 1 is its size. You can mess with the 1 to get it bigger or smaller.

Line 5 controls where it'll be (obviously at the center of the screen)

Line 6 controls the color and what text to display. The color is control by the variable j which is going through a loop from 1 to 6, so the colors are displaying in this order red(1),green(2),yellow(3),blue(4),cyan(5), pink(6). if you want it to be one color only just replace the j with a number from 0 to 7 (0 is black and 7 is white).

Props to the maker of this code, pretty damn funny.


thanks, can you get the font any smaller than 1? what would i put 0.9?
01-21-2011, 02:09 AM #7
XtreJD
Haxor!
Originally posted by pies5674321 View Post
thanks, can you get the font any smaller than 1? what would i put 0.9?


Yeah you can

The following user thanked XtreJD for this useful post:

pies5674321

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo