[SOLVED] Parameters file for client&server side

Hello guys,

I would like to just have one LUA file to share some parameters/translations, for example, i wanted to put my translation strings inside the server side so i just used a simple “require” and it work.
How is it possible to do the same thing on client side ? ‘Require’ can’t work on client side so how i can pass these parameters/translations to my client side ?

Thanks a lot !

Hello guys,

I find a solution to my problem. This is what i did :

Context: I want to use a unique file for my translation strings and another file for my parameters (bdd name, constant, price of different things …)

Problem: On server side we can simply use “require file.lua” but on client side, require isn’t work.

Solution:
My translation file (example) :

T = {}
T.MESSAGE_ARREST = “~r~Arrestation !”

My __resource.lua :

client_scripts {
“utils/translations.lua”,
“client/client.lua”
}

Usage:

TriggerServerEvent(“btor:notify”,T.MESSAGE_ARREST)

If you have any question, let me know :slight_smile: