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
 

Zdjęcie

Team Flash Snitch - drobna przeróbka


  • Zamknięty Temat jest zamknięty
4 odpowiedzi w tym temacie

#1 kubus

    Wszechwidzący

  • Użytkownik

Reputacja: 54
Pomocny

  • Postów:284
  • GG:
  • Lokalizacja:Rzeszów
Offline

Napisano 03.02.2010 22:17

Witam, mam wielką prośbe - chciałbym pozbyć się dzwięku oraz komunikatu dla admina o oslepieniu fleshem

/* 
*  Team Flash Snitch
*
*  Author: Tender 
*  email: [email protected]
*  web:  www.paike.org
*  irc:  #paike @ quakenet
* 
* Description:
*  When teamflashed, this plugin announces who flashed you. The teamflasher
*  hears a "I'm blind" an gets a message of who he flashed.
*  It is also displayed for admins if someone is fully teamflashed.
*  Tested on Counter-Strike and Condition Zero servers.
*  This does NOT work for 100%...  but almost <img src='https://amxx.pl/public/style_emoticons/<#EMO_DIR#>/biggrin.gif' class='bbc_emoticon' alt=':-)' />
*
* Cvars:
*  
*  tfs_adminchat, default 1
*  0 - admins will not be aware
*  1 - admins gets an adminchat of who flashed who
*  
*  tfs_sound: Teamflasher hears "I'm blind!", default 1
*  0 - Sound Off
*  1 - Sound On
* 	
*  
* Changelog: 
*  1.1  - fixed bug: more than one player can get a message from the same teamflash event
*         new cvar: tfs_adminchat (2007-11-04)
*  1.0  - sound on/off cvar: tfs_sound 1/0 (2006-04-14)
*  0.3  - fixed bug: dead spectators will nog get message about teamflash (2006-03-16)
*  0.2  - changed flash owner code, a timer is added, "[Team Flash Snitch]" in green text (2006-03-12)
*  0.1  - initial release (2006-01-25)
*
* Credits:
*  Johnny got hes gun, his plugin "Blind" helped me writing this.
*  www.paike.org for testing this plugin on paike servers
*/ 

#include <amxmodx> 
#include <fakemeta> 

#define TEMPENTITY	"23"
#define BLINDED_FULLY	255
#define BLINDED_PARTLY	200 

new const TFSVERSION[] = "1.1"
new Float:FLASH_TIMER = 1.52	// Time from throwing a FB to the bang (1.52 seconds?)
new g_flasher = 0 		// id of the flasher


public plugin_init() { 
	register_plugin("Team Flash Snitch",TFSVERSION,"Tender")
	
	register_cvar("tfs_sound","1")
	register_cvar("tfs_adminchat","1")
	
	register_event("ScreenFade", "event_blinded", "be", "4=255", "5=255", "6=255", "7>199") 
	register_event(TEMPENTITY, "event_flashsmokepuff", "a", "1=5", "6=25", "7=6") 
	register_forward(FM_SetModel, "forward_setmodel") 
} 

public plugin_precache() {
	precache_sound ("radio/bot/im_blind.wav") 
	return PLUGIN_CONTINUE 
}



public event_blinded(const ID) { // someone got flashed
     
	new alpha = read_data(7) 
	if (alpha != BLINDED_FULLY && alpha != BLINDED_PARTLY || !is_user_alive(ID)) 
		return PLUGIN_CONTINUE 
	if(get_user_team(ID) == get_user_team(g_flasher) && ID != g_flasher){
		new message1[128], message2[128]
		new flasher[32], name[32] 
		get_user_name(g_flasher, flasher, 31) 
		get_user_name(ID, name, 31) 
		format(message1, 127, "^x04***^x01 Zostales oslepiony przez ^x03%s", flasher)	
		format(message2, 127, "^x04***^x01 Oslepiles %s^x03%s", alpha == BLINDED_FULLY ? "" : "", name)
		colored_msg(ID,message1)
		colored_msg(g_flasher,message2)
		if(get_cvar_num("tfs_sound")>0) client_cmd(g_flasher,"spk sound/radio/bot/im_blind.wav")
		if(alpha == BLINDED_FULLY && get_cvar_num("tfs_adminchat")) server_cmd("amx_chat %s flashed a teammate (%s)",flasher,name)
	}
	return PLUGIN_CONTINUE 
} 


public colored_msg(id,msg[]) { 
	message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id)
	write_byte(id)
	write_string(msg)
	message_end()
}

public event_flashsmokepuff() { // a flash has banged

	set_task(0.05,"reset_flasher") // wait until all is announced
	return PLUGIN_CONTINUE
} 

public reset_flasher(){ 
	g_flasher = 0	// clear g_flasher
}


public get_flasher(id){ // a flash is about to bang
	g_flasher = (id - 524627)
}


public forward_setmodel(const ENTITY, model[]) { // a flash is thrown
	
	if (!equal(model, "models/w_flashbang.mdl")) 
		return FMRES_IGNORED 

	new owner = pev(ENTITY, pev_owner)
	if (owner == 0) 
		return FMRES_IGNORED 

	set_task(FLASH_TIMER,"get_flasher", 524627+owner)
   
	return FMRES_IGNORED 
} 


/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1053\\ f0\\ fs16 \n\\ par }
*/


oraz proszę o pomoc w temacie http://amxx.pl/m-ant...tan-t19956.html gdyż nadal nie otrzymałem w nim pomocy.

Użytkownik kubus edytował ten post 03.02.2010 22:31

  • +
  • -
  • 1

#2 loleN

    Profesjonalista

  • Oczekujący

Reputacja: 27
Życzliwy

  • Postów:157
  • Steam:steam
  • Lokalizacja:Częstochowa
Offline

Napisano 03.02.2010 22:58

zobacz nie testowałem...

Załączone pliki


  • +
  • -
  • 1

#3 L0rdS^P0l4K

    Profesjonalista

  • Użytkownik

Reputacja: 117
Zaawansowany

  • Postów:197
  • GG:
  • Steam:steam
  • Imię:Denis
  • Lokalizacja:Tarnowskie Góry
Offline

Napisano 03.02.2010 23:00

register_cvar("tfs_sound","1")
	register_cvar("tfs_adminchat","1")
Ustaw sobie w kodzie albo w amxx.cfg te wartości na 0.
do amxx.cfg
tfs_sound "0"
tfs_adminchat "0"

Użytkownik denis13wroc edytował ten post 03.02.2010 23:01

  • +
  • -
  • 1

#4 kubus

    Wszechwidzący

  • Autor tematu
  • Użytkownik

Reputacja: 54
Pomocny

  • Postów:284
  • GG:
  • Lokalizacja:Rzeszów
Offline

Napisano 03.02.2010 23:03

loleN, zdaje się, że wywaliłeś nie to co powinieneś bo widze ze nawet tekstu nie ma :P
denis13wroc, chyba działa Dzięki serdeczne.

Do zamknięcia.

Użytkownik kubus edytował ten post 03.02.2010 23:14

  • +
  • -
  • 1

#5 Adminek AMXX.PL

    Admin :)

  • Bot

Reputacja: 156
Profesjonalista

  • Postów:7 490
  • Lokalizacja:AMXX.PL
Offline

Napisano 03.02.2010 23:48

Wiadomość wygenerowana automatycznie


Ten temat został zamknięty przez moderatora.

Powód: działa

Jeśli się z tym nie zgadzasz, Dołączona grafika raportuj ten post, a moderator lub administrator rozpatrzy go ponownie.


Z pozdrowieniami,
Zespół AMXX.PL




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych