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

Flash Snitch mała przeróbka


  • Zamknięty Temat jest zamknięty
1 odpowiedź w tym temacie

#1 iloJ<3kOBEZ

    Nowy

  • Użytkownik

Reputacja: 0
Nowy

  • Postów:6
  • Lokalizacja:Przeworsk
Offline

Napisano 30.09.2010 09:16

Witam, mam pytanie czy mógłby mi ktoś przerobic plugin flash snitch tak aby po 3 oślepieniach gracza z własnego teamu stosował karę w postaci niemożliwości zakupu flasha do końca mapy?
/* 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, "^x04Zostales oslepiony przez ^x03%s", name)
            print_that(id, message)            
            
            get_user_name(id, name, 32)            
            formatex(message, 127, "^x04Oslepiles ^x03%s", name)
            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()
}

  • +
  • -
  • 0
[you] Zapraszam cię na moje Serwery cs wbij a nie pożałujesz!.

#2 ZiuTeK

    Wszechwiedzący

  • Użytkownik

Reputacja: 135
Zaawansowany

  • Postów:507
  • Lokalizacja:inąd
Offline

Napisano 30.09.2010 23:18

Sprobuj tego
/* 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

new licznik[33]=0

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_clcmd("flash","zatrzymaj")



    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, "^x04Zostales oslepiony przez ^x03%s", name)

		print_that(id, message)            

		

		get_user_name(id, name, 32)            

		formatex(message, 127, "^x04Oslepiles ^x03%s", name)

		print_that(g_flasher, message)

		licznik[id]+=1

        }

    }    

} 



stock print_that(id, text[])

{

    message_begin(MSG_ONE_UNRELIABLE, msg_saytext, {0,0,0}, id)

    write_byte(id)

    write_string(text)

    message_end()

}

public zatrzymaj(id)

{

	if(licznik[id]>=3)

	{

		client_print(id, print_chat, "Trzy razy oslepiles kolege z teamu, kupowanie flashy zablokowane");

		return PLUGIN_HANDLED

	}

	return PLUGIN_CONTINUE

}



public client_disconnect(id)

{

	licznik[id]=0

}
:

Użytkownik ZiuTeK edytował ten post 30.09.2010 23:18

  • +
  • -
  • 0




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

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