Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

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

Prośba dodanie muzyki do pluginu.


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

#1 dezmontnikus

    Pomocny

  • Użytkownik

Reputacja: 2
Nowy

  • Postów:65
  • Lokalizacja:kontownia
Offline

Napisano 27.10.2009 17:36

Mam wielką prośbę do was.
Możecie dodać do pluginu żeby podczas trwania rundy leciała muzyka.
z góry wielkie dzięki

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>

new bool:isrestart = false
new timer

public plugin_init()
{
  register_plugin("Crazy Restart", "4.8", "Salamon")

  register_event("TextMsg","start","a","2&#Game_C")
  register_event("DeathMsg","DeathMsg", "a")
   
  register_cvar("crazy_restart","1")
  register_cvar("crazy_restart_time","45")
  register_cvar("crazy_restart_weapon","weapon_hegrenade")

  register_clcmd("drop","block")
  register_clcmd("cl_setautobuy","block")
  register_clcmd("cl_autobuy","block")
  register_clcmd("cl_setrebuy","block")
  register_clcmd("cl_rebuy","block")
  register_clcmd("buy","block")
  register_clcmd("glock","block")
  register_clcmd("usp","block")
  register_clcmd("p228","block")
  register_clcmd("deagle","block")
  register_clcmd("elites","block")
  register_clcmd("fn57","block")
  register_clcmd("m3","block")
  register_clcmd("autoshotgun","block")
  register_clcmd("mac10","block")
  register_clcmd("tmp","block")
  register_clcmd("mp5","block")
  register_clcmd("ump45","block")
  register_clcmd("p90","block")
  register_clcmd("galil","block")
  register_clcmd("ak47","block")
  register_clcmd("scout","block")
  register_clcmd("sg552","block")
  register_clcmd("awp","block")
  register_clcmd("g3sg1","block")
  register_clcmd("famas","block")
  register_clcmd("m4a1","block")
  register_clcmd("bullpup","block")
  register_clcmd("sg550","block")
  register_clcmd("m249","block")
  register_clcmd("shield","block")
  register_clcmd("primammo","block")
  register_clcmd("secammo","block")
  register_clcmd("vest","block")
  register_clcmd("vesthelm","block")
  register_clcmd("flash","block")
  register_clcmd("hegren","block")
  register_clcmd("sgren","block")
  register_clcmd("nvgs","block")

  register_clcmd("weapon_knife", "block")
  register_clcmd("weapon_sg550", "block")
  register_clcmd("weapon_mac10", "block")
  register_clcmd("weapon_aug", "block")
  register_clcmd("weapon_xm1014", "block")
  register_clcmd("weapon_p90", "block")
  register_clcmd("weapon_c4", "block")
  register_clcmd("weapon_tmp", "block")
  register_clcmd("weapon_mp5navy", "block")
  register_clcmd("weapon_ump45", "block")
  register_clcmd("weapon_m4a1", "block")
  register_clcmd("weapon_awp", "block")
  register_clcmd("weapon_g3sg1", "block")
  register_clcmd("weapon_sg552", "block")
  register_clcmd("weapon_scout", "block")
  register_clcmd("weapon_m3", "block")
  register_clcmd("weapon_m249", "block")
  register_clcmd("weapon_ak47", "block")
  register_clcmd("weapon_fiveseven", "block")
  register_clcmd("weapon_usp", "block")
  register_clcmd("weapon_glock18", "block")
  register_clcmd("weapon_deagle", "block")
  register_clcmd("weapon_p228", "block")
  register_clcmd("weapon_elite", "block")
  register_clcmd("weapon_flashbang", "block")
  register_clcmd("weapon_hegrenade", "block")
  register_clcmd("weapon_smokegrenade", "block")

  register_clcmd("lastinv", "block")
}


public DeathMsg(id)
{
if(isrestart == true)
{
new id = read_data(2)	

set_task(0.5, "odrodzenie", id)
}
}

public client_connect(id)
{
if(isrestart == true)
{
ExecuteHam(Ham_CS_RoundRespawn,id);
}
}

public odrodzenie(id)
{
ExecuteHam(Ham_CS_RoundRespawn,id);
}

