• What do you need help with? V3
    6,419 replies, posted
Same way you would install tmysql on windows? place, [url=http://blackawps-glua-modules.googlecode.com/svn/trunk/gm_tmysql4_boost/Release/gmsv_tmysql4_linux.dll]gmsv_tmysql4_linux.dll[/url] in lua/bin place all the libraries in [url=http://blackawps-glua-modules.googlecode.com/svn/trunk/gm_tmysql4_boost/Release/libs.rar]libs.rar[/url] in the orangebox folder alongside the srcds_linux file.
[QUOTE=ollie;38355769]Why can't I disable physicsobject motion on vehicles? [lua] print(Vehicle:GetPhysicsObject():IsMotionEnabled()) // prints true Vehicle:GetPhysicsObject():EnableMotion(false) print(Vehicle:GetPhysicsObject():IsMotionEnabled()) // prints true [/lua] Is there any other way to freeze cars?[/QUOTE] I am also looking for this, can anyone help?
How do you add a stool so that it goes into the list in alphabetical order? All mine just get added to the end.
Am I the only one experienceing that ShouldCollide makes you like, hit the player, then go through him?
client prediction error?
[QUOTE=Persious;38359708]Am I the only one experienceing that ShouldCollide makes you like, hit the player, then go through him?[/QUOTE] I experienced it too. [QUOTE]ShouldCollide reinstated ShouldCollide was removed last update for the same reason as ManipulateBone. It was called a lot, and 99% of the time it wasn’t actually achieving anything. Well I’ve been mulling it over - and talked it over with some coders on the forums. The solution we came up with is this. It works the same way as it always did - except that one of the entities needs to have called ent:SetCustomCollisionCheck( true ) - which was added this version. You can check whether an entity is registered for this callback using ent:GetCustomCollisionCheck().[/QUOTE]
I don't understand how that shit works.
[url]http://facepunch.com/showthread.php?t=1224228[/url] Is there any way to do this?
I need help with Meshes. Specifically IMesh and how to draw a hollowed cube. I looked at the old and new wikis and found a link to a thread with information on [url=http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index51b2.html]this page[/url], but the thread seems to have disappeared. Neither wiki has any examples that I was able to find.
Im trying to get rid of my server crashes.. Im going crazy with that shit ;( [CODE]Not creating entity 'instanced_scripted_scene' - too many edicts! (8064 current, 8192 max)[/CODE] I dont create this entity once, (but appears about 2000 times..) :( and im not sure where they come from and how to fix it.. some ideas?
didn't someone already post a fix for this somewhere? or some sort of workaround (was it ai_disable 1?)
Could anyone tell me, what are the setbacks of LUA and writing to files? I plan to run multiple servers, and they will each be reading from/writing to the same files (so they can share the data) They are simple text files, and I know I should be using MySQL but I want to be as independent from external libraries as possible (purely because if something changes I don't want to wait for that library to be updated) (not to put down the efforts of the likes of Drakehawke, who spend hours putting work into libraries for us, but just in case one day he finds something better to do) My fear is that server A will be writing something to important.txt, and server B will come along and try to write to it too, but it will break because the file is being edited by server A and is locked. I know this happens in programming languages, but I have no idea about what would happen in LUA. Cheers for any help
[QUOTE=Trumple;38363411]Could anyone tell me, what are the setbacks of LUA and writing to files? I plan to run multiple servers, and they will each be reading from/writing to the same files (so they can share the data) They are simple text files, and I know I should be using MySQL but I want to be as independent from external libraries as possible (purely because if something changes I don't want to wait for that library to be updated) (not to put down the efforts of the likes of Drakehawke, who spend hours putting work into libraries for us, but just in case one day he finds something better to do) My fear is that server A will be writing something to important.txt, and server B will come along and try to write to it too, but it will break because the file is being edited by server A and is locked. I know this happens in programming languages, but I have no idea about what would happen in LUA. Cheers for any help[/QUOTE] Same as other programming languages -- it'll fail to open the file if the other server has it open. MySQLOO shouldn't break in any future updates, it went unbroken for years before GMod 13 was released, it only broke in the last update because garry rewrote something. I need MySQLOO for my servers too (which aren't going anywhere), so if it does break I'll have it fixed ASAP (but it really shouldn't break anymore).
I plan on making a gamemode that uses the spawn and tool menu, can I just set the base of my gamemode to sandbox?
[QUOTE=Drakehawke;38363515]Same as other programming languages -- it'll fail to open the file if the other server has it open. MySQLOO shouldn't break in any future updates, it went unbroken for years before GMod 13 was released, it only broke in the last update because garry rewrote something. I need MySQLOO for my servers too (which aren't going anywhere), so if it does break I'll have it fixed ASAP (but it really shouldn't break anymore).[/QUOTE] Alright, thanks for reassuring me And thanks for fixing mysqloo!
How would I go about changing the font color on a DTree list? [lua]SetTextColor(Color(255, 255, 255, 255))[/lua] attempt to call method 'SetTextColor' (a nil value)
[QUOTE=Grondo4;38364095]I plan on making a gamemode that uses the spawn and tool menu, can I just set the base of my gamemode to sandbox?[/QUOTE] Yeah - call DeriveGamemode( "sandbox" ) in shared.lua
How does console.output work with DHTML? I'm trying to use it to call lua from a link [code] <a href="#" onClick="console.output('print(\'test\')')">Test</a> [/code] and in Chrome, it shows that console.output is being run, but doesn't exist (assuming it was added specifically for this by Garry?). DHTML:QueueJavascript is working, though, and the page is displaying, so I know the panel itself isn't messed up. [editline]7th November 2012[/editline] Also, I called [lua] DHTMLInterface:SetAllowLua(true) [/lua] [editline]7th November 2012[/editline] Nevermind, got it working by ripping off the main menu html file.
[QUOTE=my_hat_stinks;38355691]You should try looking at [url="http://wiki.garrysmod.com/page/Main_Page"]the wiki[/url] for simple things like that, it'll be faster than waiting for someone to reply here [lua]for _,v in pairs( player.GetAll() ) do if v:IPAddress()=="127.0.0.1" then v:Kick( "You were kicked because of your IP address!" ) end end[/lua][/QUOTE] I dont think I explained myself well enough, I need to be able to kick a player with only their IP Address, so I can kick them on playerconnect, before steamID player entity etc are actually acquired. The best I can do at the moment is using the "kick" console command with their name given from the player connect hook. I just want that but with a custom message.
[QUOTE=theVendetta;38365911]I dont think I explained myself well enough, I need to be able to kick a player with only their IP Address, so I can kick them on playerconnect, before steamID player entity etc are actually acquired. The best I can do at the moment is using the "kick" console command with their name given from the player connect hook. I just want that but with a custom message.[/QUOTE] He literally did just that. Now you can put it in your connect hook (with proper adjustment [no loop]), and it will work just fine...
[QUOTE=Revenge282;38366000]He literally did just that. Now you can put it in your connect hook (with proper adjustment [no loop]), and it will work just fine...[/QUOTE] In the playerconnect hook the player entity is not created yet, how will it work. Can't use the player lua library if the player does not exist yet..
Then this is your next best thing unless you use Gatekeeper... [lua] local function ReallyFuckingEasySolution( Player, SteamID, UID ) if Player:IPAddress() == '192.168.1.1' then Player:Kick('Look at this ban system I made!') end end hook.Add( "PlayerAuthed", "ThatHookThatIFoundInTheWiki", ReallyFuckingEasySolution ) [/lua]
[QUOTE=Revenge282;38366160]Then this is your next best thing unless you use Gatekeeper... [lua] local function ReallyFuckingEasySolution( Player, SteamID, UID ) if Player:IPAddress() == '192.168.1.1' then Player:Kick('Look at this ban system I made!') end end hook.Add( "PlayerAuthed", "ThatHookThatIFoundInTheWiki", ReallyFuckingEasySolution ) [/lua][/QUOTE] Thankyou for telling me about gatekeeper, and no I do not want to use playerauthed as that means that the player actually has to connect to the server, an entity is created etc. I do not want this.
Sorry but I need help again, i'm looking to remove the weapon, entities, npcs, vehicles and dupes tab from the creation menu, do you guys know how to do that?
Is there a render.SetScissorRect() for 3D2D blocks? Something like: [lua]cam.Start3D2D(pos, ang, scale) render.SetScissorRect(-200, -200, 200, 200, true) surface.SetDrawColor(Color(0, 0, 0, 210)) surface.DrawRect(-250, -150, 200, 50) -- Menu bg render.SetScissorRect(-200, -200, 200, 200, false) cam.End3D2D()[/lua]
You'd have to push clip planes manually.
And how do I do that?
[b][url=http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index4fc8.html]Render.PushCustomClipPlane [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
[QUOTE=Darkwater124;38368435]And how do I do that?[/QUOTE] It's often more complicated than it's worth, if you can avoid it then that'd be a better option
Is there a way to remove default tabs from the creation menu?
Sorry, you need to Log In to post a reply to this thread.