View Single Post
Author Message
conceptronic91
Member
Join Date: Jul 2006
Location: In America you can always find a party; In Russia, party finds YOU!
Old 08-05-2006 , 09:02   [HOWTO] set up a TSRP server with custom plug-ins[MANUAL][Plug-ins included]
Reply With Quote #1

NOTICE: It works fine with HLDS. If its not showing up on the server list, make sure all necessary ports are forwarded on your router.

19 September 2007 ANOTHER NOTE: Hey guys, this might be a bit late, but I want to tell you that this might not be compatible with TS 3.0 ...

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

This tutorial has 2 topics.
1-Setting up an plugin
2-Setting up an roleplay server

DOWNLOADS BELOW


First, Lets set up our Plugin
Many people say, that avaroleplay is old and outdated. That is not true, as long as you edit it correctly, you can use it for any (new) map.
Reason i don't recommend Harbu RP:
If people are already having trouble setting up amxx, they should first play around a bit with an easyer plug-in, that (i think) is a nice RP plugin too

The software you'll need
BSP Viewer (download below)
Amxx Studio (www.amxmodx.org)

Editing the Plugin
For this we will use avaroleplay, which can be downloaded below.
If you want to edit the plugin to fit any map you like, get BSP viewer, and amxx studio.
Now, lets just say we want to change the position of the gun shop.
go to the location in BSP viewer, where you would like the gun shop to be placed, and click "edit > copy camera position", then you put them in the gunshop line, like shown below.


PHP Code:
 // gun license variables
 
new barryent// barry variable
 
new haslicense[33][36]; // has license [playerid][weaponid]
 
new tsweaponLprice[36]; // cost of license for weapon
 
new tsweaponlist[36][256]; // name of weapons [weaponid][name]
 
new tsweaponammo[36]; // max ammo for weapons
new gunshop[3] = { -2518157, -412 }; // position of barry 
We wanted to change the gunshops position, like this:
PHP Code:
new gunshop[3] = { X coordY coordZ coord}; // position of barry 
Now you've changed the gunshops location!
The ATM's work different, example:
PHP Code:
 // ATM positions for Mecklenburg
 
new bankposX[3] = { -2504680275 };
 new 
bankposY[3] = { 1072,-430, -430 };
 new 
bankposZ[3] = { -400, -345, -345 }; 
It says, X, Y and Z, you put the X coordinate in the X section, and so on.
the [3] means that you can add 3 coordinates in there, if you make it a 4, you can put [4] coordinates in there, if you make it a [19] , you can put 19 coordinates in there, and so on..
It will look like this if you edit it:

PHP Code:
 // ATM positions for Mecklenburg
 
new bankposX[3] = { XX};
 new 
bankposY[3] = { YY};
 new 
bankposZ[3] = { ZZ}; 
And if you'd add 4 ATM's, it'd look like this:
PHP Code:
 // ATM positions for Mecklenburg
 
new bankposX[4] = { XXX};
 new 
bankposY[4] = { YYY};
 new 
bankposZ[4] = { ZZZ}; 
Some people find the coordinates in TS by typing "status" in the console, but 9 out of the 10 times it gives you the wrong coordinates, so i recommend BSP viewer. Also, some people use teleportmenu, i prefer the way i showed in my tutorial.

As you can see, you do not have to be an coder / programmer to edit amxx. I hope this helped you, now lets go on with
Setting up an RolePlay server with Amx mod X
everything below works excactly the same with other plugins, as long as you just put in the right names of the plugins and enable the right modules by deleting the ; in front of them, as shown below.

1-The software
You can use newer amx mod x too, as long as you download both the
installer and the needed modules of the same version, but i still recommend 1.5.
-install TS
-download Amx Mod X 1.5 @ www.amxmodx.org
http://prdownloads.sourceforge.net/a...0.exe?download
-download the needed modules
http://prdownloads.sourceforge.net/a...0.zip?download


2-Installing Amxx + Modules

-Run Amx mod X 1.5 installer, select "listen server" when it asks.
-Once finished, go to your the specialists folder / Addons / Amxx / modules
-In the modules folder, copy paste the modules included in the ts-1.50.zip file you download
-Go to the amxx/configs folder.
-Copy the config.cfg file that was included with the plug-ins into this folder.
-the config.cfg file should be edited to look like this, you could also just copy everything below, and replace it with the current text:


Code:
 
