Author Topic: I've made my first addon for gmod  (Read 4449 times)

0 Members and 5 Guests are viewing this topic.

Offline Proendreeper

  • Newbie
  • *
  • Posts: 7
  • Karma: 2
I've made my first addon for gmod
« on: February 06, 2013, 07:15:37 PM »
I was a bit bored so I decided to try making so UCL uses a MySQL backend instead of a KeyValues backend.

Let me just say it turned out well.

I would attach more photos but I am too tired at the moment to do so.

Offline Zevoxa

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
Re: I've made my first addon for gmod
« Reply #1 on: February 06, 2013, 10:22:10 PM »
Could you explain for me what a ULC is? o:

Offline Proendreeper

  • Newbie
  • *
  • Posts: 7
  • Karma: 2
Re: I've made my first addon for gmod
« Reply #2 on: February 07, 2013, 06:49:02 AM »
It's ULib's user management system

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: I've made my first addon for gmod
« Reply #3 on: February 07, 2013, 02:20:26 PM »
ULC? No idea? :P
UCL - Ulysses Control List. (aka User Control List)
Table of groups and users, with allow/deny permissions, and any other flag as set using ULib library group/user control code.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: I've made my first addon for gmod
« Reply #4 on: February 07, 2013, 10:02:43 PM »
I was a bit bored so I decided to try making so UCL uses a MySQL backend instead of a KeyValues backend.

Let me just say it turned out well.

I would attach more photos but I am too tired at the moment to do so.

Really, neat and interesting script you have here. You thinking of releasing it to the world of ulx, or is it just a private little script you've been making?


Also, does your script just do the groups so far, or does it do users as well?
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Proendreeper

  • Newbie
  • *
  • Posts: 7
  • Karma: 2
Re: I've made my first addon for gmod
« Reply #5 on: February 09, 2013, 03:45:17 PM »
ULC? No idea? :P
UCL - Ulysses Control List. (aka User Control List)
Table of groups and users, with allow/deny permissions, and any other flag as set using ULib library group/user control code.

That would make sense, I just always misinterpret it as ulc not ucl

Offline Proendreeper

  • Newbie
  • *
  • Posts: 7
  • Karma: 2
Re: I've made my first addon for gmod
« Reply #6 on: February 09, 2013, 03:46:51 PM »
Really, neat and interesting script you have here. You thinking of releasing it to the world of ulx, or is it just a private little script you've been making?


Also, does your script just do the groups so far, or does it do users as well?

It has a ton of bugs and isn't very optimized, and yes it does both, I just was keeping the users steamids private more.

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: I've made my first addon for gmod
« Reply #7 on: February 09, 2013, 07:27:55 PM »
You think maybe I can see a little of it :) ?
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Proendreeper

  • Newbie
  • *
  • Posts: 7
  • Karma: 2
Re: I've made my first addon for gmod
« Reply #8 on: February 10, 2013, 12:03:02 PM »
You think maybe I can see a little of it :) ?
Sure, but you won't be getting much:P
Code: [Select]
local function Msg(text)
  _G.Msg("[Global UCL] "..text)
end
Code: [Select]
local function getQuery(q,...)
  if querys[q]~=nil then
    return string.format(querys[q],...)
  end
end
Code: [Select]
db = mysqloo.connect(MYSQL_HOST,MYSQL_USERNAME,MYSQL_PASSWORD,MYSQL_DATABASE,MYSQL_PORT)
local connected = false -- No idea why I am not using this.

function db:onConnected()
  connected=true
end
 
function db:onConnectionFailed( err )
  Msg( "Connection to database failed!\n" )
  Msg( "Error:"..err.."\n" )
end
 
db:connect()
db:wait()
if db:status()==mysqloo.DATABASE_CONNECTED or db:status()==mysqloo.DATABASE_CONNECTING then
  Msg("Connected successfully!\n")
else
  Msg("Connected unsucessfully!\n")
end
« Last Edit: February 10, 2013, 12:08:01 PM by Proendreeper »

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: I've made my first addon for gmod
« Reply #9 on: February 12, 2013, 08:09:35 AM »
Yeah looks like some pretty basic MySQL, it's nice. You should develop this into a addon that others can download because I would sure like this.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Proendreeper

  • Newbie
  • *
  • Posts: 7
  • Karma: 2
Re: I've made my first addon for gmod
« Reply #10 on: February 12, 2013, 07:07:43 PM »
Yeah looks like some pretty basic MySQL, it's nice. You should develop this into a addon that others can download because I would sure like this.

I still need to fix a few things, such as it having to be loaded manually atm, I haven't gotten around to it yet but anyways in other news I've made a pointshop leaderboard

You can find it here