AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=58)
-   -   FAQ: Sourcemod Newbies Guide (https://forums.alliedmods.net/showthread.php?t=69092)

CrimsonGT 03-28-2008 07:30

FAQ: Sourcemod Newbies Guide
 
I have recieved an immense amount of help since I joined up at this community and I know theres a ton of things I have learned, and still a massive amount I haven't. I am going to start a large collection of Questions/Answers that we can hopefully point new comers to in hopes of not repeating the same things over and over again. I would love for any newcomers to post their questions here, as well as any SM Veteran to contribute question/answers that they have seen around a lot.

Sourcemod Installation & Configuration

Q: I am new to Sourcemod, can anyone give me some information on how to install it and set it up for my Server?

A: Sourcemod is a plugin for Metamod which is also needed to do your install. You will need to install Metamod and Sourcemod for it to properly load. You can use the following links for instructions in installing both of these to your server. Use Metamod 1.4 for non OrangeBox games such as Counter-Strike Source, and Metamod 1.6 for games such as TF2.

Metamod Source Installation:
http://wiki.alliedmods.net/index.php...lling_SourceMM

Sourcemod Installation:
http://wiki.alliedmods.net/Installing_SourceMod

Q: I have everything setup correctly, but now I need to know how to do all of the customization and settings for my server!

A: There are a few main files and directories you can use for most of your settings involving sourcemod. You can use the following list to find specific locations of files. All of these are going to assume you are in your games directory on the server.

1) /cfg/sourcemod/sourcemod.cfg - All of your general Sourcemod Settings.
2) /addons/sourcemod/configs/
->admins_simple.ini -Set your admins and their immunities/flags here.
->maplists.cfg - Specify the file location to use as a map list.
3) /addons/sourcemod/plugins/ - All of your active server plugins. You can move others such as RTV and MapChooser into this folder from the "disabled" directory, and it will automatically create default configs for them when they are loaded.

Q: I installed Sourcemod a while back, and haven't really messed with it since then. I noticed I am running a very old build, how often should we update it?

A: It is recommended you upgrade every 100 builds and definitely every stable release.

Q: I am looking into installing Sourcemod on my server, but I am worried about keeping my server secured. Are there anyways a hacker could use my admin in Sourcemod?

A: It is actually safer to run Sourcemod and disable your RCON as Sourcemod loads admins based on Steam IDs (other options available) from a file. This eliminates the threat of a hacker figuring out your RCON and destroying your server. You can use sm_rcon in console as an admin to do your usual rcon commands if you prefer that.

CrimsonGT 03-28-2008 08:28

Re: FAQ: Sourcemod Newbies Guide
 
Provided by Tesla-X4:

Q: What's the usual structure for activating Sourcemod plugins, please?


A: The forums allow downloads for both a plugin's source code (Get Source) and the plugin itself (Get Plugin). Source code files typically have the filename extenstion .sp (you cannot run these files, they must be compiled first). Compiled plugins (i.e. those you can drop into your addons/sourcemod/plugins/ folder and expect to run) have the extenstion .smx.
Plugins usually read settings from either two places: addons/sourcemod/configs/<plugin-specific name>.cfg/.ini/.txt or cfg/sourcemod/<plugin-specific name>.cfg
Some plugins don't even read either of the two, so you'll have to either add the cvars you wish to change to cfg/server.cfg or to cfg/sourcemod/sourcemod.cfg (the former method is probably preferred). Only specify one cvar per line! A typical cvar looks something like sm_<plugin name>_enabled.

Q: Is there a simple list of admin commands floating about that explains what they do, please?

A: See this wiki page and this one. Note that some plugins are disabled by default, you can find them in the addons/sourcemod/plugins/disabled folder. To enable them, simply copy/move them out of that folder into the plugins folder. Similarly, if you wish to disable a plugin (unneeded or causing stability issues), move it into the disabled folder. Creating another folder inside the plugins folder and moving the plugin in there will not disable it, moving it into the disabled folder (or deleting it) is the only way to disable the plugin.

Q: What's the difference between 'rcon' and 'sm_admin' and other command prefixes, please?