public start()
{
  timer = get_cvar_num("crazy_restart_time")

  new Float:res_time = get_cvar_float("crazy_restart_time")

  if(get_cvar_num("crazy_restart") == 1)
   {
    isrestart = true

//dodajemy pluginy ktore chcemy zatrzymac na czas rundy nozowej
//a robimy to w nastepujacy sposob
//server_cmd("amx_pausecfg pause nazwa_pluginu.amxx")
//server_cmd("amx_pausecfg pause nazwa_pluginu2.amxx")
//dopisujemy te pluginy ktore chcemy zatrzymac i te same spowrotem
//wlaczamy nizej

    set_task(res_time + 1, "end")
    set_task(1.0, "count_me", 123, _, _, "b")
    set_task(1.0, "ammo", 123, _, _, "b")
   }
}

public ammo()
{
  new weapon[192]
  get_cvar_string("crazy_restart_weapon", weapon, 191)

  for(new i = 1; i <= get_playersnum(); i++)
  {
  give_item(i, weapon)
  engclient_cmd(i, weapon)
  }
}

public end()
{
 isrestart = false

 remove_task(123)
 
//tu spowrotem wlaczamy pluginy ktore zatrzymalismy wyzej
//server_cmd("amx_pausecfg enable nazwa_pluginu.amxx")
//server_cmd("amx_pausecfg enable nazwa_pluginu2.amxx")
//robimy tak z kazdym, a jak widac jedyne co sie zmienia to enable

 set_cvar_num("sv_restartround",1)
}

public count_me()
{
    new red = random_num(5,255)
    new green = random_num(5,255)
    new blue = random_num(5,255)  

    set_hudmessage(red, green, blue, -1.0, 0.01, 0, 0.1, 0.92, 0.1, 0.1, -1)
    show_hudmessage(0,"******************************^n Restart za %i sekund ^n******************************", timer)

    if(timer == 3)
    {
    client_cmd(0, "spk vox/three.wav")
    }
    if(timer == 2)
    {
    client_cmd(0, "spk vox/two.wav")
    }
    if(timer == 1)
    {
    client_cmd(0, "spk vox/one.wav")
    }
    timer--
}

public block(id)
{
    if(isrestart)
        return PLUGIN_HANDLED
   
    return PLUGIN_CONTINUE
}



  • +
  • -
  • 0

#2 Ortega

    mów mi Orti

  • Power User

Reputacja: 361
Wszechpomocny

  • Postów:640
  • GG:
  • Steam:steam
  • Imię:Marcin
  • Lokalizacja:Sosnowiec
Offline

Napisano 27.10.2009 18:33

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>

new bool:isrestart = false
new timer

public plugin_init()
{
	register_plugin("Crazy Restart", "4.8", "Salamon")
	
	register_event("TextMsg","start","a","2&#Game_C")
	register_event("DeathMsg","DeathMsg", "a")
	
	register_cvar("crazy_restart","1")
	register_cvar("crazy_restart_time","45")
	register_cvar("crazy_restart_weapon","weapon_hegrenade")
	
	register_clcmd("drop","block")
	register_clcmd("cl_setautobuy","block")
	register_clcmd("cl_autobuy","block")
	register_clcmd("cl_setrebuy","block")
	register_clcmd("cl_rebuy","block")
	register_clcmd("buy","block")
	register_clcmd("glock","block")
	register_clcmd("usp","block")
	register_clcmd("p228","block")
	register_clcmd("deagle","block")
	register_clcmd("elites","block")
	register_clcmd("fn57","block")
	register_clcmd("m3","block")
	register_clcmd("autoshotgun","block")
	register_clcmd("mac10","block")
	register_clcmd("tmp","block")
	register_clcmd("mp5","block")
	register_clcmd("ump45","block")
	register_clcmd("p90","block")
	register_clcmd("galil","block")
	register_clcmd("ak47","block")
	register_clcmd("scout","block")
	register_clcmd("sg552","block")
	register_clcmd("awp","block")
	register_clcmd("g3sg1","block")
	register_clcmd("famas","block")
	register_clcmd("m4a1","block")
	register_clcmd("bullpup","block")
	register_clcmd("sg550","block")
	register_clcmd("m249","block")
	register_clcmd("shield","block")
	register_clcmd("primammo","block")
	register_clcmd("secammo","block")
	register_clcmd("vest","block")
	register_clcmd("vesthelm","block")
	register_clcmd("flash","block")
	register_clcmd("hegren","block")
	register_clcmd("sgren","block")
	register_clcmd("nvgs","block")
	
	register_clcmd("weapon_knife", "block")
	register_clcmd("weapon_sg550", "block")
	register_clcmd("weapon_mac10", "block")
	register_clcmd("weapon_aug", "block")
	register_clcmd("weapon_xm1014", "block")
	register_clcmd("weapon_p90", "block")
	register_clcmd("weapon_c4", "block")
	register_clcmd("weapon_tmp", "block")
	register_clcmd("weapon_mp5navy", "block")
	register_clcmd("weapon_ump45", "block")
	register_clcmd("weapon_m4a1", "block")
	register_clcmd("weapon_awp", "block")
	register_clcmd("weapon_g3sg1", "block")
	register_clcmd("weapon_sg552", "block")
	register_clcmd("weapon_scout", "block")
	register_clcmd("weapon_m3", "block")
	register_clcmd("weapon_m249", "block")
	register_clcmd("weapon_ak47", "block")
	register_clcmd("weapon_fiveseven", "block")
	register_clcmd("weapon_usp", "block")
	register_clcmd("weapon_glock18", "block")
	register_clcmd("weapon_deagle", "block")
	register_clcmd("weapon_p228", "block")
	register_clcmd("weapon_elite", "block")
	register_clcmd("weapon_flashbang", "block")
	register_clcmd("weapon_hegrenade", "block")
	register_clcmd("weapon_smokegrenade", "block")
	
	register_clcmd("lastinv", "block")
}

