Splixz Posted December 9, 2017 Posted December 9, 2017 (edited) Hello! I'm trying to find a clientside function, that makes the typical "GTA online interaction menu" appear. I wasn't able to find any function related to that and would appreciate it, if somebody could tell me what function to use if there is any. And if there isn't, then I'd love to know the native of it. Edited December 9, 2017 by Splixz
Flow Posted February 21, 2018 Posted February 21, 2018 Sorry but how does everybody know how to use such files? It's sad only a link is posted as newbies like me don't learn anything from it. I have php, sql, html and css experience but i wonder how to implement such menus. Could anybody give more information as the github itself does not provide any?
GreenFanta Posted February 25, 2018 Posted February 25, 2018 (edited) The Chromium Embedded Framework (CEF) is a useful "embedding framework" that allows applications to make use of browser based technologies. (https://bitbucket.org/chromiumembedded/cef) CEF is comprised (especially in the example and answer to your question, provided by Kemperr) of HTML, CSS and Javascript on a frontend basis. You can store these files clientside and use them within your CEF calls (as part of index.js or required within thereof). To render them we refer to a URL that references the path of the client_packages directory (inside your server's directory). EXAMPLE: mp.browsers.new('package://menu/index.html'); // This would refer to client_packages/menu/index.html A working example would be to place that in an event handler on your clientside, like so: mp.events.add('guiReady', () => { mp.browsers.new('package://menu/index.html'); // Here we display the browser instance to the client }); CEF can handle ES5 and ES6 scripting, so there is very little limitation on what you can do in terms of front-end work. --- Alternatively, you can opt-in to using the NativeUI stuff: https://github.com/alexguirre/RAGENativeUI Which I wouldn't recommend if you are not well versed in .NET (or rather, C#) Edited February 25, 2018 by GreenFanta 3
Flow Posted February 27, 2018 Posted February 27, 2018 Hey @GreenFanta thanks for the headsup. I did a lot of research and looked into some scripts so i got it working and have already done a few features. My question is how to geht server side variables (Set by server script) in the browser window on client side (e.g. for speedometer) and how to fire serverside events clicking on clientside browser navi. Would be nice if you have another headsup here. Thanks
GreenFanta Posted March 1, 2018 Posted March 1, 2018 @cmdflow The flow would need to be CEF -> Clientside -> Serverside Within your CEF html/js you would need to execute mp.trigger('event', params) https://wiki.rage.mp/index.php?title=Trigger to your clientside and then send that request to your serverside (if applicable).
Flow Posted March 1, 2018 Posted March 1, 2018 thx for that. tried that yesterday but it said ressources exceded or such. Will try again... Hard to get in as newbi but that's how it is when you start learning a language you don't know
GreenFanta Posted March 1, 2018 Posted March 1, 2018 If you are starting on this type of scripting without a conceptual understanding of programming (scripting/coding) then you will definitely struggle. The lack of documentation (specifically in regard to the Javascript stuff) and the lack of development support will require you to do a lot of digging and testing, yourself. Start a free trial with Lynda.com or Pluralsight.com (just examples) and learn the basics of programming/coding in the language you wish to learn and in it's primary use case. It will assist you greatly and the documentation available will be far easier to understand. Spamming the forums and copying/pasting code is not an efficient way to learn at all. 2
Flow Posted March 1, 2018 Posted March 1, 2018 (edited) i developed serveral webapplications with php, sql, html, css (and some jquery to load things) but javascript and it's definition is a pain in the a***. but i don't want to go offtopic here. well spamming a forum... for me a forum is a place do dicuss and gelt help. it's sad that it isn't used that much and nobody shares his snippets or whatever. wonder how rage should grow with a inactive community like it is atm. (dont want to be rude). i can'T studie java for 3 years and then make a server because nobody will play gta in 3 years (or let's say almost). so i have to look at code and get the idea, testing around and asking. what should i do else thanks anyway green Edited March 1, 2018 by cmdflow
GreenFanta Posted March 14, 2018 Posted March 14, 2018 I'm not sure how you can struggle with JavaScript if your background is PHP, they are both very loosely typed. You may want to look at the C# API. Take a look at the Resources if you want to learn from existing scripts. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now