Hi, I'm Trying to script a camera using LemonUI and SHVDN3 but doing this, it seems I can no more use the GTA.UI fonctions, аnd particularly: UI.ShowSubtitle("")... does someone knows a solution ?
SHVDN3 is different from SHVDN2. Use Visual Studio and intellisense as it's your best documentation.
UI.ShowSubtitle //SHVDN2 - won't work in SHVDN3 GTA.UI.Screen.ShowSubtitle //SHVDN3, this will work
Thank you, my subtitle problem is solved! but for any other problem, where can I find documentation? I looked on the Lemon Github page ("Quick Start" and "Upgrading from NativeUI") but I couldn't find anything about Subtitle or "UI.container()" for example...
surely you guess that i am not a developer,.. i am just starting to code and i am not sure about my V.S. configuration... what should i do to be well helped by intellisense?
@JohnFromGWN By the way, I use one of your exemple as inspiration for my project menu... (https://forums.gta5-mods.com/topic/34171/template-for-lemonui-c)
@gus-solo Don't confuse LemonUI with SHVDN.
Functions are documented here and once more you can use intellisense.
The documentation for LemonUI is sparse. They have a Discord server but the advice they give is generally just to link you to some obscure MSDN article on class inheritance.
Thankfully I didn't depend on them to create my own menus - learned like a big boy, by curiosity, trial, and error.
@JohnFromGWN Thank you very much for your help, indeed I was looking for LemonUI but I find more info if I look in the SHVDN
My message wasn't clear, I realize that now. The link I sent I sent you is for what are called Native Functions, not SHVDN.
These are what the GTA 5 engine uses and were documented (sort of) by a team of programmers who decompiled scripts from the game.
Even though they aren't well documented, you can consider them your bible. They work well in VS and intellisense.
You can use them with C# dot net although the original coding, AFAIK, was in C++.
Scripthook V dot net
SHVDN is an asi plugin and a library that allows you to write scripts in dot net languages. The most commonly used is C# dot net. The functions from SHVDN are different from the native functions. They act as "wrappers" and in principle are easier to use - but in practice this isn't always the case. Once more you can use them in VS and with intellisense.
LemonUI replaces an older version of NativeUI and as the UI (User Interface) indicates both were mostly used for creating Menus. Those menus can then use code with the Native functions or with a dot net language using SHVDN. I use both in the same projects.
Example of Native vs SHVDN 3, may not be exactly the same, but have same purpose:
Ped.Task.StartScenario //SHVDN3, where Ped is your NPC or can be used with Player TASK_START_SCENARIO_AT_POSITION //Native
Two suggestions. First take a course on C# coding if you have the time and patience and inclination. I didn't, self-taught, but I paid a price for that - maybe not.
Also, only use SHVDN3, not SHVDN2, and keep in mind they are not the same - so when looking for code examples or snippets, be aware old ones might no longer work.
@JohnFromGWN thanks again, I already figured out some of this info, I knew about the natives (I have at least 10 bookmarks about them) and the incompatibility between SHVDN2 and SHVDN3 (by loading them in references in VS). intellisense is very useful but of course it can't "guess" what I'm looking for... the problem is that I'm learning "coding" and "moding" at the same time... I have to learn C#, the using of VS, natives and hooks all at the same time and I only have one small brain... but that's how i really learn... I have to have a problem to solve to really integrate the information... but if I read between your words correctly, I'm not alone...
@gus-solo Any experts who were on these forums are long gone. Even back in 2015 it was still a very closed group of programmers. I don't think novices were their preoccupation.
Lemonui is interesting because it's extremely powerful but so poorly documented. The wiki is useless and reflects the first version of LemonUI. None of the new features were updated in the documentation and googling reveals nothing. The philosophy seems to be for programmers only which is a shame because even with a few snippets of code as examples it would broaden the user base tremendously.
The migration guide from NativeUI is also very disappointing. Even if you used NativeUI before, the documentation is once more only of use to expert programmers. Examples are pretty much garbage.
As for the discord server, I've been on it 3 times and left 3 times knowing less than I did before.
The good news is that none of this is rocket science. Despite the lack of documentation, outdated and poorly explained tutorials, and non existent help on any forums, you can still figure it out yourself.
So prepare for a challenge because it's very rewarding, particularly when you solve problems without any guidance or resources.
@JohnFromGWN the experts may be gone but there are still good coders...unfortunately not all sources are accessible...
at the moment i am trying to "update" CamxxCore's "Scripted Camera Tool" and "translate" it to LemonUI, i needed it for a Machinima but there is no backup for Nodes and a limitation to 20 nodes max... fortunately, he gave the sources, so I'm working on it... now I'm at 50% of the work...
Is this a video of your work on LemonUI? It seems very complete... if it's in C#, I'd love to see the sources
@gus-solo yes the video is my own Lemonui, a version 7 months old now. Has been updated many times since then.
Nothing remarkable about the code, most of it is very straightforward. Actually it's several menus but all linked together. I can even launch Menyoo from Lemonui.
With respect to Script Cameras, I wrote my own but it's far from perfect so I also use a mod one. Scripting the camera isn't easy but one good feature is how you can increment FOV discretely which the script mods don't do well, you can easily over or under shoot where you want to be with those mods.
My proudest achievement is a DLC selector which I just wrote, with a FiveM version as well, which effortlessly allows you to select which maps and MLOs you want to load. Obviously you can't load 100 maps simultaneously both for placement considerations and memory utilisation. The approach is very simple but the coding was challenging. Essentially it reads designated folders and returns all the maps and MLOs and then exploits the fact that dlclist.xml will not load any asset which is renamed.
This does require creating subfolders for your dlc which I did already have for the sake of organizing 1000s of vehicles by brand and subcategories.
This app was written in vb dot net and is a Windows forms application, nothing to do with Lemonui or native functions, all file management and manipulation. What's great is that it's maintenance free, you need to install the map and add it to your dlclist.xml but the app updates itself as it loads.
@JohnFromGWN in one word: WAW !
i Just read your links and it verry usefull... for my part I use just the minimum Mod possible but at the beggining i'have tryed nearly all the mods you can find on 5mods so i'had to reload all the game several time before I understood why some things works ans some other not...
I have a big machine but for the everyday's coding things I use an little i5 laptop, so I must use the minimum of ressources and it is a good guide...
@gus-solo I only install peds, vehicles, real maps, and real MLOs. Nothing created with Menyoo or Map Builder. Nothing to do with MP female.
No scripts other than my own. Definitely No visual mods.
Exception are two camera scripts which are both linked to my LemonUI menus.
I use only one Trainer, Menyoo.
All the code is mostly written from scratch except for my wonderful music player courtesy of @JustDancePC .
I can't really share my source because it's highly personalized and there are 1000s of LOCs, but I can definitely share the framework for menus.