PDA

View Full Version : Some hardass gameserver coding.



Anexxion
09-08-2008, 09:14 PM
Basically, what I need is for my website, to send commands to a linux server.

Further detail: Said user is presented with a form, for example:

name(hostname): ABC SERVER
slots (this is where I am confused since this isn't a console variable):
roundtime(mp_roundtime): "5"
teamkill (mp_friendlyfire): "yes"
rcon pass(rcon_password): 12345

When they have finished choosing, they click "submit,"

Now, as soon as they click "submit," what they chose then edits some cvars (console variables) in a config file on the gameserver and then the gameserver is fired up almost immediately after the user clicks submit, making that gameservers, instantly setup for the user. I need this because I am setting up a gaming network with an "insta-scrim" setup.

if you need more info, let me know. I need examples on how to do this, here is some more detail


1. website > form

goes to

2. linux gameserver (or example, the path: x.x.x.x:27015>css>cstrike>cfg>server.cfg

Now, what it would do is modify:

hostname (HOSTNAME)
rcon_password (PASSWORD)
exec banned.cfg
exec listip.cfg
mp_logdetail 0
mp_logmessages 0
mp_timelimit 20
mp_autokick 1
mp_autoteambalance 0
mp_c4timer 20
mp_flashlight 0
mp_footsteps 1
mp_forcechasecam 0
mp_freezetime 0
mp_friendlyfire 0
mp_hostagepenalty 4
mp_limitteams 1000
mp_roundtime 5
mp_tkpunish 0
sv_restartround 1
sv_maxspeed 320
sv_proxies 1
allow_spectators 90
mp_startmoney 16000
mp_chattime 5
sv_allowupload 1
sv_voiceenable 1
sv_alltalk 0
sv_voicequality 5
sv_voicecodec vaudio_speex
pausable 0
decalfrequency 40
mp_falldamage 0
sv_aim 0
sv_cheats 0
sv_maxrate 20000
sv_minrate 4000
sv_lan 0
sv_contact
sv_region 0
net_maxfilesize 128

TO


hostname ABC SERVER
rcon_password 12345
exec banned.cfg
exec listip.cfg
mp_logdetail 0
mp_logmessages 0
mp_timelimit 20
mp_autokick 1
mp_autoteambalance 0
mp_c4timer 20
mp_flashlight 0
mp_footsteps 1
mp_forcechasecam 0
mp_freezetime 0
mp_friendlyfire 1
mp_hostagepenalty 4
mp_limitteams 1000
mp_roundtime 5
mp_tkpunish 0
sv_restartround 1
sv_maxspeed 320
sv_proxies 1
allow_spectators 90
mp_startmoney 16000
mp_chattime 5
sv_allowupload 1
sv_voiceenable 1
sv_alltalk 0
sv_voicequality 5
sv_voicecodec vaudio_speex
pausable 0
decalfrequency 40
mp_falldamage 0
sv_aim 0
sv_cheats 0
sv_maxrate 20000
sv_minrate 4000
sv_lan 0
sv_contact
sv_region 0
net_maxfilesize 128

Here is a perfect example of what I mean:

http://i37.tinypic.com/vifqcp.jpg

Once the user has done that, it directs you to your control panel where it says "the server is currently installed" (meaning it's copying new files to a new Ip) except about mine, it will already have the files on a certain IP so it would be insta-setup.

det0x@live.ca is my MSN if you would like to become a part of this project.
I hope you understand what I mean, this is for Counter-Strike: Source by the way.

PERFECT EXAMPLE (EDIT): http://www.inx-gaming.com/kb/view/1/instant-setup/

that is perfect, they made it so it is instantly set up, I need a system like that.

Anexxion
09-13-2008, 12:26 AM
Wow, nobody?

james438
09-13-2008, 06:42 PM
I'm no expert on webdesign, but are you talking about using a form to create a flat file or modifying an online gaming site like diablo except that it is one that you are hosting or are in charge of?

Anexxion
09-15-2008, 10:21 PM
I'm no expert on webdesign, but are you talking about using a form to create a flat file or modifying an online gaming site like diablo except that it is one that you are hosting or are in charge of?

yeah as soon as the user is done filling out the form, each section in that form modifies a certain part of a file on a remote server (gameserver)

techietim
09-15-2008, 11:15 PM
You're not really doing any coding on the game server itself. Most game servers have FTP which you'd use to transfer the file over.

Anexxion
09-16-2008, 11:19 AM
You're not really doing any coding on the game server itself. Most game servers have FTP which you'd use to transfer the file over.

oh wait i never thought of that, hm yeah that's easier, and yes i know it uses FTP, i own a network of servers.