Jump to content

sadvely

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by sadvely

  1. Greetings to all! Imagine that there is a GUI-checkbox with the title "Engine on", which, when pressed, turns on/off the vehicle engine. So, if you make a random double click, it may turn out that there is an active "Engine on" checkbox but the engine is turned off - conversely. I know for sure that this problem was bypassed in the standard freeroam and admin resources, but is it always so difficult to solve it?
  2. Hello again! Once again I came across the above code. I can "overwrite" a function in one resource, how can I make this overwritten function work in all resources?
  3. Thanks a lot! With a slight change in alpha, the wheels become full invisible, is it possible to fix it somehow?
  4. Is there a need to disable the collision?
  5. Hi everybody. If there is any way to implement such an idea? What functions or other knowledge will be useful to me?
  6. Please explain what this code means. I have seen this in many resources, such as standart "admin" resource. What is this code for? Example: local _triggerClientEvent = triggerClientEvent _triggerClientEvent(source, eventData.name, eventData.source, unpack(eventData.args)) function triggerClientEvent( triggerFor, name, theElement, ... ) local args = { ... } if type(triggerFor) == 'string' then table.insert(args, 1, theElement) theElement = name name = triggerFor triggerFor = nil end ... ... It is used in different variations and i can't understand any of it.
  7. sadvely

    GUI Creating

    Thank you guys for the decent answers, quite informative, I will use it in practice. There is another question, perhaps requiring the creation of another topic, but... Can I make some file, let's say, a client lua with GUI element settings? Like that: -- SETTINGS.LUA SOME_SETTINGS = {} SOME_SETTINGS.WINDOW = { X = 0, Y = 0, WIDTH = 300, HEIGHT = 300, NAME = "TITLE", RELATIVE = false } And how should i use it? unpack () doesn't work for me like this: -- CLIENT.LUA guiCreateWindow (unpack (SOME_SETTINGS.WINDOW))
  8. sadvely

    GUI Creating

    Hello everyone! What would be the best solution: 1. Create a GUI outside the general function, hide the element, for example, "window", and show it using another function 2. Create a function with a GUI in it, and show it using this function itself And will I be able to manage GUi elements in the second case? First example: local window = guiCreateWindow (...) local window_element = guiCreateLabel (...) -- window is a parent local other_window_element = guiCreateLabel (...) -- window is a parent guiSetVisible (window, false) function someFunction () guiSetVisible (window, true) showCursor (true) end addEvent ("eventFromServer", true) addEventHandler ("eventFromServer", localPlayer, someFunction) Second example: function someFunction () showCursor (true) window = guiCreateWindow (...) window_element = guiCreateLabel (...) -- window is a parent other_window_element = guiCreateLabel (...) -- window is a parent end addEvent ("eventFromServer", true) addEventHandler ("eventFromServer", localPlayer, someFunction) Thank you.
  9. I apologize in advance for my broken English, I used a translator Is it possible to use Browser as an Interface as a GUI in literally every resource? For example, I have seen how the browser is used in LOGIN panel resources. Theoretically, can I implement all the functions in each resource using a browser? How much does it use memory or overload the server as opposed to the standard GUI or DGS resource functions? In comparison, for example, with DGS, the browser interface looks softer and more multifunctional. Let's say, in the example with LOGIN panel, i would like to make a lot of checks for the entered values and depending on the result, show various errors. And also a lot of light animations for buttons and other elements - it's easier to do with CSS, HTML and JS, isn't IT?
×
×
  • Create New...