What are the basic limits of scripting, how big can we make the scripts?
How many times can we call Citizen.CreateThread(function() without crashing out, and how to make functions in them more optermized.
At the moment I have a new Citizen.CreateThread for the hide username function I seen about free with out no real explaintion how they work but mine as a problem, until I restart the mod it will flicker the user names like made.
if FoxFix.GameSettings.HideNameTags then
Citizen.CreateThread(function()
while true do
for i=0,99 do
N_0x31698aa80e0223f8(i)
end
for i=0, 32 do
GrabPlayer = GetPlayerPed(i);
if(NetworkIsPlayerActive(i) and GrabPlayer) then
local Blip = GetBlipFromEntity(GrabPlayer)
if DoesBlipExist(Blip) then
SetThisScriptCanRemoveBlipsCreatedByAnyScript(true);
SetBlipScale(Blip, 0.0)
end
end
end
Citizen.Wait(0)
end
end)
end
so lets say I am [1]BadKaiPanda and my wife who is [2]Toffee, out tags flash like mad until I do a restart dufx
Is this because I doing something wrong, two many threads? I don’t have many mods installed at this point it’s mostly my own mod running on my server.
I am debating if I need N_0x31698aa80e0223f8(i) as none of the scipts I read said WHY this is needed, I know most copy and past and don’t care long as it works but I trying to make my scripts and server set up work the way I want it so I need to understand what things are doing.
Also any other tips would be great, like I creating my scipts and then release them like I have been doing but I want to start adding banks(bank/cash) and other things like jobs, big problem I been seeing when others have been setting these up are databases.
Do we know what the pros and cons would be using a json/lua/texttable file or something like this rather then a db?
One Pro I see it will mean only one mod set up and users wont have to worry about setting up a host for a mysql but do we have speed problems or read right problems?