Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Sokole - zdjęcie

Sokole

Rejestracja: 28.08.2010
Aktualnie: Nieaktywny
Poza forum Ostatnio: 20.08.2016 23:04
-----

#464099 [ROZWIĄZANE] Dodanie dzwieku

Napisane przez QuahodronN w 04.10.2012 14:02

Proszę

/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#define PLUGIN "Flash Snitch"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"
#define ID 3322
new msg_saytext
new g_flasher
public plugin_init() {
                register_plugin(PLUGIN, VERSION, AUTHOR)

                msg_saytext = get_user_msgid("SayText")

                register_event("ScreenFade", "ScreenFade", "be", "4=255", "5=255", "6=255", "7>199")
                register_event("23", "TEMPENTITY", "a", "1=5", "6=25", "7=6")

                register_forward(FM_SetModel, "SetModel")
}

public SetModel(ent, model[])
{         
                if(equal(model, "models/w_flashbang.mdl"))
                {         
                static owner
                owner = pev(ent, pev_owner)
                if(owner)         
                {
                                set_task(1.52,"get_flasher", ID + owner)
                }
                }
}
public TEMPENTITY()
{         
                set_task(0.05, "reset_flasher")
                return PLUGIN_CONTINUE
}
public reset_flasher()
{
                g_flasher = 0
}
public get_flasher(id)
{
                g_flasher = (id - ID)
}
public ScreenFade(id)
{         
                if(is_user_alive(id))
                {
                if(id != g_flasher && get_user_team(id) == get_user_team(g_flasher))
                {
                                static name[33], message[128]

                                get_user_name(g_flasher, name, 32)                       
                                formatex(message, 127, "^x04[MLEKO] ^x01Zostales oslepiony przez ^x03%s", name)
                                print_that(id, message)         

                                get_user_name(id, name, 32)                     
                                formatex(message, 127, "^x04[MLEKO] ^x01Wlasnie Oslepiles ^x03%s", name)
client_cmd(id, "mp3 play sound/nazwa.mp3")
                                print_that(g_flasher, message)
                }
                }         
}
stock print_that(id, text[])
{
                message_begin(MSG_ONE_UNRELIABLE, msg_saytext, {0,0,0}, id)
                write_byte(id)
                write_string(text)
                message_end()
}

  • +
  • -
  • 1