Author Topic: Making a ULX whitelisting system for Dark RP jobs  (Read 12226 times)

0 Members and 1 Guest are viewing this topic.

Offline Baza7781

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Making a ULX whitelisting system for Dark RP jobs
« on: April 11, 2016, 01:47:40 PM »
I have no idea how to create w white listing system so people cant just become what ever job they like before being whitelisted after they have been trained etc, All help appreciated !

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 476
  • Karma: 84
  • I write code
Re: Making a ULX whitelisting system for Dark RP jobs
« Reply #1 on: April 11, 2016, 04:32:15 PM »
A few questions before we begin:

1. Do you know lua? Any coding? If the answer is no, I strongly suggest you look at some tutorials. I hear that CODE BLUE makes some pretty good ones.

2. Do you want there to be a separate whitelist for every job, a single whitelist for a bunch of jobs, or a single whitelist for every job (other than the default, of course)?

3. How do you want to interface with the whitelist(s)? Command-line only? XGUI? A separate derma menu?

Sorry for the interrogation, I just think that knowing these things would make it easier for people to help you achieve your goal. If there is anything else you think should be mentioned, go ahead.

Good luck!
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.

Offline Baza7781

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: Making a ULX whitelisting system for Dark RP jobs
« Reply #2 on: April 12, 2016, 06:09:43 AM »
I don't know too much Lua but I know a bit, I want a system which works that if your not white listed for a job you can't use it, I want this to happen to every job apart from the recruit job I've made.

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 718
  • Karma: 116
  • :)
    • My Homepage
Re: Making a ULX whitelisting system for Dark RP jobs
« Reply #3 on: April 12, 2016, 06:39:10 AM »
I don't know too much Lua but I know a bit, I want a system which works that if your not white listed for a job you can't use it, I want this to happen to every job apart from the recruit job I've made.
There's always the "hacky" solution of adding a CustomCheck for every job that requires the "whitelisted" group to be granted to a user in order for them to be able to take the job. That would presumably be the easiest.
What exactly is your use case? That may or may not work depending on what exactly you want to do with this.
bw81@ulysses-forums ~ % whoami
Homepage

Offline Baza7781

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: Making a ULX whitelisting system for Dark RP jobs
« Reply #4 on: April 12, 2016, 10:38:21 AM »
My case atm is any rank can become any job they like, As i wont users to have to be added to a job whitelist before being able to use e.g THe General job.

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 476
  • Karma: 84
  • I write code
Re: Making a ULX whitelisting system for Dark RP jobs
« Reply #5 on: April 13, 2016, 05:08:44 AM »
Well, I suggest you watch some of code blue's tutorials because if you don't know very much lua it will be hard to create a whitelist system like this.
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.

Offline Baza7781

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: Making a ULX whitelisting system for Dark RP jobs
« Reply #6 on: April 13, 2016, 08:40:39 AM »
Im fine with coding, If im given all the steps and where to add the white list code i can easily do that. I meant as in creating my own code etc is not something im capable of.

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 476
  • Karma: 84
  • I write code
Re: Making a ULX whitelisting system for Dark RP jobs
« Reply #7 on: April 14, 2016, 04:19:45 AM »
Being given code and putting it somewhere is not coding. You might be lucky enough to find someone to code this for you, but unless you want to rely on that I highly suggest you learn how to create your own code.
« Last Edit: April 14, 2016, 04:33:37 AM by roastchicken »
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.

Offline Baza7781

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: Making a ULX whitelisting system for Dark RP jobs
« Reply #8 on: April 14, 2016, 01:04:58 PM »
I didnt realise it was that hard for whitelisting. Most code ive done is adding code into a certain area. Do you know anyone who knows how to do  what i need?

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 718
  • Karma: 116
  • :)
    • My Homepage
Re: Making a ULX whitelisting system for Dark RP jobs
« Reply #9 on: April 14, 2016, 04:24:59 PM »
I didnt realise it was that hard for whitelisting. Most code ive done is adding code into a certain area. Do you know anyone who knows how to do  what i need?

I still recommend the CustomCheck + ULX group method. Easiest to implement, but only works in some specific models.
bw81@ulysses-forums ~ % whoami
Homepage

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 476
  • Karma: 84
  • I write code
Re: Making a ULX whitelisting system for Dark RP jobs
« Reply #10 on: April 14, 2016, 05:36:42 PM »
Bytewave, your method is unfortunately not going to help him. The extent of 'coding' he knows is copy pasting code.
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Making a ULX whitelisting system for Dark RP jobs
« Reply #11 on: April 14, 2016, 07:05:42 PM »
Baza7781,
"Difficulty" is a relative term. What might be difficult for you in your beginning paths of learning lua and Glua is likely not difficult for many of the regulars, or more so, the Ulysses dev team such as us.
Honestly, there's not much wrong with copy/pasting IF you're also learning what the stuff you might be copying does.
Heck, some of my earliest days in coding was copy/pasting code bits of Commodore 64 and Tandy Color Computer BASIC and Assembly from magazines in the 80s.
I'd type stuff from the magazine. Run the code. See what it did. Change bits of it I thought might do something else, and viola, have new stuff happen.
Am I an expert now? No. I didn't go that route in life, but, I learned enough to often tell what almost any code does by looking at it.
Logic statements, comparisons, etc.

Ulysses forum search engine is a good way to learn from previous projects.
https://forums.ulyssesmod.net/index.php/topic,8248.html
That is what I found searching for whitelist.
No, it's not what you're looking for. But, it's one way to do a whitelist system + see how XLib and GUI's are done.
If you look at MrPresident's original project, less gui, but whitelist ideas just the same.

I've not looked at the code, but believe as you learn lua, you might look and go 'oh, i see what was done there'
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Baza7781

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: Making a ULX whitelisting system for Dark RP jobs
« Reply #12 on: April 15, 2016, 10:00:55 AM »
Thanks i will look into it