
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 27 28 29 30 31 32 33 34 35 36 37 |
import es, random
#
# Konfiguration
#
def config():
# Pro Sound hinzufuegen, relativ zu cstrike/sound/
# Text wird in der Mitte des Bildschirms angezeigt.
# Wichtig: Keine Umlaute, wenn doch, unbedingt zu UTF-8 konvertieren (Notepad++ z.B. unter Format -> zu UTF-8 konvertieren)
# Syntax: addSound("<soundpfad>", "<text>")
addSound("admin_plugin/noob.mp3", "Hoer auf Gegner anzuschiessen du NOOB!")
addSound("sonstiges/wehe.mp3", "Wehe das passiert noch einmal!")
#
# Code -- nichts mehr veraendern!
#
def load():
global db
db = []
def es_map_start(event_var):
for download in db:
es.stringtable("downloadables", "sound/%s" % download["sound"])
def player_hurt(event_var):
if event_var["attacker"] != "0" and event_var["es_userteam"] == event_var["es_attackerteam"]:
daten = random.choice(db)
es.playsound(event_var["userid"], daten["sound"], 1.0)
es.centertell(event_var["userid"], daten["text"])
def addSound(sound, text):
db.append({"sound":sound, "text":text})
|
|
|
Quellcode |
1 |
es_xload ffsounds |
Zitat von »"DeaD_EyE"«
Ne, bei uns im Wiki steht leider noch nichts dazu
Musst du mal warten, bis Chrisber das liest.
Zitat
Eilt auch nicht da ich EventScript und Mani erstmal auf meinem Privat-Rechner zum laufen bekommen muss (<- Gibtes dazu eine Anleitung oder ist das genauso als wenn ich das normal auf nen Dedicated-Server installieren will?)![]()
) und bekomme Folgende Fehlermeldung in der Konsole:
|
|
Quellcode |
1 2 3 4 5 |
def load(): global db db = [] config() |
|
|
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 40 41 42 43 |
import es, random
#
# Konfiguration
#
def config():
# Pro Sound hinzufuegen, relativ zu cstrike/sound/
# Text wird in der Mitte des Bildschirms angezeigt.
# Wichtig: Keine Umlaute, wenn doch, unbedingt zu UTF-8 konvertieren (Notepad++ z.B. unter Format -> zu UTF-8 konvertieren)
# Syntax: addSound("<soundpfad>", "<text>")
addSound("admin_plugin/noob.mp3", "Hoer auf Gegner anzuschiessen du NOOB!")
addSound("sonstiges/wehe.mp3", "Wehe das passiert noch einmal!")
#
# Code -- nichts mehr veraendern!
#
def load():
global db
db = []
config()
addDownloads()
def es_map_start(event_var):
addDownloads()
def player_hurt(event_var):
if event_var["attacker"] != "0" and event_var["es_userteam"] == event_var["es_attackerteam"]:
daten = random.choice(db)
es.playsound(event_var["userid"], daten["sound"], 1.0)
es.centertell(event_var["userid"], daten["text"])
def addSound(sound, text):
db.append({"sound":sound, "text":text})
def addDownloads():
for download in db:
es.stringtable("downloadables", "sound/%s" % download["sound"])
|
Die Sounds werden nun runtergeladen aber Text Ausgabe oder Sounds fehlanzeige|
|
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 40 41 42 43 44 45 46 |
import es, random
#
# Konfiguration
#
def config():
# Pro Sound hinzufuegen, relativ zu cstrike/sound/
# Text wird in der Mitte des Bildschirms angezeigt.
# Wichtig: Keine Umlaute, wenn doch, unbedingt zu UTF-8 konvertieren (Notepad++ z.B. unter Format -> zu UTF-8 konvertieren)
# Syntax: addSound("<soundpfad>", "<text>")
addSound("admin_plugin/noob.mp3", "Hoer auf Gegner anzuschiessen du NOOB!")
addSound("sonstiges/wehe.mp3", "Wehe das passiert noch einmal!")
#
# Code -- nichts mehr veraendern!
#
def load():
global db
db = []
config()
addDownloads()
def es_map_start(event_var):
addDownloads()
def player_hurt(event_var):
if event_var["attacker"] != "0" and event_var["es_userteam"] == event_var["es_attackerteam"]:
daten = random.choice(db)
for player in es.getUseridList():
if not es.isbot(player):
es.playsound(player, daten["sound"], 1.0)
es.centermsg(daten["text"])
def addSound(sound, text):
db.append({"sound":sound, "text":text})
def addDownloads():
for download in db:
es.stringtable("downloadables", "sound/%s" % download["sound"])
|
|
|
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 40 41 42 43 |
import es, random
#
# Konfiguration
#
def config():
# Pro Sound hinzufuegen, relativ zu cstrike/sound/
# Text wird in der Mitte des Bildschirms angezeigt.
# Wichtig: Keine Umlaute, wenn doch, unbedingt zu UTF-8 konvertieren (Notepad++ z.B. unter Format -> zu UTF-8 konvertieren)
# Syntax: addSound("<soundpfad>", "<text>")
addSound("admin_plugin/noob.mp3", "Hoer auf Gegner anzuschiessen du NOOB!")
addSound("sonstiges/wehe.mp3", "Wehe das passiert noch einmal!")
#
# Code -- nichts mehr veraendern!
#
def load():
global db
db = []
config()
addDownloads()
def es_map_start(event_var):
addDownloads()
def player_hurt(event_var):
if event_var["attacker"] != "0" and event_var["es_userteam"] == event_var["es_attackerteam"]:
daten = random.choice(db)
es.playsound(event_var["attacker"], daten["sound"], 1.0)
es.centertell(event_var["attacker"], daten["text"])
def addSound(sound, text):
db.append({"sound":sound, "text":text})
def addDownloads():
for download in db:
es.stringtable("downloadables", "sound/%s" % download["sound"])
|