Author Topic: TTT Prop possession  (Read 2814 times)

0 Members and 1 Guest are viewing this topic.

Offline Engineer Xfos

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
TTT Prop possession
« on: November 06, 2015, 01:33:23 PM »
Is it possible to make its so the superadmins have more push than guests with to help of ULX?

Offline WispySkies

  • Full Member
  • ***
  • Posts: 144
  • Karma: 0
  • I make random commands and Lua errors.
Re: TTT Prop possession
« Reply #1 on: November 06, 2015, 03:12:29 PM »
Not that I know of but ULX would not be able to help. I know how but you have to edit some files. Since ULX isn't really the place for this you can add me on steam and I can show you, but I'll not be on until Sunday so if someone else sees this feel free to jump in. :D

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: TTT Prop possession
« Reply #2 on: November 06, 2015, 07:54:19 PM »
This is developers corner.
Code bits can be discussed.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline WispySkies

  • Full Member
  • ***
  • Posts: 144
  • Karma: 0
  • I make random commands and Lua errors.
Re: TTT Prop possession
« Reply #3 on: November 08, 2015, 07:54:03 AM »
This is developers corner.
Code bits can be discussed.
My bad, I just didnt think that its change-able via ULX as all you could do was change a convar. So we talked about it, we got the recharge set up so admins have more recharge, but is it possible (like ply:SetGravity) to give admins only a certain convar value. We tried using an if admin etc then bleh else bleh2 end but that still makes the convar for everyone. I haven't see this before, so is it possible to assign a different convar per group?

Offline Engineer Xfos

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: TTT Prop possession
« Reply #4 on: November 08, 2015, 08:32:28 AM »
I did it. Just right to me on steam or here (Xfos) if you want the code
but i dont look on this forum mucht

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: TTT Prop possession
« Reply #5 on: November 08, 2015, 09:04:01 AM »
you can't really have individual console server variables.
However, if you're using a system that relies on a console variable as a default, you can adjust by group using a multiplier or addition to the var for whatever effect/function/setting is getting applied.
Pseudo-Lua just to show logic

myvar = GetConVar(whatever_server_var) -- get the server var
mygroupinfo = {} -- set a table
mygroupinfo.admin = 1.02 -- add admin multiplier to the table
mygroupinfo.superadmin = 1.05 -- add superadmin multipler to the table
if ply:IsAdmin then -- are they admin?
  ply:SetwhateverPlayerEffect( myvar * group.admin ) -- set whatever your wanting for that player to server variable times the admin multiplier
end
if ply:IsSuperAdmin then -- are they Superadmin?
  ply:SetwhateverPlayerEffect( myvar * group.superadmin ) -- set whatever your wanting for that player to server variable times the superadmin multiplier
end

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