A: (I hope I'm interpreting your question correctly, since both commands are entirely different) The 'rcon' prefix is used to execute a command through the server console. The commands most plugins make available can be run straight from the clients'/admins' client-side console (depending on the required permissions set on the command) and even in chat (prefixed with ! or / ). There is a SourceMod equivalent of the rcon command, sm_rcon, for people with the rcon admin flag to use.

Q: Do I need to use a password to access my admin rights or can they be set up to be linked to my name/IP/Steam ID, please?

A: A password is usually optional since they can be authenticated via SteamID. See this page for more information.

Q: Can I get admin commands to echo me back that they've done something or get used to trusting something happened, please?

A: Sure, but you'll have to manually edit and recompile the plugin to be able to fix that. (someone else elaborate more on this for me please)

Q: Is there a clear and easy way to set up a reserved slot system for Sourcemod servers, please?

A: See this page, it's far more detailed than I can possibly be lol

Q: How do I add people to a list of regulars, who get preferrential treatment and make sure that those who get kicked know why it's happening?

A: See the Immunity section on this page.

Q: Is there an easy way to allow players to initiate votes on maps, settings and possibly even bans, if someone is being an idiot and there's no admin present, please?

A: Yes, there is a way to do this. There are two plugins available that do this: Players Votes and Custom Votes. See the plugins' respective pages for details.

CrimsonGT 03-28-2008 08:30

Re: FAQ: Sourcemod Newbies Guide
 
Reserved Space for FAQ pt. 3

CrimsonGT 03-28-2008 08:33

Re: FAQ: Sourcemod Newbies Guide
 
Reserved Space for FAQ pt. 4

Gweedo 03-28-2008 11:36

Re: FAQ: Sourcemod Newbies Guide
 
Looks good. Maybe add some basic troubleshooting tips like checking the log files and using sm plugins list and sm plugins debug.

Ari 09-17-2009 19:58

Re: FAQ: Sourcemod Newbies Guide
 
I'm going to ask all the newbie questions now, since you're keen to write a newb guide. Great idea by the way! :)

