ULX

Author Topic: Using ULib as an all around admin system  (Read 18805 times)

0 Members and 2 Guests are viewing this topic.

Offline aschmack

  • Newbie
  • *
  • Posts: 13
  • Karma: 2
Re: Using ULib as an all around admin system
« Reply #15 on: July 27, 2006, 08:59:39 PM »
I got a cheap fix, this should work, sadly it requires you to suicide once when you connect. I suppose that someone could add in a silent kill, but I don't really feel like doing that now.

JamminR, ULib.mainUcl is the access table that gets added from users.ini, so yes, I got it right.

PASTE this over the hooks and CONCOMMANDS at the bottom of eSWEPmenu.lua. Then change the name of ulx_init.lua to aulx_init.lua (so that it loads before everything.


New Version Below.
« Last Edit: July 27, 2006, 09:44:55 PM by aschmack »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Using ULib as an all around admin system
« Reply #16 on: July 27, 2006, 09:19:33 PM »
Sounds like an odd hack that the person has to 'kill' themselves.
Like you said, sounds as though thier access is being loaded after this script.
Any errors being returned in console?
Two suggestions... use a timer to count 2 seconds before testing access?
Or, hook eventPlayerActive instead? This is called after connecting of course, might give the necessary time needed. (Then again, might be too slow)

The project I'm working on had odd results using the HookEvent(eventPlayerActive) command, which calls a function that was supposed to declare some key tables and switches for those tables related to the user. Doesn't seem to call it
So what I've done is wrote the code so that when the console command to turn on my project is turned 'on', it tests to see if those variables are set, if not, it too calls the original 'setup' function, then returns to turn on the project.

So far, its worked, and better than having to have my user reconnect or respawn. :)


"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given