Page 1 of 4 1 2 3 4

Search: Type: Posts; User: Divran Search took 0.02 seconds.

  • Thread: Exsto

    by Divran
    Replies
    99
    Views
    4,094

    for I = 0, 360, 30 do table.insert( self.Pos,...

    for I = 0, 360, 30 do
    table.insert( self.Pos, Vector( math.cos( I ), math.sin( I ), 0 ) )
    end
    sin and cos assume radians:
    http://www.lua.org/manual/5.2/manual.html#pdf-math.cos

    EDIT: I'll...
  • Thread: Exsto

    by Divran
    Replies
    99
    Views
    4,094

    I decided to take a look in your teleport plugin...

    I decided to take a look in your teleport plugin because I can be a perfectionist from time to time and I get annoyed when a mod's teleport/goto/bring commands get you stuck in shit. I wanted to make...
  • https://github.com/wiremod/wire/issues/290

    https://github.com/wiremod/wire/issues/290
  • Replies
    942
    Views
    53,959

    I don't listen to music at all. The only music I...

    I don't listen to music at all. The only music I hear is the background music in games or the car stereo or what other people put on. I guess I'm one in a million?

    That doesn't mean I don't like...
  • Replies
    942
    Views
    53,959

    Garry is right. Saying client side Lua should be...

    Garry is right. Saying client side Lua should be allowed by default on sandbox servers just because the server hosts are ignorant (of the console command) or stupid isn't a valid argument. If you are...
  • Replies
    942
    Views
    53,959

    While that is cool, that isn't how it looks in...

    While that is cool, that isn't how it looks in real life, is it? Shouldn't the scope be much closer to your eye? Maybe you could add a button that moves the scope closer to your eye or something. It...
  • Replies
    942
    Views
    53,959

    in that order?

    in that order?
  • Replies
    942
    Views
    53,959

    This is wrong. __index has nothing to do with the...

    This is wrong. __index has nothing to do with the "self" reference, and it'll work regardless of what __index is set to. Lexic already explained what __index was but I have my own explanation:
    When...
  • Replies
    942
    Views
    53,959

    I made a little test you can use and modify if...

    I made a little test you can use and modify if you want

    require("luaclass2")

    class( "Bank" )
    private()
    money = 0
    protected()
    function getMoney(self)
    return self.money
  • Replies
    942
    Views
    53,959

    This doesn't work because of the way Lua iterates...

    This doesn't work because of the way Lua iterates through tables. Your globals "private", "protected", "public" will have numeric indexes, and thus be iterated first. "money", "getMoney","stealMoney"...
  • Replies
    942
    Views
    53,959

    I'm not sure what these territories are for (I...

    I'm not sure what these territories are for (I might have missed the post where you explained it) but if they are supposed to be placed on a map and then sit there forever (and saved to a file to be...
  • Replies
    1,000
    Views
    65,897

    That pumping reminded me of a water gun. Then I...

    That pumping reminded me of a water gun. Then I thought: Hey.. how come nobody has made a water gun that you have to fill up by dipping it in water? And then up the pressure by pumping it (aka just...
  • Replies
    1,000
    Views
    65,897

    I'm not very good at this sort of thing, but it...

    I'm not very good at this sort of thing, but it seems to me the scrollbar sticks out a bit too much. Perhaps remove the outline from it? Or make the outline appear when you hover over it? I dunno
    ...
  • Replies
    1,000
    Views
    65,897

    I also dislike that sv_allowcslua is set to 0 by...

    I also dislike that sv_allowcslua is set to 0 by default, because then the radial menu mod I use to more easily select my most used tools doesn't work.

    But I don't really care because I only play...
  • Actually, tonumber(txt) is not the same as...

    Actually, tonumber(txt) is not the same as type(txt) == "number"

    In fact, type(txt) == "number" will always return false, so you might as well replace it with "false"
  • Replies
    1,000
    Views
    65,897

    Yeah I know but it's still funny.

    Yeah I know but it's still funny.
  • Replies
    1,000
    Views
    65,897

    Sorry I'm 2 days late but I just had to post this...

    Sorry I'm 2 days late but I just had to post this to all of you who don't yet know.

    Caps' playtime as of today:

    And google tells me that
    25 623 hours = 2.92306038 years
  • Replies
    163
    Views
    5,446

    I'm not arguing either way, just stating what I...

    I'm not arguing either way, just stating what I think here.
    Back a while ago there used to be subforums in the lua forum titled "help", etc. I think that was pretty ordered and it prevented...
  • I disagree because his "correction" makes no...

    I disagree because his "correction" makes no sense whatsoever



    What he said. The entity probably doesn't exist
  • Replies
    1,000
    Views
    65,897

    this is the same as local pw, ph =...

    this is the same as
    local pw, ph = DHTML:GetSize()
    pw = math.power2(pw)
    ph = math.power2(ph)
    just saying
  • Replies
    1,000
    Views
    65,897

    Then I suppose you don't feel like moving it some...

    Then I suppose you don't feel like moving it some more? Because it should be coming into the screen from the bottom right, not the top. Try holding an imaginary lantern (that's what I assume that...
  • Replies
    52
    Views
    4,534

    Sorry for not replying sooner. Yeah go ahead and...

    Sorry for not replying sooner. Yeah go ahead and do whatever you want with them.
    EDIT: I can recommend the map cycle plugin, that's probably the best one. You could fix it up for gmod 13 and add it...
  • Replies
    6,412
    Views
    180,222

    False. There is an updated version of evolve...

    False. There is an updated version of evolve somewhere on facepunch.
    EDIT: Found it http://www.facepunch.com/showthread.php?t=1239304
  • Replies
    6,412
    Views
    180,222

    It got removed, and replaced by the net library....

    It got removed, and replaced by the net library.
  • Replies
    1,000
    Views
    65,897

    String concatenation vs table concatenation:...

    String concatenation vs table concatenation:
    local rep = 100000

    local t = os.clock()

    local str = ""
    for i=1,rep do
    str = str .. "hi"
    end
  • Thread: LUA Scammer!!

    by Divran
    Replies
    48
    Views
    1,229

    Except the spelling is worse than in elementary...

    Except the spelling is worse than in elementary school.
  • Replies
    6,412
    Views
    180,222

    You don't need regular expressions for that. ...

    You don't need regular expressions for that.

    if tonumber(TextBox:GetValue()) then
    -- it's a number
    else
    -- it's not a number
    end
  • Replies
    6,412
    Views
    180,222

    Sorry, I made a small mistake. Here's the fixed...

    Sorry, I made a small mistake. Here's the fixed code

    hook.Add("TTTBeginRound", "my unique name", function()
    for k,ply in pairs( player.GetAll() ) do
    if ply:IsUserGroup("vip") or...
  • Replies
    6,412
    Views
    180,222

    change hook.Add("TTTBeginRound", "ply",...

    change

    hook.Add("TTTBeginRound", "ply", function()
    to

    hook.Add("TTTBeginRound", "my unique name", function( ply )
    where "my unique name" should be a unique name for this specific hook. A name...
  • Replies
    2
    Views
    190

    There was a post somewhere about a new official...

    There was a post somewhere about a new official release of evolve (for gmod 13), but I can't find it anymore
  • Replies
    6,412
    Views
    180,222

    local metatable = { __newindex = function(...

    local metatable = {
    __newindex = function( tbl, key, value )
    print("something has been added to " .. tostring(tbl) .. " at " .. tostring(key) .. " with value " .. tostring(value))...
  • Replies
    6,412
    Views
    180,222

    http://www.lua.org/manual/5.2/manual.html#2.4 ...

    http://www.lua.org/manual/5.2/manual.html#2.4

    __newindex is called when writing a value with a key that is not already present in the table.
    __index is called in every other situation (when...
  • Replies
    6,412
    Views
    180,222

    Fixed TableOfNames = { ["John"] = true,...

    Fixed
    TableOfNames = {
    ["John"] = true,
    ["Tom"] = true,
    ["David"] = true
    }

    function CheckTblForName(ply)
    if !IsValid(ply) then return end
    if TableOfNames[ply:Nick()] then
  • Replies
    335
    Views
    27,547

    local _,count=txt:gsub("\n","\n")...

    local _,count=txt:gsub("\n","\n")
    txt=txt..('_'):rep(count)
    what's this for?
  • Replies
    335
    Views
    27,547

    Steam chat: 23:32 - !cake: I detoured...

    Steam chat:

    23:32 - !cake: I detoured surface.DrawText to ... well.

    I REGRET NOTHING
    23:34 - Divran: oh god
  • Replies
    6,412
    Views
    180,222

    http://wiki.garrysmod.com/page/http

    http://wiki.garrysmod.com/page/http
  • Replies
    52
    Views
    4,534

    "demon.mp3" EDIT: Btw I've made some useful or...

    "demon.mp3"

    EDIT: Btw I've made some useful or useless plugins for evolve ages ago which I've placed in my SVN here:...
  • Replies
    335
    Views
    27,547

    That sounds like Xerasin alright

    That sounds like Xerasin alright
  • Replies
    52
    Views
    4,534

    What about me :V I poked overv constantly to get...

    What about me :V
    I poked overv constantly to get him to work on evolve. And I helped him debug it. And I made the goto, bring, and teleport plugins not suck (they used to just teleport you. I made...
  • Replies
    6,412
    Views
    180,222

    Something like local firstname, lastname =...

    Something like

    local firstname, lastname = string.match( text, "^(%w+) (%w+)$" )
    if firstname and lastname then
    -- Valid name
    else
    -- Not a valid name
    end
  • Replies
    6,412
    Views
    180,222

    Awkward? Unfortunately? I think it's a great...

    Awkward? Unfortunately? I think it's a great idea. It lets you easily have high precision with your sliders.
  • Replies
    633
    Views
    41,410

    Strange. Garry must have changed that, then.

    Strange. Garry must have changed that, then.
  • Replies
    633
    Views
    41,410

    I checked Evolve, and it uses Lock & UnLock....

    I checked Evolve, and it uses Lock & UnLock.
    Wiki:
    http://wiki.garrysmod.com/page/Classes/Player/Lock
    http://wiki.garrysmod.com/page/Classes/Player/UnLock
    Yep that seems to be it.
  • Replies
    633
    Views
    41,410

    I have a memory of there being a way to freeze a...

    I have a memory of there being a way to freeze a player without disabling looking around, but I could be remembering wrong.
  • Replies
    633
    Views
    41,410

    Why not just freeze the player

    Why not just freeze the player
  • I tried this, and it looks like you're wrong...

    I tried this, and it looks like you're wrong (me() is a convenience function I made, its purpose should be self explanatory).

    ] lua_run eye1 = me():GetAimVector() timer.Simple(1,function() eye2 =...
  • I've already answered the question about getting...

    I've already answered the question about getting two instances of the player's aim vector, but that's evidently not what you want to know.
    I can't make sense of your code. What does it do?
  • just do local playermouseaim1 =...

    just do

    local playermouseaim1 = ply:GetAimVector()
    timer.Create("leftkeydown", 0.2, 0, function()
    local playermouseaim2 = ply:GetAimVector()
    done
  • Replies
    6,412
    Views
    180,222

    Write/ReadInt doesn't take the size of the entire...

    Write/ReadInt doesn't take the size of the entire message. I suggest you take a look here: http://wiki.garrysmod.com/page/Libraries/net/WriteInt
  • Thread: MySQL Too Slow?

    by Divran
    Replies
    14
    Views
    467

    Try this function GetFactionName(factionID,...

    Try this

    function GetFactionName(factionID, callback)
    local query1 = db:query("SELECT FactionName FROM gfactions_factionlist WHERE FactionID = '"..factionID.."'")
    query1.onSuccess = callback...
  • Results 1 to 50 of 198
    Page 1 of 4 1 2 3 4