July 31, 2010, 12:09:22 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?  You can also Connect with Facebook
News:
 

Pages: [1]   Go Down
Print
Author Topic: [How To] Install MetaMod & SourceMod on your server.  (Read 4425 times)
0 Members and 1 Guest are viewing this topic.
satannuts
Administrator
Admiral
******

Karma: +475/-42
Offline Offline

Location: USA
Posts: 1199
Referrals: 0


satannuts
WWW
« on: February 26, 2009, 12:53:09 AM »


How to Install MetaMod & SourceMod on your Server:

[snatched from fpsbanana.com and editted by me.]


Install MetaMod on your server:
Download MetaMod
extract the "addons" folder to your left4dead game folder, like this:
/l4d/left4dead/addons

Then create and download metamod.vdf file HERE
choose OS: linux/win, game: left4dead, leave the "gamefolder" section empty - and click Generate.
Copy your "metamod.vdf" inside the "addons" folder
example:
/l4d/left4dead/addons/metamod.vdf

Next install SourceMod:
[you must have at least SourceMod v1.2 or higher]
Download SourceMod
extract it to your l4d/left4dead folder.
Check files: [make sure everything is extracted properly, basically.]
( Inside the addon folder you should have "metamod" and "sourcemod" folder)
( inside your "metamod" folder you should have a file called "sourcemod.vdf")
( you should have a "sourcemod" folder inside the "cfg" folder in left4dead)


To give yourself admin privilages you need to edit this file:

/l4d/left4dead/addons/sourcemod/configs/admins_simple.ini
or use
/l4d/left4dead/addons/sourcemod/configs/admins.cfg

How to give Admin with admins.cfg:

Go to : /l4d/left4dead/addons/sourcemod/configs/admins.cfg
Then Right-Click > Edit

