Ulysses Stuff > General Chat & Help and Support
how to get an array[playerid] = access ?
Andbusy:
hi all
how can i get an array like the old "gUsers" ???
gUsers[playerid]=access
cant finde something like this in the new ULib
need it at an AdminImportULX() for some other lua
cant convert something like
...
if (gUsers) then
for k,v in gUsers do
...
n8
Megiddo:
ULib has a compatibility layer, so just use "gUsers" (a global variable), like you would in ULX v1.1. You can also use hasAccess and hasAccessSteamid.
Andbusy:
hi
hasAccess and hasAccessSteamid i can only us if player is online if i understand it correct
i need the array for offline and online admins ;)
if i use something like
if (gUsers) then
...
end
it will go in the if only if there are admins in the users.ini ?
and if it dosent go in the if why if i have admins in the users.ini ?
i havend find a way that it gos in all time false this variable :/
if this is only online admins i must make a timer all minut or something like this to import admins if they are onine -.-
n8
Megiddo:
In ULX v1.1, gUsers would contain all users online or off. In ULib, gUsers only contains users who have logged in on this map change (since you can add users by other things than steamid).
JamminR:
Meg, that is what he is asking. What variable stores _all_ admins, logged on or not.
Andbusy...
see ucl_public.lua ... where I found this comment and variable.
--- Quote from: Megiddo in ucl_public.lua -----[[
Variable: mainUcl
This holds the default user access list, from the file "lua/ULib/users.ini"
Revisions:
v1 - Changed from mainUcl to ULib.mainUcl
]]
ULib.mainUcl = ULib.ucl:newFromFile( ULib.DEFAULT_UCL_FILE )
--- End quote ---
I believe the answer you're looking for is ULb.mainUcl
However, you'll need to use ULib functions to query individual members from the table.
Navigation
[0] Message Index
[#] Next page
Go to full version