I found out that C++ is also used in GMod (most likely the general stuff like the main menu and everything), however I also know there is a way for me to incorporate it into my code. I just do not know [I]how[/I].
Can someone give me all the ways I can use C++ in my code? I feel as though the constraints for what I can do will be released once I know how.
You'd [URL="http://wiki.garrysmod.com/page/Creating_Binary_Modules"]make a binary module[/URL] and [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Global/require]require[/url] it in your script.
Also a quick note, I'd suggest using more up to date headers [url]https://github.com/Facepunch/gmod-module-base/tree/development[/url] or even [url]https://github.com/danielga/garrysmod_common[/url]
[QUOTE=Knoxed;52618104]Also a quick note, I'd suggest using more up to date headers [url]https://github.com/Facepunch/gmod-module-base/tree/development[/url] or even [url]https://github.com/danielga/garrysmod_common[/url][/QUOTE]
If the wiki is out of date, will you please update it?
(I tried to write that in a way that doesn't sound demanding or condescending at all, it didn't work. I really meant to ask you nicely and only gently nudge you to edit the wiki)
What would be the point of using a module? I'm sure it would allow you to do more than base lua, or maybe not. Honestly I have no idea. :v:
[QUOTE=MrRalgoman;52620008]What would be the point of using a module? I'm sure it would allow you to do more than base lua, or maybe not. Honestly I have no idea. :v:[/QUOTE]
You would use it either to do a function more efficiently in C than Lua (hashing, random, big-data management), or do something that's not possible with exposed Lua functions (socketing, SQL).
Thank you guys :D I'll look into this.
Sorry, you need to Log In to post a reply to this thread.