public plugin_precache() 
{
	precache_sound("vox/muza.wav")
	return PLUGIN_CONTINUE
}

public DeathMsg(id)
{
	if(isrestart == true)
	{
		new id = read_data(2)   
		
		set_task(0.5, "odrodzenie", id)
	}
}

public client_connect(id)
{
	if(isrestart == true)
	{
		ExecuteHam(Ham_CS_RoundRespawn,id);
	}
}

public odrodzenie(id)
{
	ExecuteHam(Ham_CS_RoundRespawn,id);
}

public start()
{
	timer = get_cvar_num("crazy_restart_time")
	
	new Float:res_time = get_cvar_float("crazy_restart_time")
	
	if(get_cvar_num("crazy_restart") == 1)
	{
		isrestart = true
		
		//dodajemy pluginy ktore chcemy zatrzymac na czas rundy nozowej
		//a robimy to w nastepujacy sposob
		//server_cmd("amx_pausecfg pause nazwa_pluginu.amxx")
		//server_cmd("amx_pausecfg pause nazwa_pluginu2.amxx")
		//dopisujemy te pluginy ktore chcemy zatrzymac i te same spowrotem
		//wlaczamy nizej
		
		set_task(res_time + 1, "end")
		set_task(1.0, "count_me", 123, _, _, "b")
		set_task(1.0, "ammo", 123, _, _, "b")
	}
}

public ammo()
{
	new weapon[192]
	get_cvar_string("crazy_restart_weapon", weapon, 191)
	
	for(new i = 1; i <= get_playersnum(); i++)
	{
		give_item(i, weapon)
		engclient_cmd(i, weapon)
	}
}

public end()
{
	isrestart = false
	
	remove_task(123)
	
	//tu spowrotem wlaczamy pluginy ktore zatrzymalismy wyzej
	//server_cmd("amx_pausecfg enable nazwa_pluginu.amxx")
	//server_cmd("amx_pausecfg enable nazwa_pluginu2.amxx")
	//robimy tak z kazdym, a jak widac jedyne co sie zmienia to enable
	
	set_cvar_num("sv_restartround",1)
}

public count_me()
{
	new red = random_num(5,255)
	new green = random_num(5,255)
	new blue = random_num(5,255) 
	
	set_hudmessage(red, green, blue, -1.0, 0.01, 0, 0.1, 0.92, 0.1, 0.1, -1)
	show_hudmessage(0,"******************************^n Restart za %i sekund ^n******************************", timer)
	
	if(timer == get_cvar_num("crazy_restart_time"))
{
	client_cmd(0, "spk vox/muza.wav")
}
if(timer == 3)
{
	client_cmd(0, "spk vox/three.wav")
}
if(timer == 2)
{
	client_cmd(0, "spk vox/two.wav")
}
if(timer == 1)
{
	client_cmd(0, "spk vox/one.wav")
}
timer--
}

