Hello!
I would like to show you the developments of my project about vehicle registration plates for different countries.
Here's what it looks like:
I am always open to hearing the feedback or insights of those who have a better understanding of the registration plates. Thank you!
Hi! So, I'm working on a license plate system.
For me, this is a completely new kind of "coding" and, in general, I already know a lot and can do a lot. But I'm still struggling with some of the formatting stuff.
For example, let's take the format of German license plates:
One/two/three letters in front of the stickers
One/two letters after the stickers
One to four digits after all letters, but the total number of license plate characters does not exceed 8
is it possible to fit the formatting of such a string into a single string.format formula without using if/then
I am currently using several formats for string with one/two/three letters at the beginning and, of course, I limit the maximum number of characters entered. Smth like this:
^(%a)(%a+)%d+$
^(%a%a)(%a+)%d+$
^(%a%a%a)(%a+)%d+$
Is there anything else I don't know?
Hope it works! I can't even test it with other players, but code looks RELIABLE, TY
Am I supposed to use this outside of the resource, where I change the visibility of components?
Hi
If "Destroyed" = "Exploded" then use onVehicleExplode event and insert vehicle data into a table or database, so you can create or spawn it with the same data (color, position, id, name itc)
If "Destroyed" = destroyElement (vehicle) then use onElementDestroy event the same way
admin / conf / messages.xml : <group action="warp" ...>
Initially, the message is not sent to the player, is it not so? Which version of the admin panel are you using?
Hello!
Imagine that a vehicle has several body kits in the form of vehicle components. I can edit their visibility on the client side (setVehicleComponentVisible), but how do I do this on the server side for all players? Move client-side operations to server then back to client-side for all players? Or is there an easier way?
Or is it possible to turn components (body kits) into upgrades? (Which have shared function addVehicleUpgrade)
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?
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?
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.
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))