ULX

Author Topic: LUA Code to add users  (Read 1542 times)

0 Members and 1 Guest are viewing this topic.

Offline SamBehner

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
LUA Code to add users
« on: June 29, 2018, 07:31:07 PM »
My ULib/ULX versions:
ULib v2.63w
ULX v3.73w

Game mode(s) I am having this problem on:
DarkRP

I have a forums on mistforums, for donations you have the option to put in a custom LUA code that it sends to the user when they donate, I was wondering what the function is to run "ulx adduser"?

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: LUA Code to add users
« Reply #1 on: June 30, 2018, 07:15:59 AM »
ulx.adduser if on server
https://github.com/TeamUlysses/ulx/blob/a236a79495631b24acb1af48ac64aad9a8a1cb19/lua/ulx/modules/sh/user.lua#L51

ulx.adduserid if a steamid.
https://github.com/TeamUlysses/ulx/blob/a236a79495631b24acb1af48ac64aad9a8a1cb19/lua/ulx/modules/sh/user.lua#L67

I presume you're going to have your own function check the donation database to ensure they've actually donated.
If not, once you've shared the raise access code, it will be shared by those that have bad morals.
« Last Edit: June 30, 2018, 07:18:08 AM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Lethal

  • Newbie
  • *
  • Posts: 10
  • Karma: -2
Re: LUA Code to add users
« Reply #2 on: July 21, 2018, 04:48:37 PM »
Do you mean to run it when they have donated or  just the command?