To Noobs: Scroll Menu Tutorial

Posts 1–15 of 16 · Page 1 of 2
To Noobs: Scroll Menu Tutorial
I know there aren't too many examples out there explaining what it is...
But this is an old method which I used when I first started...
A Scroll Menu is a small Menu which is easy to make. You activate the menu by... Simply... Scrolling.
I dont know who to give credits to.... So just tell me in the comments and Ill edit this post and put it in.

Here is an example:


Code:
player addAction ["God",{[]spawn N30N ;}];

				N30N =  {

Player AllowDamage False;				

};
The "Player AddAction" counts as one action for the scroll... And the option you will select when you are scrolling is "God".
Where it says "[]spawn N30N" its basically saying to spawn a variable...
Then underneath the script the variable is "N30N"... So the AddAction basically calls "N30N" and executes the variable... In the variable we have "Player AllowDamage False;" which represents God Mode, this is just an example so you can put you own scripts in and add more options.

Since the script in the variable "N30N" is only 3 words... You wouldnt usually paste a small script in Variables unless you have all the time in the world...
A method to do Small Scripts is like this:


Code:
player addAction ["God",{player allowDamage false;hint "God Mode Activated";}];
Use this ^(above) if its something small like God Mode.



Variables are usually used for something like this which is a longer piece of code:


Code:
player addAction ["$1,000,000 Hand Cash",{[]spawn CreditsToJME ;}];
				CreditsToJME=  {
				
					if(!isNil "life_no_injection") then {life_no_injection = true;};
					life_cash = life_cash + 1000000;
					if(!isNil "life_no_injection") then {life_no_injection = false;};

};
So... you have your first action... How can you add more actions?
Too easy.. Just paste it again like this:


Code:
player addAction ["$1,000,000 Hand Cash",{[]spawn CreditsToJME ;}];
				CreditsToJME=  {
				
					if(!isNil "life_no_injection") then {life_no_injection = true;};
					life_cash = life_cash + 1000000;
					if(!isNil "life_no_injection") then {life_no_injection = false;};

};


player addAction ["$500,000 Hand Cash",{[]spawn Mr_Neon ;}];
				Mr_Neon=  {
				
					if(!isNil "life_no_injection") then {life_no_injection = true;};
					life_cash = life_cash + 500000;
					if(!isNil "life_no_injection") then {life_no_injection = false;};

};

player addAction ["PROCESSED Diamond",{[true,"diamondc",1] call life_fnc_handleInv;hint "Received 1 Diamond";}];
This Script adds three actions which is "PROCESSED Diamond", "$1,000,000 Hand Cash" and "$500,000" which will appear when you scroll.

Just make sure that the variable names are different for each action as the script will not work if all variables are named this same.
And Noobs... To execute this in a game you need an injector.


Credits:
Credits to MokoMoko for Diamond Script in AltisLifeRPG Website.
Credits to JME for Altis Money Script
If I missed you, Ill paste below... Just tell me in the comments
Also another thing you could add is the removeAction function to refresh your scroll menu instead of having to re-log to do that. @NeonSabre123
Quote Originally Posted by NeonSabre123 View Post
You mean like a sub menu? @gladtwoown
No no no, some thing like this.
Code:
 player removeaction lookimavariable; 
 lookimavariable= player addAction ["God",{player allowDamage false;hint "God Mode Activated";}];
And the purpose of this is so that the "god mode" gets removed when you re execute your .sqf what happens is it runs the new code in your .sqf that you changed and than puts the new code in, without having to relog so that the scroll menu goes away.
Add "removeAllActions player;"! :P
And some more stuff
Or just you can add Toggle for disabling cheat
Quote Originally Posted by titans View Post
Or just you can add Toggle for disabling cheat
Well the title does say "To Noobs: Scroll Menu Tutorial" so If you would like to make a tutorial on "To Advanced People: Scroll Menu Tutorial" go ahead and make that.
Quote Originally Posted by gladtwoown View Post
Well the title does say "To Noobs: Scroll Menu Tutorial" so If you would like to make a tutorial on "To Advanced People: Scroll Menu Tutorial" go ahead and make that.
haha, yeah i'll do that when i'm back
@titans
@gladtwoown
Yeah well if you could make a tutorial for Advanced that would be great :P I made this tut for Noobs who need abit of a head start.
Quote Originally Posted by NeonSabre123 View Post
I know there aren't too many examples out there explaining what it is...
But this is an old method which I used when I first started...
A Scroll Menu is a small Menu which is easy to make. You activate the menu by... Simply... Scrolling.
I dont know who to give credits to.... So just tell me in the comments and Ill edit this post and put it in.

