i have a database on the server (sqlite)
that will send to the player when they finished loading
but if you are the 10th player or higher, then you dont get these variables from the server
local Player = FindMetaTable("Player")
function Player:HudLoadout()
local hudeles = SQL_SELECT(DATABASE_NAME, "*", nil)
if wk(hudeles) then
for i, ele in pairs(hudeles) do
if string.StartWith(ele.name, "float_") then
self:SetNWFloat(ele.name, tonumber(ele.value))
elseif string.StartWith(ele.name, "bool_") then
self:SetNWBool(ele.name, tobool(ele.value))
elseif string.StartWith(ele.name, "color_") then
self:SetNWString(ele.name, ele.value)
elseif string.StartWith(ele.name, "int_") then
self:SetNWInt(ele.name, ele.value)
end
end
end
self:SetNWInt("hud_version", self:GetNWInt("hud_version", 0) + 1)
end
is the server limited to use setnwint, setnwstring, setnwfloat and so on?
and also does the net also have a limit
i just send some small ints, float, strings(color)
Does every single player on the server need to know what hud you're using? If the answer is no then net, else I would use NW2 instead.
ok i will try that out, i hope that will fix that, still confused why setnw things not work for more then 9 players
This should all be saved on the user's clientside database, not on the server, unless you have a really good reason for storing it on the server.
i have the reason to change the hud element position, depends on what the server owner want them to be, for each rp type
like they want a blue hud they can do that with that in real time with a gui
Okay that makes sense, send the data using the net library then.
Net Library Usage
Sorry, you need to Log In to post a reply to this thread.