ULX

Author Topic: Darkrp jobs connecting to ulx groups  (Read 2454 times)

0 Members and 1 Guest are viewing this topic.

Offline davidgamingx

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Darkrp jobs connecting to ulx groups
« on: February 25, 2016, 05:39:23 PM »
ULib v2.52d (01/25/16)
ULX v3.62d (01/30/16)

So i know how to connect a darkrp job to a ulx group but the problem is when an owner becomes a job he no longer is an owner and is a regular user if so how do you fix this,

Example

Spawns as citizen but in the ulx group Owner !menu and switch ulx group to darth vader, i no longer have any perms or way to readd my self to owner unless going to console

Offline Zmaster

  • Full Member
  • ***
  • Posts: 235
  • Karma: 25
Re: Darkrp jobs connecting to ulx groups
« Reply #1 on: February 25, 2016, 06:24:02 PM »
The best thing I could think of is periodically checking if their current usergroup is allowed to be in their current darkrp job
http://wiki.garrysmod.com/page/timer/Create
http://wiki.garrysmod.com/page/Player/GetUserGroup
http://wiki.darkrp.com/index.php/Functions/Player/Shared/getJobTable

I couldn't find a on usergroup changed type hook, though I haven't used Lua in a while
« Last Edit: February 25, 2016, 06:33:09 PM by Zmaster »

Offline davidgamingx

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: Darkrp jobs connecting to ulx groups
« Reply #2 on: February 25, 2016, 07:06:07 PM »
Zmaster none of those work

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Darkrp jobs connecting to ulx groups
« Reply #3 on: February 25, 2016, 07:25:09 PM »
Don't connect jobs to groups?
Server control access should have NO bearing on a job in a RP game.
Use teams or make new code that uses some variable called a job.
Sure, you may check on a group level to see if a job or job function is allowed, but you shouldn't have a group level tied to a job so that it changes group access.
If DarkRP uses 'group' access to define job (not just control what it can do in any job), then I have yet one more reason to dislike the DarkRP gamemode.
« Last Edit: February 25, 2016, 07:27:15 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Zmaster

  • Full Member
  • ***
  • Posts: 235
  • Karma: 25
Re: Darkrp jobs connecting to ulx groups
« Reply #4 on: February 25, 2016, 07:28:39 PM »
Zmaster none of those work

What do you mean they don't work

Offline feldma

  • Newbie
  • *
  • Posts: 47
  • Karma: 5
  • 5696 hours in Gmod and counting!
    • Mega-Strike Network
Re: Darkrp jobs connecting to ulx groups
« Reply #5 on: February 26, 2016, 12:22:57 AM »
Surely I read that wrong..

You are saying you join a group and you become the Ulx group 'Darth Vader'??
Solving 50% of people's questions by searching it up on google.

Trying to think of a cool idea to code, so I can inspire myself to code. If you want something done, please message me!