Here is an example:


Code:
player addAction ["God",{[]spawn N30N ;}];

				N30N =  {

Player AllowDamage False;				

};
The "Player AddAction" counts as one action for the scroll... And the option you will select when you are scrolling is "God".
Where it says "[]spawn N30N" its basically saying to spawn a variable...
Then underneath the script the variable is "N30N"... So the AddAction basically calls "N30N" and executes the variable... In the variable we have "Player AllowDamage False;" which represents God Mode, this is just an example so you can put you own scripts in and add more options.

Since the script in the variable "N30N" is only 3 words... You wouldnt usually paste a small script in Variables unless you have all the time in the world...
A method to do Small Scripts is like this:


Code:
player addAction ["God",{player allowDamage false;hint "God Mode Activated";}];
Use this ^(above) if its something small like God Mode.



Variables are usually used for something like this which is a longer piece of code:


Code:
player addAction ["$1,000,000 Hand Cash",{[]spawn CreditsToJME ;}];
				CreditsToJME=  {
				
					if(!isNil "life_no_injection") then {life_no_injection = true;};
					life_cash = life_cash + 1000000;
					if(!isNil "life_no_injection") then {life_no_injection = false;};

};
So... you have your first action... How can you add more actions?
Too easy.. Just paste it again like this:


Code:
player addAction ["$1,000,000 Hand Cash",{[]spawn CreditsToJME ;}];
				CreditsToJME=  {
				
					if(!isNil "life_no_injection") then {life_no_injection = true;};
					life_cash = life_cash + 1000000;
					if(!isNil "life_no_injection") then {life_no_injection = false;};

};


player addAction ["$500,000 Hand Cash",{[]spawn Mr_Neon ;}];
				Mr_Neon=  {
				
					if(!isNil "life_no_injection") then {life_no_injection = true;};
					life_cash = life_cash + 500000;
					if(!isNil "life_no_injection") then {life_no_injection = false;};

};

player addAction ["PROCESSED Diamond",{[true,"diamondc",1] call life_fnc_handleInv;hint "Received 1 Diamond";}];
This Script adds three actions which is "PROCESSED Diamond", "$1,000,000 Hand Cash" and "$500,000" which will appear when you scroll.

Just make sure that the variable names are different for each action as the script will not work if all variables are named this same.
And Noobs... To execute this in a game you need an injector.


Credits:
Credits to MokoMoko for Diamond Script in AltisLifeRPG Website.
Credits to JME for Altis Money Script
If I missed you, Ill paste below... Just tell me in the comments
Take JME off the credits for that life script. I sent it to him over skype, it is not his work.
Quote Originally Posted by Lystic View Post
Take JME off the credits for that life script. I sent it to him over skype, it is not his work.
LOL.
Quote Originally Posted by Jme View Post
LOL.
LOL. TOO
I consider myself as a newbe scripter, but everything you said I know it already. You said a bunch of things which are useful, like explaining variables and addAction.
Imho the best way to make your scroll menu is to take Jme's template, Lysctic's template or any menu you like which is free to edit (I like titan's one, cause he's a boss) and edit it.
Or you can start from scratch so it feels like your in control of you own menu instead of stealing other scripts The advanced Scrolls like JME's and Titan's are easy to edit, but noobs dont fully understand the rest of the script like this which is in Titans:

removeallactions player;
[] spawn {
["TaskSucceeded", ["", "Titans's menu loaded..."]] call BIS_fnc_showNotification;
sleep 0.1;
call aKFerm;
};
This isnt too important, but if its a noob which is only editing, its not good because its better if they made their own so that they can understand their own menu instead of just editing all the time. If you just edit, it would take a while to learn. @hssn
Posts 1–15 of 16 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us