A few generally easy questions

Okay, well I am fairly new to LUA but I do have the basics. Right now I am not very good with LUA itself but I am learning how to customize LUA. I am currently creating a role play server, and before I actually purchase the server, I would like to have the LUA editing done. I have a few question. This will be constantly updated as I will have more questions along the line. Also, I am editing the DarkRP gamemode.

If the question has a :bang: next to it, it is unanswered. If it has a :love: next to it, it is answered.

:bang: First Question:
How do I change the name of the gamemode?
:bang: Second Question:
If I download player models, how do I use the new player models as a job model?

Question 1: The file name. Such as for darkrp. Change the folder name to whatever you want and it will replace DarkRP.

Question 2: What gamemode are you referring too? \

Add me on steam here. I have been learning Lua for the past 10 months and am really good at modifying things. I can help ya out over steam of you have any more questions. Good luck :insertsmileyfacehere:

Okay I added you and I am talking about Dark RP still. I downloaded Player Models, which work, I’ve tested them, and I just need to know how I would find the model that I wish to use for the Job model. Do I have to move the models to my general models folder?

http://wiki.garrysmod.com/?title=DarkRP has information on how to add new jobs, you just change the model path to your new playermodel.

Playermodels are usually/should be in: models/player

You still have a lot to learn for learning lua for 10 months, ive been at it 6 months, and probably know more than you.

But Question 1: go to info.txt and it should like this:


"Gamemode"
{
    "name"        "Name"
    "version"    "1.0"

    "author_name"    ""
    "author_email"    ""
    "author_url"    ""
    
    "info"        ""
    "hide"        "0"
}

Just change the “Name” and that will be your gamemode name.

Question 2: If you are running Dark RP, you can simply use This

Fuck you have been at it 6 months and you failed to follow a derma tutoral
http://www.facepunch.com/showthread.php?t=934969
after 6 months you failed to understand what a function was my god what have you been doing for the last 6 months

Wow, i forgot for a minute, was tired, boohoo, now stop following me you fucking sad prick to every thread.

Forgot what you were following a tutoral after “6 months” of “learning lua” wtf did you do in the first month if your on tutorals by month 6

Just go away.

Why wont you answer my question?

Because I don’t need to.

Why have you not corrected me if im wrong

Who cares how much you know over someone else? I have a life I don’t dedicate all of my time to learning lua. I know almost everything in Lua but I don’t know alot about GMod Lua. Again, Stop trolling… please.

[editline]11:53PM[/editline]

Also, He wanted to edit what it said in the Server Menu Box.

Okay well I used that classmaker, but now my derma for the DarkRP is messed up. Is anything wrong with the Shared.lua? Here is the shared.lua: http://pastebin.com/7z26FsC4

I think it’s the way you set multiple models in each class. Put them into different tables like:

[lua]local GangModels = {
“models/player/Group03/Female_01.mdl”,
“models/player/Group03/Female_02.mdl”,
“models/player/Group03/Female_03.mdl”,
“models/player/Group03/Female_04.mdl”,
“models/player/Group03/Female_06.mdl”,
“models/player/Group03/Female_07.mdl”,
“models/player/group03/male_01.mdl”,
“models/player/Group03/Male_02.mdl”,
“models/player/Group03/male_03.mdl”,
“models/player/Group03/Male_04.mdl”,
“models/player/Group03/Male_05.mdl”,
“models/player/Group03/Male_06.mdl”,
“models/player/Group03/Male_07.mdl”,
“models/player/Group03/Male_08.mdl”,
“models/player/Group03/Male_09.mdl”
}[/lua]

And then when you want to call it, use

[lua]table.Random( GangModels )[/lua]

I didn’t set up the gang models. That was set up by the DarkRP team

Hmm… well the shared lua looks fine to me, should not be giving any errors

Uh oh, you’re closing them the wrong way. I see that all the time.


TEAM_hitman = AddExtraTeam( "Hitman", Color( 255, 200, 0, 255 ), "models/player/slow.mdl", [[As a hitman, you take hits from people, and complete the request.
You avoid the cops at all costs, and try to be sly.
Avoid being seen when killing your victim.]], {"gmod_tool", "keys", "pocket", "weapon_real_cs_usp", "hl2_combo_fists"}, 'hitman', 2, 55, 0, 0, false }

It isent “}” you should be using, it is a “)” to close it.

Here’s the code:


TEAM_hitman = AddExtraTeam( "Hitman", Color( 255, 200, 0, 255 ), "models/player/slow.mdl", [[As a hitman, you take hits from people, and complete the request.
You avoid the cops at all costs, and try to be sly.
Avoid being seen when killing your victim.]], {"gmod_tool", "keys", "pocket", "weapon_real_cs_usp", "hl2_combo_fists"}, 'hitman', 2, 55, 0, 0, false)

[editline]02:29AM[/editline]

Have you ever opened the folders?

Damnit, why did I not see that, i thought it was the way multiple models were set up in Gang D:

Well, it is.

curly brackets, as they are called, are used to open and close tables and shit.

But you open the “AddExtraTeam” ‘function’ with a ( thus needing to close it with a ).