; AMX Mod X Modules
; You can specify both linux & win32 modules here
; To enable a module, remove the semi-colon from the line
; ------------------------------
; Fun - provides extra functions
; ------------------------------
fun_amxx_i386.so
fun_amxx.dll
fun_amxx_amd64.so
; ----------------------------------------------------
; Engine - provides engine functions core to Half-Life
; ----------------------------------------------------
engine_amxx_i386.so
engine_amxx.dll
engine_amxx_amd64.so
; ----------------------------------------------------------
; Fakemeta - provides a massive interface into the HL engine
; ----------------------------------------------------------
fakemeta_amxx_i386.so
fakemeta_amxx.dll
fakemeta_amxx_amd64.so
; -------------------------------------------
; Database Access - only enable one of these
; -------------------------------------------
; MySQL
;mysql_amxx_i386.so
;mysql_amxx.dll
;mysql_amxx_amd64.so
; PostgreSQL
;pgsql_amxx_i386.so
;pgsql_amxx.dll
; Microsoft SQL
;mssql_amxx.dll
; SQLite
;sqlite_amxx.dll
;sqlite_amxx_i386.so
;sqlite_amxx_amd64.so
; ---------------------------------------------
; GeoIP - determines the country of ip adresses
; ---------------------------------------------
;geoip_amxx_i386.so
;geoip_amxx.dll
;geoip_amxx_amd64.so
; --------------------------------
; Sockets - network socket support
; --------------------------------
;sockets_amxx_i386.so
;sockets_amxx.dll
;sockets_amxx_amd64.so
; --------------------------
; Regular Expression support
; --------------------------
;regex_amxx_i386.so
;regex_amxx.dll
;regex_amxx_amd64.so
; --------------------
; Binary Vault support
; --------------------
;nvault_amxx_i386.so
;nvault_amxx.dll
;nvault_amxx_amd64.so
; -----------------------------------------------------------
; The Specialists X - adds functions and stats specific to TS
; -----------------------------------------------------------
tsx_amxx_i386.so
tsx_amxx.dll
tsx_amxx_amd64.so
; -----------------------------------------------------------
; The Specialists Fun - more functionality
; -----------------------------------------------------------
tsfun_amxx_i386.so
tsfun_amxx.dll
tsfun_amxx_amd64.so
3-Plug-ins
-Get AVAROLEPLAY (below)
-Place this in ts/amxx/compile, and drag it on to the compile.exe, once finished, it should be placed in the compiled folder,
which is located in ts/amxx/compile/compiled.
-Place the .amxx file in ts/amxx/plugins
-Go to ts/amxx/configs and open plugins.cfg
-Scroll all the way down, and add
"avaroleplay.amxx debug"
it will look like this
Code:
//add third party plugins here
avaroleplay.amxx debug
If you want to add any plugins, it will look like this

Code:
//add third party plugins here
avaroleplay.amxx debug
pluginname.amxx debug
pluginname.amxx debug
pluginname.amxx debug
pluginname.amxx debug
If you add to much plugins, your server will lag, to prevent this, you can disable them, lets just say, we'll disable plugin number 3, by adding an ; in front of it.
Code:
//add third party plugins here
avaroleplay.amxx debug
pluginname.amxx debug
pluginname.amxx debug
pluginname.amxx debug
pluginname.amxx debug
;pluginnumberthree.amxx debug
You can leave it without the debug line, but i dont recommend it, only do this if you're sure the plugin is stable.

The required models for the plugin are located below

4-Final stuff to do
-Take a little break, so you can think clear if anything goes wrong.
-Restart steam.
-Run TS
-When running a server type "sv_lan 0" in the console, and also type "weaponrestriction 1".
-You can add this line of code, in the listenserver file, located in the ts folder, open that file with wordpad, it will then automaticly run those commands at startup, it might also be a nice idea to set the time limit to 0, or 999999999, so it will be unlimited.



A last word
once you know how all of this works, you will also know how to edit and run many other plug-ins. For optimall roleplay, try to get ahold of Talkarea and Doorunlocker, that would make it a good rp server.


Good luck, and have fun EDITING and Role Playing!





What does what?

"sv_lan 0", makes sure that you're server shows in the list, and isn't recognized as a LAN game

"weaponrestriction 1" makes sure people won't be able to buy guns, unless they're at an gun shop

deleting ; like shown above, enables the module, and adding a ; disables them.

The debug line works as followed: If amxx experiences any bugs, it will tell you what goes wrong, and you might be able to fix it, to fix it you'll have to look in the .sma file.

credits
avaroleplay by XxAvalanchexX
manual by Conceptronic91
amx mod x by its developers

Last edited by conceptronic91; 09-19-2007 at 15:29. Reason: new note
conceptronic91 is offline