PivityGmodStore

Part 2 : Adding functions

Now that we can open GUI let's create our first function.

In this tutorial we will create function to give player 5000$.

1 - Join server and write "/snwfuncs" in chat

2 - Window will open that will look like that

From here you can manage all the functions that script supports.

3 - Lets click New function and name it "give 5000$". Click Create.

4 - Select your function from selector.

5 - Some basic Lua here. (ply) refers to the player who currently plays our wheel.

To give our player some money remove "print("Hello world")" and write ply:giveMoney(5000)

6 - Now you can test if the function works correctly. Click Test function

At this stage your window should look like that

You should receive 5000$ to your account.

7 - Click save.

8 - Using steps above create functions to give player 1000$ and 10 000$.


Click here for part 3 of this tutorial series!