Admins
{
"Name"
{
"auth" "ip"
"identity" "your.ip.addy.here"
"flags" "abcdef"
"immunity" "99"
}

Save and Restart the Server.

For more info on adding admins to SourceMod see this wiki-page.


'flags" list:

"Reserved slots" "a" //Reserved slots
"generic" "b" //Generic admin, required for admins
"kick" "c" //Kick other players
"ban" "d" //Banning other players
"unban" "e" //Removing bans
"slay" "f" //Slaying other players
"changemap" "g" //Changing the map
"cvars" "h" //Changing cvars
"config" "i" //Changing configs
"chat" "j" //Special chat privileges
"vote" "k" //Voting
"password" "l" //Password the server
"rcon" "m" //Remote console
"cheats" "n" //Change sv_cheats and related commands

"Root" "z" // Grants all permissions and is able to target anyone regardless of immunity.


After eveything is setup correctly, RESTART YOUR SERVER.
It should start automatically after restart.
to check:
join your game server and type in console.
sm_admin
you should see the admin menu popup.

« Last Edit: February 28, 2010, 11:59:04 PM by satannuts » Logged

satannuts
Administrator
Admiral
******

Karma: +475/-42
Offline Offline

Location: USA
Posts: 1199
Referrals: 0


satannuts
WWW
« Reply #1 on: February 26, 2009, 01:30:21 AM »

Now that SourceMod and MetaMod are installed - its time for Plug-ins!
Plugins
are sourcemod addons that allow modifications to the server.

Download the plugins from the links below and save them in the following folder:
/left4dead/addons/sourcemod/plugins

Once you have done this, make sure you set any cvars you need to set (as per the advice in the threads below) and then restart your server to let the plugin take effect. If you have problems, remove the plugin and seek advice.

Plug-ins:


Gore Mod

Infected Bots in VS

Restricted Zones

Damage Display

Friendly Fire limit
« Last Edit: March 29, 2009, 02:19:52 AM by satannuts » Logged

Luzifer
Powder Monkey
*

Karma: +3/-0
Offline Offline

Posts: 11
Referrals: 0


« Reply #2 on: March 23, 2009, 11:44:43 AM »

Hey thanks for this guide. I tried installing MetaMod&SourceMod to play with some plugins via hamachi, but when I type "sm_admin" in the console I get the message "[SM] This command can only be used in-game." but I am in-game.
And another error I got with this https://forums.alliedmods.net/showthread.php?t=84926 plugin. When I get boomered the HUD fades but it doesnt come back. Any help is appreciated.
Thanks.
Logged
satannuts
Administrator
Admiral
******

Karma: +475/-42
Offline Offline

Location: USA
Posts: 1199
Referrals: 0


satannuts
WWW
« Reply #3 on: March 25, 2009, 07:55:01 PM »

Sorry for the delay.
Hey thanks for this guide. I tried installing MetaMod&SourceMod to play with some plugins via hamachi, but when I type "sm_admin" in the console I get the message "[SM] This command can only be used in-game." but I am in-game.
And another error I got with this https://forums.alliedmods.net/showthread.php?t=84926 plugin. When I get boomered the HUD fades but it doesnt come back. Any help is appreciated.
Thanks.


I'm not sure about that plug-in, but according to that thread you linked, there are a few bugs with it...
I wouldn't use it - I prefer stability.

as for the sm_admin, it doesn't work at the main menu, if that's where you are having your problem...
to make life easier for you, you should bind the "sm_admin" command to a key... That way, while you are playing L4D, you can access the admin menu...  The admin menu can be navigated by using you number keys 1 thru 0 [slots 1-10].

Not sure if you've also set yourself as an admin...  See this linkage on How to add Admins to Sourcemod.

Let me know how you make out...  and give a little more detail with any problems...
Logged

Luzifer
Powder Monkey
*

Karma: +3/-0
Offline Offline

Posts: 11
Referrals: 0


« Reply #4 on: March 26, 2009, 03:58:48 PM »

The plugin works now. Just downloaded again don´t know what was the bug.

About the sm_admin...
I don´t try it in the main menu I try it in the game while playing.
I tried making me an admin with the "name" and the "ip" method but both don´t work. I get the same error or if I set a password it tells me that my nickname is in use by sourcemod and even when I set this password in the autoexec via
' setinfo "_password" "mypasswordhere" '
it just tells me my nickname is in use by sourcemod.
I didn´t try with steamid method don´t know how to do this with cracked l4d. So which details do you need?

EDIT: Ok I got so far that the name method now works (which means that l4d doesn´t say my name is in use by sourcemod) so I guess I´m admin.

Thats what I´ve done so far:
in admins.cfg I wrote

Code:
Admins
{
"Luzifer"
{
"auth" "name"
"identity" "Luzifer"
"password" "mypassword"
"flags" "abcdefghijklmnz"
"immunity" "99"
}


in core.cfg I changed
Code:
"PassInfoVar" "_password"
to
Code:
"PassInfoVar" "_test"

since I read you have to change this in order for passwords to work.

The last thing I did was write
Code:
setinfo "_test" "mypassword"
in the autoexec.cfg

So I´m admin now right?
And if I now enter sm_admin in the console I get this message that I have to be ingame...


EDIT 2:
Lol funny thing is I can execute any sm command but the fucking menu just won´t open.

EDIT 3:
Got it fixed..finally. Thanks to a buddy. He told me to say "/sm_admin" ingame and it worked.
« Last Edit: March 28, 2009, 02:22:14 PM by Luzifer » Logged
ossixc
Master Gunner
***

Karma: +15/-0
Offline Offline

Posts: 185
Referrals: 0


« Reply #5 on: April 13, 2009, 02:12:51 PM »

Can someone help me? I run server in same computer than i play. I dont understand how i can get SM admin-rights...

If i try...

Code:
Admins
{
    "Ossixc"
    {
        "auth" "name"
        "identity" "Ossixc"
        "password" "123456"
        "flags" "abcdefghijklmnz"
        "immunity" "99"
    }
right?

Need change something more like "Luzifer"?


in core.cfg I changed
Code:
"PassInfoVar" "_password"
to
Code:
"PassInfoVar" "_test"

since I read you have to change this in order for passwords to work.

The last thing I did was write
Code:
setinfo "_test" "mypassword"
in the autoexec.cfg
 


1. What i put in the "core" file? or just leave it alone?
2. I dont have any files called "autoexec.cfg".. Something wrong?

 Just dont understand Huh?
Logged
satannuts
Administrator
Admiral
******

Karma: +475/-42
Offline Offline

Location: USA
Posts: 1199
Referrals: 0


satannuts
WWW
« Reply #6 on: April 14, 2009, 12:14:16 AM »

Nice Work Luzi... got it all worked out!
For your flag, only need to use "z" for everything...
Quote
"Root" "z" // Grants all permissions and is able to target anyone regardless of immunity.

Can someone help me? I run server in same computer than i play. I dont understand how i can get SM admin-rights...
If i try...

Code:
Admins
{
    "Ossixc"
    {
        "auth" "name"
        "identity" "Ossixc"
        "password" "123456"
        "flags" "abcdefghijklmnz"
        "immunity" "99"
    }
right?

Need change something more like "Luzifer"?

Yes and Yes. the first part is correct to set the admin.  You could just use "z" for flag.
Remember what you set for password here!  ["password" "123456"]

Quote
1. What i put in the "core" file? or just leave it alone?
2. I dont have any files called "autoexec.cfg".. Something wrong?
Just dont understand Huh?

In the core file you need to set the server password...
So find this line and change "_password" to whatever you wish.
Code:
"PassInfoVar" "_password"

You could make an autoexec.cfg file -use notepad and save as autoexec.cfg- and put it into your cfg folder.  This will automatically execute when you load the game...

In that autoexec.cfg file put the following:
Code:
setinfo "_password" "123456"
setinfo will confirm the server password, and set your password on the server for admin privs...

then use sm_admin to bring up the menu...
good luck... also the keybinds for 1 thru 0 must be on default slot 1 thru slot 10 for the admin menu to function properly...

good luck... let us know how you make out...
Logged

ossixc
Master Gunner
***

Karma: +15/-0
Offline Offline

Posts: 185
Referrals: 0


« Reply #7 on: April 14, 2009, 11:22:23 AM »

Quote
Disconnect: Your name is reserved by SourceMod; set your password to use it..
I tried to join with Q-tracker and right password ofc Huh? 

C:\L4D_Server\l4d\left4dead\addons\sourcemod\configs\admins.cfg
Quote
Admins
{
    "Ossixc"
    {
        "auth" "name"
        "identity" "Ossixc"
        "password" "123456"
        "flags" "z"
        "immunity" "99"
    }
"123456" is just example

C:\L4D_Server\l4d\left4dead\cfg\autoexec.cfg
Quote
setinfo "_password" "123456"

and core file is like original one...

and still dont work Roll Eyes
Logged
ToDieFor
Ayreonaut
Global Moderator
Pirate
****

Karma: +15/-0
Offline Offline

Posts: 71
Referrals: 0



WWW
« Reply #8 on: April 14, 2009, 03:13:38 PM »

 ossixc, have you try changing PassInfoVar?

          /**
         * Password setinfo key that clients must set.  You must change this in order for
         * passwords to work, for security reasons.
         */
        "PassInfoVar"                   "_password"
Logged

ossixc
Master Gunner
***

Karma: +15/-0
Offline Offline

Posts: 185
Referrals: 0


« Reply #9 on: April 15, 2009, 11:03:07 AM »

ossixc, have you try changing PassInfoVar?

          /**
         * Password setinfo key that clients must set.  You must change this in order for
         * passwords to work, for security reasons.
         */
        "PassInfoVar"                   "_password"


I tried.. Changed "_password" to something else in core and autoexec but still same error Sad
Logged
ToDieFor
Ayreonaut
Global Moderator
Pirate
****

Karma: +15/-0
Offline Offline

Posts: 71
Referrals: 0



WWW
« Reply #10 on: April 16, 2009, 04:09:02 AM »

weird... AFAIK for this to work only things to configure are that PassInfoVar and password match both in addons/sourcemod/configs/core.cfg for server, and autoexec.cfg (client-side)

typing setinfo "<PassInfoVar>" "<password>"  in client console makes any difference? (just in case it were a problem executing autoexec.cfg)
Logged

ossixc
Master Gunner
***

Karma: +15/-0
Offline Offline

Posts: 185
Referrals: 0


« Reply #11 on: April 16, 2009, 03:47:20 PM »

It just dont work... Any other ways? ip-based version works if i use lan ip but game changed to lan mode as Sad
Logged
ToDieFor
Ayreonaut
Global Moderator
Pirate
****

Karma: +15/-0
Offline Offline

Posts: 71
Referrals: 0



WWW
« Reply #12 on: April 17, 2009, 03:35:32 AM »

You could use also steam id auth method, if you use rev-emu the steam id assigned is unique to each client, an independant of the username/public client IP (i think is generated based in some hardware id, like HD serial number or something like that),

Code:
* Example:
        "BAILOPAN"
        {
                "auth"                  "steam"
                "identity"              "STEAM_0:1:16"
                "flags"                 "abcdef"
        }
 *
 */


EDIT: In your config with auth=name you have to add a trailing } to close the admin section

Code:
Admins
{
    "Ossixc"
    {
        "auth" "name"
        "identity" "Ossixc"
        "password" "123456"
        "flags" "z"
        "immunity" "99"
    }
}



« Last Edit: April 17, 2009, 03:40:46 AM by ToDieFor » Logged

jynx1973
Mate
*

Karma: +5/-0
Offline Offline

Posts: 40
Referrals: 0


« Reply #13 on: July 07, 2009, 11:09:12 PM »

How i do it is...

i 1st set a pasvar in my core.cfg
"SERVERFOLDER\left4dead\addons\sourcemod\configs\core.cfg"
I.E

Code:
/**
* Password setinfo key that clients must set.  You must change this in order for
* passwords to work, for security reasons.
*/
"PassInfoVar" "_ASEECRETWORD"
That is done server side. (remember to make your own "_aseecretword")

Then i would add the admins to my admins_simple.ini

"SERVERFOLDER\left4dead\addons\sourcemod\configs\admins_simple.ini"

At the bottom of the file on theiere own "not in the example section but below it.." like this 

Code:
"!192.168.0.1" "99:z"
"Name1" "99:z" "Password"
"NAME2" "99:z" "password"
"name3" "0:a" "Password"
"name4" "99:abcd" "password"
"name5" "99:abcde"  "password"

this is also done server side. Rememer to give each admin a name (the one they use in game) and a password..

then i would make sure all the admins have set the correct user name in theire rev.ini file. (if thats what they use)
GAMEFOLDER\Left 4 Dead\rev.ini
this is done on the client side.. In theire game folder.

and I'd also have the admins edit theire autoexec.cfg
"GAMEFOLDER\left 4 dead\left 4 dead\cfg\autoexec.cfg"

Code:
setinfo "_ASEECRETWORD" "PASSWORD"
bind 1 "slot1"
bind 2 "slot2"
bind 3 "slot3"
bind 4 "slot4"
bind 5 "slot5"
bind 6 "slot6"
bind 7 "slot7"
bind 8 "slot8"
bind 9 "slot9"
bind 0 "slot10"

that would also be on the client side in theire game folder..
Remeber that the _ASEECRETWORD needs to match the one you set in your core.cfg file.
and the password needs to match the one in your admin_simple.ini for the given user name..

And thats that.. may need to reset the server after wards.


« Last Edit: July 14, 2009, 12:45:12 AM by jynx1973 » Logged

Manix
Powder Monkey
*

Karma: +0/-0
Offline Offline

Posts: 14
Referrals: 0


« Reply #14 on: February 28, 2010, 11:09:06 PM »

Hi there!

First of all, thanks for the great tutorial! I'd just like to say something about a problem I had and that I just fixed, in case some other people may have the same problem! I downloaded and installed both metamod and sourcemod correctly, but I was still getting "unknown command: sm_admin". I tried many things and couldn't get it to work. There, after a while, I found out that the sourcemod download link you give is in fact some older(or alpha?) versions, which were causing the sourcemod to not load properly in metamod. I noticed this when I was typing "meta list" in server console and got "Plugin 1: ERROR". I went on the sourcemod site and downloaded version 1.3.1 instead of the 1.2.5-hg Mercurial versions you linked to. I installed it and now everything works perfectly!

Hope this helps and thanks again! :-)
Logged
satannuts
Administrator
Admiral
******

Karma: +475/-42
Offline Offline

Location: USA
Posts: 1199
Referrals: 0


satannuts
WWW
« Reply #15 on: February 28, 2010, 11:58:37 PM »

Thanks for pointing that out... i will update that link.

take note though, that post is a year old already...  and so was that old link. )
Logged

Manix
Powder Monkey
*

Karma: +0/-0
Offline Offline

Posts: 14
Referrals: 0


« Reply #16 on: March 01, 2010, 12:09:57 AM »

Yes, no problem, I didn't want to critic you or complain, just wanted to help a bit :-)

BTW, should you put the stable release link instead? That's what I downloaded:
http://www.sourcemod.net/downloads.php

Or should I download the snapshots your new link links to? They say on their website that these are unstable!

Finally, since I know you're very good with server settings, would be cool you help me out with this little problem: It often happend to my Coop server to suddently change gametype to Survival!? It was always to survival mode I think, never happend while I was playing tho. Have any idea?

Thanks again!
« Last Edit: March 01, 2010, 04:21:34 AM by Manix » Logged
satannuts
Administrator
Admiral
******

Karma: +475/-42
Offline Offline

Location: USA
Posts: 1199
Referrals: 0


satannuts
WWW
« Reply #17 on: March 01, 2010, 06:10:34 PM »

Yes, no problem, I didn't want to critic you or complain, just wanted to help a bit :-)

BTW, should you put the stable release link instead? That's what I downloaded:
http://www.sourcemod.net/downloads.php

Or should I download the snapshots your new link links to? They say on their website that these are unstable!

Finally, since I know you're very good with server settings, would be cool you help me out with this little problem: It often happend to my Coop server to suddently change gametype to Survival!? It was always to survival mode I think, never happend while I was playing tho. Have any idea?

Thanks again!


I would put the stable release, but I've noticed that some plugins require a certain version of SM in order to function properly.  Either I had to update to a newer "stable" snapshot [don't worry its stable, lol] or even update to the latest development branch - which "could" be buggy, but so far the versions I've tested work just fine.

So yes, bypass the official release and grab at least the latest stable snapshot - just to be safe.
Just check with the plugins you're using/planning to use - and if it requires a later build or not.

--------------

As for gamemode changing...  there's several ways to handle that and only a few ways that actually work.


For starter's you can add the gamemode to your map command in your startup line to start the server in a specific game mode. Usage: map mapname gamemode
Example: +map c1m1_hotel coop
type: help mp_gamemode in yer server window to see the current set gamemode.


Another way to set the gamemode at startup is to exec a cfg file from the start-up line:
Server.cfg auto-loads every map change, so you don't want to use gamemode setting in that config or exec from the startup. [also if you wish to have difficulty changed in-game and have the changes carry over each map, I would also NOT put the difficulty setting in server.cfg - Same as if you were to put in the map command it would load the same map over and over]
So make a cfg file [gamemode.cfg], place it in your cfg folder, and add the lines:
Code:
// map + gamemode
map c3m1_plankcountry coop

sv_gametypes "coop,realism,survival" //Allowable game types "coop,realism,survival,versus,teamversus,scavenge,teamscavenge"
And in your startup line exec the cfg AFTER the map command:
+map c1m1_hotel +exec gamemode.cfg

Using the sv_gametypes command will set only the allowable gamemode you want the server to operate in, so change it to sv_gametypes coop for coop-only.  You can set this command in server.cfg if you want to be double sure that the server operates in your desired gamemode.


There was a third thing I wanted to mention, but forgot what it was as I was typing...
Oh... I use the gamemode in startup line and exec the cfg...  don't know if that affects anything.

Also I haven't tested, but may work, is adding that map + gamemode command to autoexec.cfg instead, without exec it via startup line, since it auto loads once at server startup.  Sorry for ranting on...

hope that helped and didn't confuse...
« Last Edit: March 01, 2010, 06:13:18 PM by satannuts » Logged

Manix
Powder Monkey
*

Karma: +0/-0
Offline Offline

Posts: 14
Referrals: 0


« Reply #18 on: March 02, 2010, 04:50:46 AM »

Oh, thanks man! Yes, that helped a lot of course :-) Don't know if it's working but yet it didn't change to survival ;-) That wasn't confusing me, only thing that confuses me right now is that since I made that gamemode cfg file and exec it in .bat server loader, my server loads twice the server.cfg file at beginning! Strange but it doesn't make any problems it seems.... I've only let the gamemode line in the cfg file, since map already loads with L4D2Server.bat loader. Here's my launch line of the bat file:
start /wait left4dead2\srcds.exe -console -game left4dead2 +hostip 74.58.250.161 +hostport 27015 +clientport 27006 -nohltv +exec server.cfg +map c2m1_highway coop +exec gamemode.cfg

