Benutzerinformationen überspringen
Wohnort: Hagen
Beruf: Mechatroniker (didaktische Systeme)
Rootserver vorhanden: Nein
|
|
Quellcode |
1 |
echo Hello |
Benutzerinformationen überspringen
Wohnort: Schwelm
Beruf: Immobilien-Verwalter / Serveradministrator
Rootserver vorhanden: Nein
Benutzerinformationen überspringen
Wohnort: Hagen
Beruf: Mechatroniker (didaktische Systeme)
Rootserver vorhanden: Nein
Zitat
Source-Engine2): $mod/maps/cfg/$mapname.cfg Existiert die Konfigurationsdatei, wird sie automatisch nach der server.cfg geladen. $mapname ist der Name der Map. Bei de_dust2 würde z.B. de_dust2.cfg ausgeführt.
Benutzerinformationen überspringen
Wohnort: Hagen
Beruf: Mechatroniker (didaktische Systeme)
Rootserver vorhanden: Nein
Zitat
Da du eh schon Eventscripts nutzt, könnte vielleicht dieses sehr hilfreich sein: viewtopic.php?f=65&t=789
Benutzerinformationen überspringen
Wohnort: Hagen
Beruf: Mechatroniker (didaktische Systeme)
Rootserver vorhanden: Nein
|
|
Quellcode |
1 |
es_xload mapload |
|
|
Quellcode |
1 2 |
mapload gungame gg_ mapunload |
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
import es, gamethread
#
# Config
#
gungame = """
sv_gravity 20000
sv_alltalk 0
mp_friendlyfire 1
"""
standard = """
sv_gravity 100
sv_alltalk 1
mp_friendlyfire 0
"""
#
# Code - nichts aendern
#
def load():
gamethread.delayed(1, check, es.getString("eventscripts_currentmap").strip())
def es_map_start(event_var):
gamethread.delayed(1, check, event_var["mapname"].strip())
def check(mapname):
execute(gungame if mapname.startswith("gg_") else standard)
def execute(config):
for line in config.split("\n"):
line = line.strip()
if len(line) > 2:
es.server.queuecmd(line)
|
Benutzerinformationen überspringen
Wohnort: Hagen
Beruf: Mechatroniker (didaktische Systeme)
Rootserver vorhanden: Nein

|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
gungame
{
// Map-prefixes on which this rule will be executed - seperate with comma
// Example: if you enter "de_", any map starting with de_ will match
prefixes "gg_"
// Maps on which this rule will be executed - seperate with comma
// Example: if you enter "de_dust", this will NOT match on de_dust2
maps ""
// Scripts should be executed - seperate with comma
scripts "gungame"
// Configs should be executed (relative to cfg/) - don't use .cfg and seperate with comma
configs "gungame"
// 0 = first scripts then configs
// 1 = first configs then scripts
order 0
// 0 = never unload
// 1 = unload when map ends (exactly: when new map begins, this is by scripting limitations)
// 2 = unload if prefix or map doesn't match anymore
// 3 = unload if any other rule matches (not recommended)
unload 2
}
|
Zitat
Du musst nur noch die // am Anfang entfernen
Zitat
gungame
{
// Map-prefixes on which this rule will be executed - seperate with comma
// Example: if you enter "de_", any map starting with de_ will match
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
// Example configuration
// You can name a rule how ever you want (duplicate names are allowed)
//gungame
//{
// // Map-prefixes on which this rule will be executed - seperate with comma
// // Example: if you enter "de_", any map starting with de_ will match
// prefixes "gg_"
//
// // Maps on which this rule will be executed - seperate with comma
// // Example: if you enter "de_dust", this will NOT match on de_dust2
// maps ""
//
// // Scripts should be executed - seperate with comma
// scripts "gungame"
//
// // Configs should be executed (relative to cfg/) - don't use .cfg and seperate with comma
// configs "gungame"
//
// // 0 = first scripts then configs
// // 1 = first configs then scripts
// order 0
//
// // 0 = never unload
// // 1 = unload when map ends (exactly: when new map begins, this is by scripting limitations)
// // 2 = unload if prefix or map doesn't match anymore
// // 3 = unload if any other rule matches (not recommended)
// unload 2
//}
|
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
gungame
{
// Map-prefixes on which this rule will be executed - seperate with comma
// Example: if you enter "de_", any map starting with de_ will match
prefixes "gg_"
// Maps on which this rule will be executed - seperate with comma
// Example: if you enter "de_dust", this will NOT match on de_dust2
maps ""
// Scripts should be executed - seperate with comma
scripts "gungame"
// Configs should be executed (relative to cfg/) - don't use .cfg and seperate with comma
configs "gungame"
// 0 = first scripts then configs
// 1 = first configs then scripts
order 0
// 0 = never unload
// 1 = unload when map ends (exactly: when new map begins, this is by scripting limitations)
// 2 = unload if prefix or map doesn't match anymore
// 3 = unload if any other rule matches (not recommended)
unload 2
}
|