General > Developers Corner

I've made my first addon for gmod

<< < (2/3) > >>

Proendreeper:

--- Quote from: JamminR 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.

--- End quote ---

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

Proendreeper:

--- Quote from: chaos13125 on February 07, 2013, 10:02:43 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?

--- End quote ---

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.

Bite That Apple:
You think maybe I can see a little of it :) ?

Proendreeper:

--- Quote from: chaos13125 on February 09, 2013, 07:27:55 PM ---You think maybe I can see a little of it :) ?

--- End quote ---
Sure, but you won't be getting much:P

--- Code: ---local function Msg(text)
  _G.Msg("[Global UCL] "..text)
end

--- End code ---

--- Code: ---local function getQuery(q,...)
  if querys[q]~=nil then
    return string.format(querys[q],...)
  end
end

--- End code ---

--- Code: ---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

--- End code ---

Bite That Apple:
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.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version