Lieber Besucher, herzlich willkommen bei: sourceserver.info. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.
|
|
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 |
#Add the Path to your Terrorists Win-Sounds-Directory:
#(relative to cstrike/sound/ directory)
tOrdner = "winsounds/terwin/"
#Add the Path to your Counter-Terrorists Win-Sounds-Directory:
#(relative to cstrike/sound/ directory)
ctOrdner = "winsounds/ctwin/"
#
#No Edits need to be done beyond this line!!!
#
info = es.AddonInfo()
info.name = "Roundendsounds"
info.version = "1.0"
info.url = "http://addons.eventscripts.com/addons/view/roundendsound"
info.basename = "roundendsounds"
info.author = "sMo.licious"
es.ServerVar('roundendsound_ver', info.version, 'Roundendsounds Version').makepublic()
t_sounds = os.listdir(es.getString("eventscripts_gamedir") + "/sound/" + tOrdner)
ct_sounds = os.listdir(es.getString("eventscripts_gamedir") + "/sound/" + ctOrdner)
|
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 |
#Add the Path to your Terrorists Win-Sounds-Directory: #(relative to cstrike/sound/ directory) tOrdner = "winsounds/terwin/" #Add the Path to your Counter-Terrorists Win-Sounds-Directory: #(relative to cstrike/sound/ directory) ctOrdner = "winsounds/ctwin/" |

|
|
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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
import es, random, os
#########################################################################################
# #
# Roundendsounds v1.1 #
# #
# First Version by Brainsucker, edited by sMo.licious #
# #
# Plays Random sound every Round_end. Specific to the Winning Team. e.g. CTs or Ts #
# #
# Usage: #
# Edit the Path for both Directorys beyond this box and save to: #
# /cstrike/addons/eventscripts/roundendsound/ #
# add "es_load roundendsound" to the autoexec.cfg and restart the server #
# #
# visit: http://www.logimaxx.net #
# #
#########################################################################################
#Add the Path to your Terrorists Win-Sounds-Directory:
#(relative to cstrike/sound/ directory)
tOrdner = "winsounds/terwin/"
#Add the Path to your Counter-Terrorists Win-Sounds-Directory:
#(relative to cstrike/sound/ directory)
ctOrdner = "winsounds/ctwin/"
#
#No Edits need to be done beyond this line!!!
#
info = es.AddonInfo()
info.name = "Roundendsounds"
info.version = "1.0"
info.url = "http://addons.eventscripts.com/addons/view/roundendsound"
info.basename = "roundendsounds"
info.author = "sMo.licious"
es.ServerVar('roundendsound_ver', info.version, 'Roundendsounds Version').makepublic()
t_sounds = os.listdir(es.getString("eventscripts_gamedir") + "/sound/" + tOrdner)
ct_sounds = os.listdir(es.getString("eventscripts_gamedir") + "/sound/" + ctOrdner)
def es_map_start(ev):
download()
def round_end(event_var):
tSound = tOrdner + random.choice(t_sounds)
ctSound = ctOrdner + random.choice(ct_sounds)
for x in es.getUseridList():
if es.getplayersteamid(x) != "BOT":
if int(event_var['winner']) == 2:
es.cexec(x, "play %s" % tSound)
if int(event_var['winner']) == 3:
es.cexec(x, "play %s" % ctSound)
def download():
for x in t_sounds:
es.stringtable("downloadables", "sound/" + tOrdner + "%s" % x)
for x in ct_sounds:
es.stringtable("downloadables", "sound/" + ctOrdner + "%s" % x)
|