public block(id)
{
if(isrestart)
	return PLUGIN_HANDLED
	
	return PLUGIN_CONTINUE
}


Prawdopodobnie będzie to tak ale za dużo nie umiem więc mogłem coś walnąć.
Do folderu vox wrzuć sobie nutę o nazwie muza i formacie .wav
Powinna mieć długość standardowo 42sek , a jak zmienisz długość restartu to nuta powinna mieć długość X-3sek.
  • +
  • -
  • 0

#3 dezmontnikus

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 2
Nowy

  • Postów:65
  • Lokalizacja:kontownia
Offline

Napisano 27.10.2009 18:45

Zaraz wypróbuje. Wgrałem tylko ten plugin i miała być runda na granaty a niektórzy mają zwykłą bron. Może wiesz czego to przyczyna?

[ Dodano: 06-12-2009, 11:27 ]
Prośba... czy możecie zrobić żeby zamiast .wav odtwarzał mp3? próbowałem dopisać play mp3 ale za bardzo nie działało :/
  • +
  • -
  • 0

#4 Koles_GIT

    Nowy

  • Użytkownik

Reputacja: 0
zer0.

  • Postów:2
  • Lokalizacja:wawa
Offline

Napisano 06.12.2009 11:29

Nom, mi też by się to przydało :P
  • +
  • -
  • 0

#5 Ortega

    mów mi Orti

  • Power User

Reputacja: 361
Wszechpomocny

  • Postów:640
  • GG:
  • Steam:steam
  • Imię:Marcin
  • Lokalizacja:Sosnowiec
Offline

Napisano 06.12.2009 11:39

#include <amxmodx>

#include <amxmisc>

#include <fun>

#include <hamsandwich>



new bool:isrestart = false

new timer



public plugin_init()

{

    register_plugin("Crazy Restart", "4.8", "Salamon")

   

    register_event("TextMsg","start","a","2&#Game_C")

    register_event("DeathMsg","DeathMsg", "a")

   

    register_cvar("crazy_restart","1")

    register_cvar("crazy_restart_time","45")

    register_cvar("crazy_restart_weapon","weapon_hegrenade")

   

    register_clcmd("drop","block")

    register_clcmd("cl_setautobuy","block")

    register_clcmd("cl_autobuy","block")

    register_clcmd("cl_setrebuy","block")

    register_clcmd("cl_rebuy","block")

    register_clcmd("buy","block")

    register_clcmd("glock","block")

    register_clcmd("usp","block")

    register_clcmd("p228","block")

    register_clcmd("deagle","block")

    register_clcmd("elites","block")

    register_clcmd("fn57","block")

    register_clcmd("m3","block")

    register_clcmd("autoshotgun","block")

    register_clcmd("mac10","block")

    register_clcmd("tmp","block")

    register_clcmd("mp5","block")

    register_clcmd("ump45","block")

    register_clcmd("p90","block")

    register_clcmd("galil","block")

    register_clcmd("ak47","block")

    register_clcmd("scout","block")

    register_clcmd("sg552","block")

    register_clcmd("awp","block")

    register_clcmd("g3sg1","block")

    register_clcmd("famas","block")

    register_clcmd("m4a1","block")

    register_clcmd("bullpup","block")

    register_clcmd("sg550","block")

    register_clcmd("m249","block")

    register_clcmd("shield","block")

    register_clcmd("primammo","block")

    register_clcmd("secammo","block")

    register_clcmd("vest","block")

    register_clcmd("vesthelm","block")

    register_clcmd("flash","block")

    register_clcmd("hegren","block")

    register_clcmd("sgren","block")

    register_clcmd("nvgs","block")

   

    register_clcmd("weapon_knife", "block")

    register_clcmd("weapon_sg550", "block")

    register_clcmd("weapon_mac10", "block")

    register_clcmd("weapon_aug", "block")

    register_clcmd("weapon_xm1014", "block")

    register_clcmd("weapon_p90", "block")

    register_clcmd("weapon_c4", "block")

    register_clcmd("weapon_tmp", "block")

    register_clcmd("weapon_mp5navy", "block")

    register_clcmd("weapon_ump45", "block")

    register_clcmd("weapon_m4a1", "block")

    register_clcmd("weapon_awp", "block")

    register_clcmd("weapon_g3sg1", "block")

    register_clcmd("weapon_sg552", "block")

    register_clcmd("weapon_scout", "block")

    register_clcmd("weapon_m3", "block")

    register_clcmd("weapon_m249", "block")

    register_clcmd("weapon_ak47", "block")

    register_clcmd("weapon_fiveseven", "block")

    register_clcmd("weapon_usp", "block")

    register_clcmd("weapon_glock18", "block")

    register_clcmd("weapon_deagle", "block")

    register_clcmd("weapon_p228", "block")

    register_clcmd("weapon_elite", "block")

    register_clcmd("weapon_flashbang", "block")

    register_clcmd("weapon_hegrenade", "block")

    register_clcmd("weapon_smokegrenade", "block")

   

    register_clcmd("lastinv", "block")

}



