[First off I apologize if this is in the wrong location. I couldn't think of a better place to put it.]
I run a couple murder servers in Gmod, and I'm toying with the idea of modifying the gamemode a bit. If anybody could help me out a bit I would be very appreciative.
I would like to be able to modify the weapon/s that the murderer would spawn with. For example, I would like to add a Jihadbomb as a secondary default weapon for the murderer. I can't seem to find the script that controls this, or how to add it in.
Next up, I was considering a sort of reverse murder gamemode for my server. We have a bit of an alternate game we play, where one person is hunted but has increased hp and moves fast. So I guess essentially everybody would be a murderer, and there would be one buff bystander with sprint. (It would also be nice to set the default spawn weapon for everybody, aside from the hunted, to a crossbow for this.)
I'm not a scripter myself but I am familiar with script, and of course modifying server files. :rolleyes:
[QUOTE][First off I apologize if this is in the wrong location. I couldn't think of a better place to put it.][/QUOTE]
Sorry to put it this way, but there is NO place whatsoever on these forums to ask for help with making a server.
Do it yourself! Google is your friend. And if you want someone to completely do it for you go talk to people on Coderhire.com. To learn more about coding
[QUOTE]and of course modifying server files.[/QUOTE]
I am a little confused why you need help modifying the script when you just told us you knew how to.....
To learn about Lua coding go here: [url]http://facepunch.com/showthread.php?t=1337945[/url]
I recommend Reading a bit of the Lua Reference Manual here: [url]http://www.lua.org/manual/5.2/manual.html[/url]
Then starting watching youtube videos here with MisterCosmicSeagull: [url]https://www.youtube.com/watch?v=xw56HhewI1A[/url]
All of the links above are located on the first Facepunch link.
Some hints about modifying the Murder gamemode:
[CODE]ply:Give()
ply:SetWalkSpeed()
ply:SetRunSpeed()
[/CODE]
A hint about the different classes:
[CODE]If ply:Team() == "Team_name" then
ply:Give(weapon_ar2)
etc.
etc.
end[/CODE]
These examples are basic outlines and are tools you should do a little more research on.
Of course these helpful links and examples are if you want to do it yourself. Otherwise just use coderhire.com
[QUOTE=Praesdynamite;45863281]
[CODE]If ply:Team() == "Team_name" then
ply:Give(weapon_ar2)
etc.
etc.
end[/CODE]
[/QUOTE]
ply:Team() returns an integer (The number set up in team.SetUp( integer, ... ), not a string. You could, however, use an enumeration for a team, eg.
[code]
TEAM_BLUE = 1
TEAM_RED = 2
team.SetUp(TEAM_BLUE, "Blue Team", Color(0,0,255))
team.SetUp(TEAM_RED, "Red Team", Color(255,0,0))
--then in your player spawn function or whatever:
if ply:Team() == TEAM_BLUE then
ply:Give("weapon_smg1")
end
--And so on
[/code]
OR you can do this
[code]
if team.GetName( ply:Team() ) == "Team_Name" then .. end
[/code]
[QUOTE=Tomvdr;45863676]ply:Team() returns an integer (The number set up in team.SetUp( integer, ... ), not a string. You could, however, use an enumeration for a team, eg.
[code]
TEAM_BLUE = 1
TEAM_RED = 2
team.SetUp(TEAM_BLUE, "Blue Team", Color(0,0,255))
team.SetUp(TEAM_RED, "Red Team", Color(255,0,0))
--then in your player spawn function or whatever:
if ply:Team() == TEAM_BLUE then
ply:Give("weapon_smg1")
end
--And so on
[/code]
OR you can do this
[code]
if team.GetName( ply:Team() ) == "Team_Name" then .. end
[/code][/QUOTE]
Or you could do something like this to avoid elseifs etc.
[lua]
local weps = { [TEAM_BLUE] = "weapon_smg1", [TEAM_RED] = "weapon_ar2" }
// then in your function
ply:Give( weps[ply:Team()] )
[/lua]
[QUOTE=Praesdynamite;45863281]Sorry to put it this way, but there is NO place whatsoever on these forums to ask for help with making a server.
Do it yourself! Google is your friend. And if you want someone to completely do it for you go talk to people on Coderhire.com. To learn more about coding
I am a little confused why you need help modifying the script when you just told us you knew how to.....[/QUOTE]
You seem to have misunderstood a bit. I stated in my post that I already run a couple servers. What I needed help with was modifying the gamemode lua. You have however provided me with some useful information and I thank you for that!
Sorry, you need to Log In to post a reply to this thread.