Can anybody help for repair please?
Syntax: Select all
from events import Event
from players.entity import Player
from filters.players import PlayerIter
from path import path as Path
import sys
from messages import HudMsg
from colors import Color
import os
from configobj import ConfigObj
import core
from messages import SayText2
cfg_list = []
from stringtables.downloads import Downloadables
from listeners.tick import Delay
downloads = Downloadables()
def show_message(index, message):
HudMsg(
message=message,
x=-1.0,
y= 0.3,
color1=Color(255,255,0),
color2=Color(205,0,0),
effect=2,
fade_in=0.01,
fade_out=1.5,
hold_time=8,
fx_time=1.0,
channel=1
).send(index)
def get_addon_path():
path = os.path.dirname(os.path.abspath(__file__))
return path
def play_sound(sound):
for player in PlayerIter("all"):
player.play_sound(sound,1.0,0.0, download=True)
def create_overlay(index, overlay, duration):
player = Player(index)
player.client_command('r_screenoverlay %s' % overlay)
player.delay(duration, remove_overlay, (index))
def remove_overlay(index):
player = Player(index)
player.client_command('r_screenoverlay 0')
#Ini Class
class InI(object):
def __init__(self):
self.path = get_addon_path()
self.config = os.path.join(self.path, 'config', 'config.ini')
@property
def getConfigs(self):
return ConfigObj(self.config)
ini = InI()
for x in ini.getConfigs:
cfg_list.append(x)
file = ini.getConfigs[x]['overlay']
if file != "":
file_vtf = file.replace('.vmt', '.vtf')
downloads.add('materials/' + file)
downloads.add('materials/' + file_vtf)
@Event('player_say')
def player_say(ev):
text = ev['text']
txt = text.lower()
player = Player.from_userid(ev['userid'])
for x in cfg_list:
if set (txt.split()) & set(x.split()):
cfg = ini.getConfigs
if cfg[txt]['gametext'] == "1":
for play in PlayerIter("all"):
if play.index != player.index:
show_message(play.index, "%s: %s" % (player.name, text))
play_sound(cfg[txt]['file'])
if cfg[txt]['overlay'] != "":
for play in PlayerIter("all"):
if play.index != player.index:
create_overlay(play.index, cfg[txt]['overlay'], 3.0)
Syntax: Select all
[aaa]
file = "exae/player/aaa.mp3"
chat = "1"
gametext = "1"
overlay = "exae/bully.vmt"
[abschaum]
file = "exae/player/abschaum.wav"
chat = "1"
gametext = "1"
overlay = "0"
[affe]
file = "exae/player/affe.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[afk]
file = "exae/player/afk.wav"
chat = "1"
gametext = "1"
overlay = "0"
[aie]
file = "exae/player/aie.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[aie2]
file = "exae/player/aie2.wav"
chat = "1"
gametext = "1"
overlay = "0"
[aio]
file = "exae/player/aio.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[alkohol]
file = "exae/player/alkohol.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[arsch]
file = "exae/player/arsch.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[aua]
file = "exae/player/aua.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[aura]
file = "exae/player/aura.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[baby]
file = "exae/player/baby.mp3"
chat = "1"
gametext = "1"
overlay = "trigger/love.vmt"
[bb]
file = "exae/player/bb.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[beine]
file = "exae/player/beine.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[bekloppt]
file = "exae/player/bekloppt.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[bitte]
file = "exae/player/bitte.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[blamage]
file = "exae/player/blamage.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[blau]
file = "exae/player/blau.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[bleispucker]
file = "exae/player/bleispucker.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[blicken]
file = "exae/player/blicken.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[blitz]
file = "exae/player/blitz.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[buh]
file = "exae/player/buh.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[bums]
file = "exae/player/bums.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[burste]
file = "exae/player/burste.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[cheater]
file = "exae/player/cheater.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[clint]
file = "exae/player/clint.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[cry]
file = "exae/player/cry.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[cu]
file = "exae/player/cu.wav"
chat = "1"
gametext = "1"
overlay = "0"
[cya]
file = "exae/player/cya.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[danke]
file = "exae/player/danke.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[deitscher]
file = "exae/player/deitscher.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[doch]
file = "exae/player/doch.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[drogen]
file = "exae/player/drogen.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[drs]
file = "exae/player/drs.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[eier]
file = "exae/player/eier.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[eisprung]
file = "exae/player/eisprung.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[endstress]
file = "exae/player/endstress.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[erster]
file = "exae/player/erster.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[fack]
file = "exae/player/fack.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[furtz]
file = "exae/player/fart_01.wav"
chat = "1"
gametext = "1"
overlay = "0"
[faxen]
file = "exae/player/faxen.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[fds]
file = "exae/player/fds.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[fehlt]
file = "exae/player/fehlt.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[feierabend]
file = "exae/player/feierabend.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[fencheltee]
file = "exae/player/fencheltee.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[flieg]
file = "exae/player/flieg.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[fresse]
file = "exae/player/fresse.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[freund]
file = "exae/player/freund.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[froh]
file = "exae/player/froh.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[fu]
file = "exae/player/fu.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[fuchs]
file = "exae/player/fuchs.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[fuck]
file = "exae/player/fuck.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[gb]
file = "exae/player/gb.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[gehf]
file = "exae/player/gehf.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[geklaut]
file = "exae/player/geklaut.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[genau]
file = "exae/player/genau.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[gg]
file = "exae/player/gg.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[gr]
file = "exae/player/gr.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[grr]
file = "exae/player/grr.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[gute_nacht]
file = "exae/player/gute_nacht.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[hacker]
file = "exae/player/hacker.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[haha]
file = "exae/player/haha.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[hallo]
file = "exae/player/hallo.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[hehe]
file = "exae/player/hehe.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[hello]
file = "exae/player/hello.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[heul]
file = "exae/player/heul.wav"
chat = "1"
gametext = "1"
overlay = "0"
[hi]
file = "exae/player/hi.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[hihi]
file = "exae/player/hihi.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[hirn]
file = "exae/player/hirn.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[hoho]
file = "exae/player/hoho.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[inr]
file = "exae/player/inr.wav"
chat = "1"
gametext = "1"
overlay = "0"
[ja]
file = "exae/player/ja.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[jaja]
file = "exae/player/jaja.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[jaw]
file = "exae/player/jaw.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[jep]
file = "exae/player/jep.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[juhu]
file = "exae/player/juhu.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[ka]
file = "exae/player/ka.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[kackbratze]
file = "exae/player/kackbratze.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[kacken]
file = "exae/player/kacken.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[kacker]
file = "exae/player/kacker.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[kbad]
file = "exae/player/kbad.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[kippe]
file = "exae/player/kippe.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[komm]
file = "exae/player/komm.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[kommischwein]
file = "exae/player/kommischwein.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[kotzen]
file = "exae/player/kotzen.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[krampe]
file = "exae/player/krampe.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[krieg]
file = "exae/player/krieg.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[lauf]
file = "exae/player/lauf.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[leben]
file = "exae/player/leben.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[leistung]
file = "exae/player/leistung.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[list]
file = "exae/player/list.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[lmaa]
file = "exae/player/lmaa.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[lol]
file = "exae/player/lol.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[lool]
file = "exae/player/lool.wav"
chat = "1"
gametext = "1"
overlay = "0"
[lsd]
file = "exae/player/lsd.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[lucker]
file = "exae/player/lucker.wav"
chat = "1"
gametext = "1"
overlay = "0"
[liste]
file = "exae/player/liste.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[memme]
file = "exae/player/memme.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[mf]
file = "exae/player/mf.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[minen]
file = "exae/player/minen.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[moin]
file = "exae/player/moin.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[moo]
file = "exae/player/moo.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[morning]
file = "exae/player/morning.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[n1]
file = "exae/player/n1.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[nabend]
file = "exae/player/nabend.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[nach]
file = "exae/player/nach.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[nachwuchs]
file = "exae/player/nachwuchs.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[nein]
file = "exae/player/nein.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[nice]
file = "exae/player/nice.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[np]
file = "exae/player/np.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[ns]
file = "exae/player/ns.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[ns1]
file = "exae/player/ns1.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[ns2]
file = "exae/player/ns2.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[ns3]
file = "exae/player/ns3.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[ok]
file = "exae/player/ok.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[olm]
file = "exae/player/olm.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[omg]
file = "exae/player/omg.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[pissen]
file = "exae/player/pissen.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[pump]
file = "exae/player/pump.wav"
chat = "1"
gametext = "1"
overlay = "0"
[ramba]
file = "exae/player/ramba.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[richtig]
file = "exae/player/richtig.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[richtung]
file = "exae/player/richtung.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[rofl]
file = "exae/player/rofl.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[sack]
file = "exae/player/sackdu.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[sag]
file = "exae/player/sag.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[sani]
file = "exae/player/sani.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[sau]
file = "exae/player/sau.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[sau2]
file = "exae/player/sau2.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[schei]
file = "exae/player/schei.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[schlafen]
file = "exae/player/schlafen.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[schuss]
file = "exae/player/schuss.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[schwein]
file = "exae/player/schwein.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[schweine]
file = "exae/player/schweine.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[send]
file = "exae/player/send.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[soo]
file = "exae/player/soo.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[spass]
file = "exae/player/spass.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[spawn]
file = "exae/player/spawn.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[spray]
file = "exae/player/spray.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[sry]
file = "exae/player/sry.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[studi]
file = "exae/player/studi.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[thx]
file = "exae/player/thx.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[ty]
file = "exae/player/ty.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[ty1]
file = "exae/player/ty1.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[type]
file = "exae/player/type.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[ups]
file = "exae/player/ups.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[uncool]
file = "exae/player/uncool.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[viva]
file = "exae/player/viva.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[vp]
file = "exae/player/vp.wav"
chat = "1"
gametext = "1"
overlay = "0"
[wall]
file = "exae/player/wallhacker.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[wanna]
file = "exae/player/wannahavefun.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[wer]
file = "exae/player/wer.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[werlacht]
file = "exae/player/werlacht.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[win]
file = "exae/player/win.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[wo]
file = "exae/player/wo.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[wtf]
file = "exae/player/wtf.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[wtf1]
file = "exae/player/wtf1.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[wtf2]
file = "exae/player/wtf2.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[wtf3]
file = "exae/player/wtf3.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[yes]
file = "exae/player/yes.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[zaehne]
file = "exae/player/zaehne.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[zigi]
file = "exae/player/zigipause.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[bein]
file = "exae/player/bein.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[bett]
file = "exae/player/bett.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[bew]
file = "exae/player/bew.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[bier]
file = "exae/player/bier.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[bla]
file = "exae/player/bla.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[bob]
file = "exae/player/bob.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[ecke]
file = "exae/player/ecke.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[heim]
file = "exae/player/heim.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[hund]
file = "exae/player/hund.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[jamm]
file = "exae/player/jamm.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[kack]
file = "exae/player/kack.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[orga]
file = "exae/player/orga.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[tot]
file = "exae/player/tot.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[uelm]
file = "exae/player/uelm.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[wie]
file = "exae/player/wie.mp3"
chat = "1"
gametext = "1"
overlay = "0"
[dsl]
file = "vo/npc/female01/sorry03.wav"
chat = "1"
gametext = "1"
overlay = "0"
[hmm]
file = "vo/k_lab/al_moveon01.wav"
chat = "1"
gametext = "1"
overlay = "trigger/headshot.vmt"