Garry's Mod Leaks

Getting Started on LUA

Submitted by SkrattarDoFuloraDO, , Thread ID: 91613

Thread Closed
09-06-2018, 01:48 PM
#1
If you're new to LUA programming and want to get started here are some resources for you.


If you're interested in creating a Garry's Mod addon you should check out the following.




But before starting to create addons for games I suggest you take a look at this first.



https://www.youtube.com/watch?v=iMacxZQMPXs





Examples

Here are a few examples of code from the links above.

Code:
// This is a function that takes in strings and other data types.

print("Example!")

// You can create a function like this.

function example(name){

print("Your name is " ..example.. ".")

}

example(Jeff)

// This will output something like this "Your name is Jeff." in the game console.

// As you saw from the example above we can concatenate strings and variables togheter by using ".." togheter.



That's it for this short example and resources you can use.

Users browsing this thread: 2 Guest(s)