What is metamod, please? And why can't you just install Sourcemod on to a game server?
(The reason I ask is that I think understanding why you're doing something helps a person understand how the whole thing works)

What's the usual structure for activating Sourcemod plugins, please?

I see mention of .SMX files a lot and these, I think, are usually accompanied by at least 1 .CFG file that has all the settings for the particular plugin in it. Once these two elements are in the right folders, is there a 'central' Sourcemod .CFG file that needs to include a line for that particular plugin, please? For example: activatemyshinyplugin "1"

What are considered 'good' set-ups for different games supported by Sourcemod, please?

By this I mean a 'good' starting server.cfg and 'essential' plugins that players will general expect to be able to access or information they expect to see. There are a vast array of plugins here, I have no idea which ones are considered 'the standard', aside from making a call based on which ones seem to be installed on lots of servers.

Is there a simple list of admin commands floating about that explains what they do, please?

There seem to be at least three different ways of doing the same thing through through various inputs, like the console and in-game chat and 'quick commands' that use symbols, like '@'. Is there 'a best practice' or what's simpler the easiest approach?

What's the difference between 'rcon' and 'sm_admin' and other command prefixes, please?

Do I need to use a password to access my admin rights or can they be set up to be linked to my name/IP/Steam ID, please?

Can I get admin commands to echo me back that they've done something or get used to trusting something happened, please?

Is there a clear and easy way to set up a reserved slot system for Sourcemod servers, please?

How do I add people to a list of regulars, who get preferrential treatment and make sure that those who get kicked know why it's happening?

Is there an easy way to allow players to initiate votes on maps, settings and possibly even bans, if someone is being an idiot and there's no admin present, please?

Can this be logged or set to send an email to an admin list, so they can check on banning issues?

Is there any point having HLstats? What are they? Do people care about it? Should I care if I want to encourage return players?

And finally, a very specific question that's been bugging me for ages.

How do you set up player commands that allow them to choose to join your Steam group, please?

I've seen advertisement messages come up on some servers that say "Why not join our steam group, just type !steam". I'd like to be able to offer this ability to players. Is it also possible to do something similar for sending feedback or easily and quickly adding the server to their favourites, please?

I'll stop there. I know I and a heck of a lot of people will appreciate answers to these things in a structured way that makes Sourcemod more accessible. It's clearly a very powerful and useful server tool, but to someone coming into this environment without much prior knowledge of game server admin-ing, it's currently quite impenetrable and requires a lot of searching to pull together the basic information. I realise that not everyone will agree with that, but this is my experience. I also appreciate that admin-ing a gaming server isn't for everyone and does require at least a little technical knowledge.

All help and advice greatly, greatly appreciated.

TESLA-X4 09-17-2009 22:19

Re: FAQ: Sourcemod Newbies Guide
 
Q: What's the usual structure for activating Sourcemod plugins, please?

A: The forums allow downloads for both a plugin's source code (Get Source) and the plugin itself (Get Plugin). Source code files typically have the filename extenstion .sp (you cannot run these files, they must be compiled first). Compiled plugins (i.e. those you can drop into your addons/sourcemod/plugins/ folder and expect to run) have the extenstion .smx.
Plugins usually read settings from either two places: addons/sourcemod/configs/<plugin-specific name>.cfg/.ini/.txt or cfg/sourcemod/<plugin-specific name>.cfg
Some plugins don't even read either of the two, so you'll have to either add the cvars you wish to change to cfg/server.cfg or to cfg/sourcemod/sourcemod.cfg (the former method is probably preferred). Only specify one cvar per line! A typical cvar looks something like sm_<plugin name>_enabled.

Q: Is there a simple list of admin commands floating about that explains what they do, please?

A: See this wiki page and this one. Note that some plugins are disabled by default, you can find them in the addons/sourcemod/plugins/disabled folder. To enable them, simply copy/move them out of that folder into the plugins folder. Similarly, if you wish to disable a plugin (unneeded or causing stability issues), move it into the disabled folder. Creating another folder inside the plugins folder and moving the plugin in there will not disable it, moving it into the disabled folder (or deleting it) is the only way to disable the plugin.

Q: What's the difference between 'rcon' and 'sm_admin' and other command prefixes, please?

A: (I hope I'm interpreting your question correctly, since both commands are entirely different) The 'rcon' prefix is used to execute a command through the server console. The commands most plugins make available can be run straight from the clients'/admins' client-side console (depending on the required permissions set on the command) and even in chat (prefixed with ! or / ). There is a SourceMod equivalent of the rcon command, sm_rcon, unfortunately it does not return any feedback to you like the rcon command does.

Q: Do I need to use a password to access my admin rights or can they be set up to be linked to my name/IP/Steam ID, please?

A: A password is usually optional since they can be authenticated via SteamID. See this page for more information.

Q: Can I get admin commands to echo me back that they've done something or get used to trusting something happened, please?

A: Sure, but you'll have to manually edit and recompile the plugin to be able to fix that. (someone else elaborate more on this for me please)

Q: Is there a clear and easy way to set up a reserved slot system for Sourcemod servers, please?

A: See this page, it's far more detailed than I can possibly be lol

Q: How do I add people to a list of regulars, who get preferrential treatment and make sure that those who get kicked know why it's happening?

A: See the Immunity section on this page.

Q: Is there an easy way to allow players to initiate votes on maps, settings and possibly even bans, if someone is being an idiot and there's no admin present, please?

A: Yes, there is a way to do this. There are two plugins available that do this: Players Votes and Custom Votes. See the plugins' respective pages for details.

(I know I skipped some, I'm lazy, lol)

Ari 09-18-2009 09:27

Re: FAQ: Sourcemod Newbies Guide
 
Wow, thanks for answering!

olj 09-19-2009 03:28

Re: FAQ: Sourcemod Newbies Guide
 
Since you are moderator, can you make it sticky? I think you want this to be ontop, so newcomers will look here rather then asking same questions over and over. gj btw -)

olj 09-19-2009 06:48

Re: FAQ: Sourcemod Newbies Guide
 
I dont know if its presented somewhere in faqs. But its annoying as hell. And they still asking it inside plugins' topics. Not really SM related, but since SM uses menu with these keys, and in l4d they are not bound by default, i think it should be mentioned.

Q: I cant use 5-0 menu choices in L4D.

A
:
bind "5" "slot5"
bind "6" "slot6"
and so on.
Put this in config.cfg .

nicatronTg 09-21-2009 22:34

Re: FAQ: Sourcemod Newbies Guide
 
Question: What exactly do you get for donating, for example, what exactly goes on in the donation forum? Is it actively posted in? Is support there generally better than the other forums?

Maxis010 09-22-2009 05:54

Re: FAQ: Sourcemod Newbies Guide
 
Quote:

Originally Posted by CrimsonGT (Post 603234)
Provided by Tesla-X4:
Q: Can I get admin commands to echo me back that they've done something or get used to trusting something happened, please?

A: Sure, but you'll have to manually edit and recompile the plugin to be able to fix that. (someone else elaborate more on this for me please

Some more A: If the command doesn't already respond then you need to open the source of the plugin that creates that command and add some code to make the command respond, something simple like this would suffice

Code:

ReplyToCommand(client, "[SM] My First Plugin Enabled");
Just make it relevant to the plugin and clear to the user



Hope this is enough elaboration...

cigs 12-02-2009 14:24

Re: FAQ: Sourcemod Newbies Guide
 
Is there a way to list all the console commands of a sm plugin?

I know sm_help can list all the sourcemod admin commands, but how can I list all plugin related commands, as some plugins have long and hard to remember commands.

I hope I'm not going to get flammed for posting here. I thought not to create a topic for a simple question like this.

EDIT: Thank you, Sillium.

Sillium 12-03-2009 01:16

Re: FAQ: Sourcemod Newbies Guide
 
Do "sm plugins list" look for the plugin number and than do
"sm cmds PLUGINNUMBER"

e.g.
Quote:

sm cmds 01
[SM] Listing 1 commands for: Advertisements
[Name] [Type] [Help]
sm_advertisement server Reload the advertisements


EL3CTR1CK 12-06-2009 05:11

Re: FAQ: Sourcemod Newbies Guide
 
hey, i also got a question.

Ur talking about .sp file.

But how and where can u compile it??

Dog_Pound 12-06-2009 12:27

Re: FAQ: Sourcemod Newbies Guide
 
You can go to this page and upload your file:
http://www.sourcemod.net/compiler.php

Or you can use your last downloaded set of folders for sourcemod and go to this folder:
\addons\sourcemod\scripting

There's a game piece symbol there called compile, you just drop your .sp file on it then after the cmd window closes (hopefully successfully), you can find the .smx file in the compiled folder in the same location.

kswift 12-06-2009 15:14

Re: FAQ: Sourcemod Newbies Guide
 
When i get the .SMX plugin and save it to the sourcemod>plugins file, what do i do next?

my server wont start when i save it in there but it will start if i move it to the disable folder?

Where do i tweak the CVARS?

I Dl'd sprint_source for CSS.

EL3CTR1CK 12-07-2009 14:56

Re: FAQ: Sourcemod Newbies Guide
 
Quote:

Originally Posted by Dog_Pound (Post 1008483)
You can go to this page and upload your file:
http://www.sourcemod.net/compiler.php

Or you can use your last downloaded set of folders for sourcemod and go to this folder:
\addons\sourcemod\scripting

There's a game piece symbol there called compile, you just drop your .sp file on it then after the cmd window closes (hopefully successfully), you can find the .smx file in the compiled folder in the same location.

but it says it cant compile it bexause there are folds in it.

-=[BG]²=-Ben_Jamin 12-17-2009 23:02

Re: FAQ: Sourcemod Newbies Guide
 
I need help installin mods i would be willing to pay for the help if anyonew is interested please let me know [email protected]

ctu 04-09-2010 22:24

Re: FAQ: Sourcemod Newbies Guide
 
Nice FAQ guide although still dose not help with what I need :P

Eternal Rebel 05-27-2010 15:44

Re: FAQ: Sourcemod Newbies Guide
 
how do i setup sourcemod to autoupdate?

psychonic 05-27-2010 15:52

Re: FAQ: Sourcemod Newbies Guide
 
Quote:

Originally Posted by Eternal Rebel (Post 1192842)
how do i setup sourcemod to autoupdate?

It only autoupdates gamedata. It is set to do so by default without any extra configuration.

blue zebra 06-17-2010 11:37

Re: FAQ: Sourcemod Newbies Guide
 
Hi.
A fast question.
Why do the new MM (1.8 ) and SM (1.3.1 and 2) versions randomly restarts on many rented servers? Old versions, like the MM_1_7 and SM 1.2.5 hg2828 works like a charm. But when i change all to new versions, the server do segfault errors and crashed. Again, and again. The provider send me:

Jun 17 16:08:39 xxxxx kernel: srcds_i686[18142]: segfault at 0 ip 00000000f17d0323 sp 00000000ffe1bb40 error 4 in metamod.1.ep1.so[f17b8000+35000]

Repeat. The old version are very stable. But some new version of the sm scripts, like the rcon_lock is don't work with these old versions. Please help me. What is this?
Thanks in advance.

Rented server with linux
Game: CS: S
All needed files is up to date

all of our plugins run from the sourcemod.ini (we do not use .vdf files)

Like this:

addons/detox/bin/detox_mm

addons/dfens/bin/dfens_mm_i486_og

addons/sourcemod/bin/sourcemod_mm

addons/mani_admin_plugin/bin/mani_admin_plugin_mm


yoyo

Bacardi 06-17-2010 16:01

Re: FAQ: Sourcemod Newbies Guide
 
Quote:

Originally Posted by blue zebra (Post 1211513)
Hi.
Jun 17 16:08:39 xxxxx kernel: srcds_i686[18142]: segfault at 0 ip 00000000f17d0323 sp 00000000ffe1bb40 error 4 in metamod.1.ep1.so[f17b8000+35000]

Metamod source crash ?
What you have in ...addons/metamod.vdf

Have you created vdf file to metamod source from here after update
http://www.sourcemm.net/vdf

Never mind... it still run that linux file.

blue zebra 06-17-2010 16:37

Re: FAQ: Sourcemod Newbies Guide
 
Hi.
Yes.
The server scashing in all 1, max. 1,5 hour. All time we have in the screenlog.0 :
"segfault blablabla" and the server restarted.

MM 1.7 and SM 1.2.5 work well.
In the last hours i try to start the MM from vdf file. Nothing not changed.
What is the minimal required MM version for the Sourcemod 1.3.0 ?
Thanks.

Algebraic! 06-24-2010 15:47

Re: FAQ: Sourcemod Newbies Guide
 
Hello
Im new to sourcemod and i have a question (i hope im posting in the right place)

So i was looking through the commands an admin can do to a player, and i noticed one that said Noclip a player, and it made me wonder....
Do any of the commands in sourcemod turn on sv_cheats?
I just want to make sure i dont use the ones that do because i do not want sv_cheats enabled at any time.

Pawn 3-pg 06-25-2010 10:18

Re: FAQ: Sourcemod Newbies Guide
 
None of the commands will turn on sv_cheats, but some of them will only work with sv_cheats turned on.

Algebraic! 06-25-2010 16:27

Re: FAQ: Sourcemod Newbies Guide
 
Quote:

Originally Posted by Pawn 3-pg (Post 1219431)
None of the commands will turn on sv_cheats, but some of them will only work with sv_cheats turned on.

Ok thanks...so say if i tried the "Noclip player" admin command and sv_cheats was equal to 0 nothing would happen?

Sk8inl8 06-30-2010 15:09

Re: FAQ: Sourcemod Newbies Guide
 
I want to get this weapon into L4D2. http://www.fpsbanana.com/skins/88427
Could you teach me a step by step way to put this into the game? I installed Meta/Source mods and there both on my desktop. Do i need to move these into l4d2 then put the files from the download into the meta/sourcemods? o.O Im a day new to this, and i really could use some help .

KarnageInk 01-13-2011 06:34

Re: FAQ: Sourcemod Newbies Guide
 
hi when i try to compile something, it says fatal error 120, cant read from that file. the sp file im compiling is not mine, done by a veteran modder. what is the problem?

dave_with_beer_bottle 12-28-2011 18:45

Re: FAQ: Sourcemod Newbies Guide
 
what is the command to load plugin without restarting server or changing map?

TnTSCS 12-28-2011 18:48

Re: FAQ: Sourcemod Newbies Guide
 
sm plugins load
[SM] Usage: sm plugins load <file>

dave_with_beer_bottle 06-28-2012 19:31

Re: FAQ: Sourcemod Newbies Guide
 
thanks guys, have another question about the new cvar sv_rcon_maxpacketsize (what number is safe here ,so it doesn't ban people trying to connect?)
and what number should be here sv_rcon_maxpacketbans ?
was looking for some more info, but there is none when i try to google :/
thank you in advance

Bacardi 06-29-2012 11:00

Re: FAQ: Sourcemod Newbies Guide
 
Quote:

Originally Posted by dave_with_beer_bottle (Post 1738532)
thanks guys, have another question about the new cvar sv_rcon_maxpacketsize (what number is safe here ,so it doesn't ban people trying to connect?)
and what number should be here sv_rcon_maxpacketbans ?
was looking for some more info, but there is none when i try to google :/
thank you in advance

Just use default settings...

DooM Marine 08-06-2012 01:52

Re: FAQ: Sourcemod Newbies Guide
 
Hello, new to Sourcemod, want to check it out so I can run aherkin's no dropped weapons plugin, for just general screwing around with bots in offline mode.

However, before I even install Sourcemod I was in the process of installing Metamod and step three didn't apply to me; I simpily want to use Sourcemod for only the little LAN servers I create with the create server button.

Any help would be greatly appreciated, thank you.

Dr. McKay 08-11-2012 16:30

Re: FAQ: Sourcemod Newbies Guide
 
Quote:

Originally Posted by DooM Marine (Post 1765570)
Hello, new to Sourcemod, want to check it out so I can run aherkin's no dropped weapons plugin, for just general screwing around with bots in offline mode.

However, before I even install Sourcemod I was in the process of installing Metamod and step three didn't apply to me; I simpily want to use Sourcemod for only the little LAN servers I create with the create server button.

Any help would be greatly appreciated, thank you.

Drop the files into C:\Program Files\Steam\steamapps\<username>\team fortress 2\tf

(insert (x86) if appropriate).

You need to modify your TF2 launch parameters to add -insecure, but this will prevent you from joining VAC-secure servers.

Dr. McKay 08-18-2012 01:14

Re: FAQ: Sourcemod Newbies Guide
 
Quote:

Originally Posted by Theodore (Post 1774854)
well...guys all of your discussion have elated me...As i was searching here for something that can add much to my knowledge....and here it is.Really its a kind of great post for me...:)
but guys tell me one thing..Why it is necessary to restrat server in case of loading plugin?:shock:

It isn't. sm plugins load pluginname

minhvu94 09-03-2012 21:27

Re: FAQ: Sourcemod Newbies Guide
 
Guy please check it out : http://www.youtube.com/watch?v=eMx6ifvPL2w
My games crashed at 2:29, but only after installing Sourcemod (MMSource is working fine), is there anyway to get rid of this?
Anything to fix it up is very appreciated! Thanks!

TnTSCS 09-03-2012 21:58

Re: FAQ: Sourcemod Newbies Guide
 
Quote:

Originally Posted by minhvu94 (Post 1790830)
Guy please check it out : http://www.youtube.com/watch?v=eMx6ifvPL2w
My games crashed at 2:29, but only after installing Sourcemod (MMSource is working fine), is there anyway to get rid of this?
Anything to fix it up is very appreciated! Thanks!

Sourcemod isn't supported to run on CS:GO with anything other than a dedicated server at this time.

Stealthy5 09-28-2012 11:04

Re: FAQ: Sourcemod Newbies Guide
 
Hello!

I'm trying to create a server for css and i can't seem to get the sourcemod and metamod to work.I've done everything that was said on : http://wiki.alliedmods.net/Installing_SourceMod and when i try using the meta list command it says Unknown command "meta"

Regards


All times are GMT -4. The time now is 03:00.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.