public plugin_precache()

{

    precache_sound("vox/muza.mp3")

    precache_sound("vox/one.wav")

    precache_sound("vox/three.wav")

    precache_sound("vox/two.wav")

    return PLUGIN_CONTINUE

}



public DeathMsg(id)

{

    if(isrestart == true)

    {

        new id = read_data(2)   

       

        set_task(0.5, "odrodzenie", id)

    }

}



public client_connect(id)

{

    if(isrestart == true)

    {

        ExecuteHam(Ham_CS_RoundRespawn,id);

    }

}



public odrodzenie(id)

{

    ExecuteHam(Ham_CS_RoundRespawn,id);

}



public start()

{

    timer = get_cvar_num("crazy_restart_time")

   

    new Float:res_time = get_cvar_float("crazy_restart_time")

   

    if(get_cvar_num("crazy_restart") == 1)

    {

        isrestart = true

       

        //dodajemy pluginy ktore chcemy zatrzymac na czas rundy nozowej

        //a robimy to w nastepujacy sposob

        //server_cmd("amx_pausecfg pause nazwa_pluginu.amxx")

        //server_cmd("amx_pausecfg pause nazwa_pluginu2.amxx")

        //dopisujemy te pluginy ktore chcemy zatrzymac i te same spowrotem

        //wlaczamy nizej

       

        set_task(res_time + 1, "end")

        set_task(1.0, "count_me", 123, _, _, "b")

        set_task(1.0, "ammo", 123, _, _, "b")

    }

}



public ammo()

{

    new weapon[192]

    get_cvar_string("crazy_restart_weapon", weapon, 191)

   

    for(new i = 1; i <= get_playersnum(); i++)

    {

        give_item(i, weapon)

        engclient_cmd(i, weapon)

    }

}



public end()

{

    isrestart = false

   

    remove_task(123)

   

    //tu spowrotem wlaczamy pluginy ktore zatrzymalismy wyzej

    //server_cmd("amx_pausecfg enable nazwa_pluginu.amxx")

    //server_cmd("amx_pausecfg enable nazwa_pluginu2.amxx")

    //robimy tak z kazdym, a jak widac jedyne co sie zmienia to enable

   

    set_cvar_num("sv_restartround",1)

}



public count_me()

{

    new red = random_num(5,255)

    new green = random_num(5,255)

    new blue = random_num(5,255)

   

    set_hudmessage(red, green, blue, -1.0, 0.01, 0, 0.1, 0.92, 0.1, 0.1, -1)

    show_hudmessage(0,"******************************^n Restart za %i sekund ^n******************************", timer)

   

    if(timer == get_cvar_num("crazy_restart_time"))

{

    client_cmd(0, "mp3 play sound/vox/muza.mp3")

}

if(timer == 3)

{

    client_cmd(0, "spk vox/three.wav")

}

if(timer == 2)

{

    client_cmd(0, "spk vox/two.wav")

}

if(timer == 1)

{

    client_cmd(0, "spk vox/one.wav")

}

timer--

}



public block(id)

{

if(isrestart)

    return PLUGIN_HANDLED

   

    return PLUGIN_CONTINUE

}


  • +
  • -
  • 0

#6 dezmontnikus

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 2
Nowy

  • Postów:65
  • Lokalizacja:kontownia
Offline

Napisano 06.12.2009 12:16

muzyka leci tylko 3 s i się wyłącza :/ u wszystkich tak jest. Można to jakoś inaczej napisać?
  • +
  • -
  • 0




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

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