Anyway, it's ok for that one if you can't help me, it's not a real problem. What I am wondering now, my last question for you hehe, is if you also get the 3following errors in server's console when you launch it(I have these since I installed my server but they don't seem to cause any trouble.... Just wondering tho if normal since I followed your tutorial):
-Parent cvar in server.dll not allowed (spit_scaling_min_scaling)
-You must be a server admin to use mp_disable_autokick     <--- lol? xD
-Failed to load Steam ServiceBOpenService failedServiceStart: failed to start      <--- Btw I often had legit Steam players joining my server, so not sure what is this used for?

And also these 2 but I think these are add-ons errors? Not sure
-ConVarRef test_progression_loop doesn't point to an existing ConVar
-Unknown command "mat_bloom_scalefactor_scalar"


Big thanks again for your great work mate! Awesome :-)
Logged
Manix
Powder Monkey
*

Karma: +0/-0
Offline Offline

Posts: 14
Referrals: 0


« Reply #19 on: March 04, 2010, 01:13:10 PM »

Ah.... Finally my server was still changed to another gametype Tongue :-(
Logged
KKHfai
Global Moderator
Admiral
****

Karma: +72/-5
Offline Offline

Location: Malaysia
Posts: 1090
Referrals: 0



« Reply #20 on: March 04, 2010, 01:17:07 PM »

Ah.... Finally my server was still changed to another gametype Tongue :-(

Why ?
Logged

Manix
Powder Monkey
*

Karma: +0/-0
Offline Offline

Posts: 14
Referrals: 0


« Reply #21 on: March 05, 2010, 12:15:23 AM »

I don't know.... It always happens when I'm not playing, but I think it's when steam players join from a lobby, they must select another gametype and it still choose my server instead of choosing another one that already has their gametype? So when they join it changes to any other gametype.... :-/

Also, would you have an idea if there's a way to make the server accept anyone when a steam lobby joins the server? I explain: I can play with my friends with cracked version and all, no problem, since I cracked my server. I can also have legit steam players joining my server with IP connection or by serverbrowser. BUT, when a steam lobby joins my server(I know it when I suddently see 4 players joining at the same time), it makes the server allow only player connections from that lobby? I mean, I kick one player so that there 1 room for me, but when I try to join, it doesn't want to let me in and in server console I got something like this:
Valve_Reject_Reserved_For_Lobby

BTW: I'm still waiting for an answer about my 5 server error messages above, if you have some time! ^^
« Last Edit: March 05, 2010, 12:17:54 AM by Manix » Logged
Pages: [1]   Go Up
Print
Jump to: