Hello fellow developers,
I am making a new phone for my fivem server. I tried dynamically loading js files because i want an app to be a module for the phone.
but there is a slight problem when i’m doing this with javascript because the when the file has loaded before actually opening the app it deletes the old instance of the app class and creates an new one in a file that is reloaded after loading the js file of the app you are currently using.
I tested this and it works fine only to notice that the unused file of the old app class instance stays in memory while testing this ain’t really a problem but i am afraid that this might cause trouble for the client when they play for lets say 4/5 hours straight and their memory is full with unused files. So this brought me to the following question.
Is there any way to use PHP directly in a resource without loading the phone in an iframe from a webserver?
I know i cant send nui messages directly to lua and all that. I’m just wondering if this is possible so i’m able to load the applications like modules this way i am able to make the phone opensource with some base applications and be able to sell the extra’s. next to this the phone stays copy pasta proof for the people who do not have a lot of experience and its also easy for those who do.
If any one knows anything about this and you would be so kind to help me out let please let me know below.
thanks already, Sm1Ly