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

Restart nozowka


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

#1 Saper

    Godlike

  • Przyjaciel

Reputacja: 221
Profesjonalista

  • Postów:1 315
  • GG:
  • Imię:Juzio ;d
  • Lokalizacja:Bialystok
Offline

Napisano 30.09.2008 22:06

Hmm przerabialem sam plugin ale cos mi dzwiek nie dzila, nie odtwarza sie dzwiek....

/* 


#include <amxmodx> 
#include <amxmisc>

#define SETHUDMSG	set_hudmessage(000, 100, 255, -1.0, 0.25, 0, 6.0, 1.0, 0.1, 0.2, 4);
#define LEVEL_LEVEL	ADMIN_CFG

new bool:AutoRR = true
new bool:knifeArena = false

public plugin_init()
{
	register_plugin("Auto-Restart-Knives","0.2","Saper")
	register_dictionary("auto_restart_knives.txt")
	register_concmd("amx_auto_rr_knives","auto_rr",LEVEL_LEVEL," - 1 : ON | 0 : OFF")
	register_cvar("auto_rr_time","45")
	register_event("TextMsg","restart_time","a","2&#Game_C")
	register_event("CurWeapon","switchweapon","be","1=1","2!29")
	return PLUGIN_CONTINUE
}

public auto_rr(id)
{
	if (!(get_user_flags(id)&LEVEL_LEVEL)) {
		client_print(id, print_console, "[AMXX] %L", LANG_PLAYER, "NO_ACCESS")
		
		return PLUGIN_HANDLED
	}

	new arg [2]
	read_argv(1,arg,1)

	if(equal(arg, "1"))
	{
		AutoRR = true
		client_print(id,print_console,"[AMXX] %L", LANG_PLAYER, "ENABLED")
	}
	else if(equal(arg, "0"))
	{
		AutoRR = false
		client_print(id,print_console,"[AMXX] %L", LANG_PLAYER, "DISABLED")
	}
	else if(!equal(arg, "1") || equal(!arg, "0"))
	{
		client_print(id,print_console,"amx_auto_rr_knives 1 = On | 0 = Off");
	}
	return PLUGIN_HANDLED
 }

public switchweapon(id)
{
	if (!knifeArena)
		return PLUGIN_CONTINUE

	engclient_cmd(id,"weapon_knife")
	return PLUGIN_CONTINUE
}

public restart_time() 
{
	if (AutoRR==true)
	{
		new restart_time=get_cvar_num("auto_rr_time")

		knifeArena = true
		pause("ac","M_Antirusher_2.4.amxx")

		SETHUDMSG
		show_hudmessage(0, "%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",restart_time)

		set_task(float(restart_time),"restart_map",0)
		set_task(float(restart_time)-1,"restart_1s",0)
		set_task(float(restart_time)-2,"restart_2s",0)
		set_task(float(restart_time)-3,"restart_3s",0)
		set_task(float(restart_time)-4,"restart_4s",0)
		set_task(float(restart_time)-5,"restart_5s",0)

		if (restart_time > 10)
		{
		set_task(float(restart_time)-10,"restart_10s",0)
		}
		if (restart_time > 15)
		{
		set_task(float(restart_time)-15,"restart_15s",0)
		}
		if (restart_time > 20)
		{
		set_task(float(restart_time)-20,"restart_20s",0)
		}
		if (restart_time > 30)
		{
		set_task(float(restart_time)-30,"restart_30s",0)
		}
		if (restart_time > 40)
		{
		set_task(float(restart_time)-40,"restart_40s",0)
		}
		if (restart_time > 50)
		{
		set_task(float(restart_time)-50,"restart_50s",0)
		}
		if (restart_time > 60)
		{
		set_task(float(restart_time)-60,"restart_60s",0)
		}
	}
}

public restart_60s() 
{ 
	SETHUDMSG 
	show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_MIN",1)
}
public restart_50s() 
{ 
	SETHUDMSG 
	show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",50)
}
public restart_40s() 
{ 
	SETHUDMSG 
	show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",40)
}
public restart_30s() 
{ 
	SETHUDMSG 
	show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",30)
}
public restart_20s() 
{ 
	SETHUDMSG 
	show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",20)
}
public restart_15s() 
{ 
	SETHUDMSG 
	show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",15)
}
public restart_10s() 
{ 
	SETHUDMSG 
	show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",10)
}
public restart_5s() 
{ 
	SETHUDMSG 
	show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",5)
	client_cmd(0,"spk vox/five")
} 
public restart_4s() 
{ 
	SETHUDMSG
	show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",4)
	client_cmd(0,"spk vox/four")
} 
public restart_3s()
{
	SETHUDMSG
	show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",3)
	client_cmd(0,"spk vox/three")
}
public restart_2s()
{
	SETHUDMSG
	show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",2)
	client_cmd(0,"spk vox/two")
}
public restart_1s()
{
	SETHUDMSG
	show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",1)
	client_cmd(0,"spk vox/one")
}

public restart_map() 
{
	if (AutoRR==true)
	{
		set_cvar_float("sv_restart",1.0)
		knifeArena = false
		unpause("ac","M_Antirusher_2.4.amxx")
		set_task(2.0,"hudmess_show",0)
		SETHUDMSG
		show_hudmessage(0, "%L", LANG_PLAYER, "AUTOMATIC") 
		client_cmd(0,"spk misc/anima.wav")
	}
}

public hudmess_show()
{
		set_hudmessage(0, 100, 200, 0.05, 0.65, 2, 0.02, 6.0, 0.01, 0.1, 2)
		show_hudmessage(0, "%L", LANG_PLAYER, "NICE_GAME")
}

public plugin_precache()
{
	precache_sound( "misc/anima.wav")
	return PLUGIN_CONTINUE
}
plik anima.wav znajduje sie w cstrike/misc
Jak wchodze na server to sie plik sciaga , po nozowce nie gra muza.... Powie mi ktos dlaczego ???

Tu daje przed przerobka plugin
/* 
* AMX Mod X script. 
* Auto restart Knives by VikuS
* Skrypt powstał na bazie skryptu Auto-Restart by -ThX-
* Działa tylko pod AMXX
*
* amx_auto_rr_knives -- 1-ON 0-OFF
*
* CVAR: auto_rr_time <time> default 45
* 
*/    

#include <amxmodx> 
#include <amxmisc>

#define SETHUDMSG	set_hudmessage(000, 100, 255, -1.0, 0.25, 0, 6.0, 1.0, 0.1, 0.2, 4);
#define LEVEL_LEVEL	ADMIN_CFG

new bool:AutoRR = true
new bool:knifeArena = false

public plugin_init()
{
	register_plugin("Auto-Restart-Knives","0.2","VikuS")
	register_dictionary("auto_restart_knives.txt")
	register_concmd("amx_auto_rr_knives","auto_rr",LEVEL_LEVEL," - 1 : ON | 0 : OFF")
	register_cvar("auto_rr_time","45")
	register_event("TextMsg","restart_time","a","2&#Game_C")
	register_event("CurWeapon","switchweapon","be","1=1","2!29")
	return PLUGIN_CONTINUE
}

public auto_rr(id)
{
	if (!(get_user_flags(id)&LEVEL_LEVEL)) {
		client_print(id, print_console, "[AMXX] %L", LANG_PLAYER, "NO_ACCESS")
		
		return PLUGIN_HANDLED
	}

	new arg [2]
	read_argv(1,arg,1)

	if(equal(arg, "1"))
	{
		AutoRR = true
		client_print(id,print_console,"[AMXX] %L", LANG_PLAYER, "ENABLED")
	}
	else if(equal(arg, "0"))
	{
		AutoRR = false
		client_print(id,print_console,"[AMXX] %L", LANG_PLAYER, "DISABLED")
	}
	else if(!equal(arg, "1") || equal(!arg, "0"))
	{
		client_print(id,print_console,"amx_auto_rr_knives 1 = On | 0 = Off");
	}
	return PLUGIN_HANDLED
 }

public switchweapon(id)
{
	if (!knifeArena)
		return PLUGIN_CONTINUE

	engclient_cmd(id,"weapon_knife")
	return PLUGIN_CONTINUE
}

public restart_time() 
{
	if (AutoRR==true)
	{
		new restart_time=get_cvar_num("auto_rr_time")

		knifeArena = true
		pause("ac","antirusher.amxx")

		SETHUDMSG
		show_hudmessage(0, "%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",restart_time)

		set_task(float(restart_time),"restart_map",0)
		set_task(float(restart_time)-1,"restart_1s",0)
		set_task(float(restart_time)-2,"restart_2s",0)
		set_task(float(restart_time)-3,"restart_3s",0)
		set_task(float(restart_time)-4,"restart_4s",0)
		set_task(float(restart_time)-5,"restart_5s",0)

		if (restart_time > 10)
		{
		set_task(float(restart_time)-10,"restart_10s",0)
		}
		if (restart_time > 15)
		{
		set_task(float(restart_time)-15,"restart_15s",0)
		}
		if (restart_time > 20)
		{
		set_task(float(restart_time)-20,"restart_20s",0)
		}
		if (restart_time > 30)
		{
		set_task(float(restart_time)-30,"restart_30s",0)
		}
		if (restart_time > 40)
		{
		set_task(float(restart_time)-40,"restart_40s",0)
		}
		if (restart_time > 50)
		{
		set_task(float(restart_time)-50,"restart_50s",0)
		}
		if (restart_time > 60)
		{
		set_task(float(restart_time)-60,"restart_60s",0)
		}
	}
}

public restart_60s() 
{ 
	SETHUDMSG 
	show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_MIN",1)
}
public restart_50s() 
{ 
	SETHUDMSG 
	show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",50)
}
public restart_40s() 
{ 
	SETHUDMSG 
	show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",40)
}
public restart_30s() 
{ 
	SETHUDMSG 
	show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",30)
}
public restart_20s() 
{ 
	SETHUDMSG 
	show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",20)
}
public restart_15s() 
{ 
	SETHUDMSG 
	show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",15)
}
public restart_10s() 
{ 
	SETHUDMSG 
	show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",10)
}
public restart_5s() 
{ 
	SETHUDMSG 
	show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",5)
	client_cmd(0,"spk vox/five")
} 
public restart_4s() 
{ 
	SETHUDMSG
	show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",4)
	client_cmd(0,"spk vox/four")
} 
public restart_3s()
{
	SETHUDMSG
	show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",3)
	client_cmd(0,"spk vox/three")
}
public restart_2s()
{
	SETHUDMSG
	show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",2)
	client_cmd(0,"spk vox/two")
}
public restart_1s()
{
	SETHUDMSG
	show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",1)
	client_cmd(0,"spk vox/one")
}

public restart_map() 
{
	if (AutoRR==true)
	{
		set_cvar_float("sv_restart",1.0)
		knifeArena = false
		unpause("ac","antirusher.amxx")
		set_task(2.0,"hudmess_show",0)
		SETHUDMSG
		show_hudmessage(0, "%L", LANG_PLAYER, "AUTOMATIC") 
		client_cmd(0,"spk misc/trabka.wav")
	}
}

public hudmess_show()
{
		set_hudmessage(0, 100, 200, 0.05, 0.65, 2, 0.02, 6.0, 0.01, 0.1, 2)
		show_hudmessage(0, "%L", LANG_PLAYER, "NICE_GAME")
}

public plugin_precache()
{
	precache_sound( "misc/trabka.wav")
	return PLUGIN_CONTINUE
}

Pozdro
  • +
  • -
  • 0

#2 mgr inż. Pavulon

    C35H60Br2N2O4

  • Przyjaciel

Reputacja: 1 742
Godlike

  • Postów:6 881
  • Steam:steam
  • Imię:Konrad
  • Lokalizacja:Koniecpol
Offline

Napisano 30.09.2008 22:19

Wav'y mają taką "zaletę" w CS'ie że z nie wszystkimi parametrami chcą grać :/
Jeśli wszystko inne z restart_map() działa to spróbuj innego dźwięku użyć(pewnego) i okaże się czy w tym tkwi problem (i może przejdziesz wtedy na mp3).
  • +
  • -
  • 0

#3 Saper

    Godlike

  • Autor tematu
  • Przyjaciel

Reputacja: 221
Profesjonalista

  • Postów:1 315
  • GG:
  • Imię:Juzio ;d
  • Lokalizacja:Bialystok
Offline

Napisano 30.09.2008 22:28

wczesniej dawalem anima.mp3 i tez nie gralo....
  • +
  • -
  • 0

#4 grankee

    Godlike

  • Support Team

Reputacja: 517
Wszechwiedzący

  • Postów:1 500
  • Lokalizacja:Radom
Offline

Napisano 30.09.2008 22:52

mp3 play ścieżka i zobaczymy czy odegra
  • +
  • -
  • 0

#5 Saper

    Godlike

  • Autor tematu
  • Przyjaciel

Reputacja: 221
Profesjonalista

  • Postów:1 315
  • GG:
  • Imię:Juzio ;d
  • Lokalizacja:Bialystok
Offline

Napisano 30.09.2008 23:11

mp3 play ścieżka i zobaczymy czy odegra

tzn ??

client_cmd(0,"mp3 play misc/anima.mp3")
precache_sound( "mp3 play misc/anima.mp3")

tak ma byc ??
  • +
  • -
  • 0

#6 mgr inż. Pavulon

    C35H60Br2N2O4

  • Przyjaciel

Reputacja: 1 742
Godlike

  • Postów:6 881
  • Steam:steam
  • Imię:Konrad
  • Lokalizacja:Koniecpol
Offline

Napisano 30.09.2008 23:40

Skrypt ogólnie chyba jest dobry, problem z .wav'em widocznie.
Po zmianie na .mp3 u mnie działa:
#include <amxmodx>
#include <amxmisc>

#define SETHUDMSG    set_hudmessage(000, 100, 255, -1.0, 0.25, 0, 6.0, 1.0, 0.1, 0.2, 4);
#define LEVEL_LEVEL    ADMIN_CFG

new bool:AutoRR = true
new bool:knifeArena = false

public plugin_init()
{
    register_plugin("Auto-Restart-Knives","0.2","Saper")
    register_dictionary("auto_restart_knives.txt")
    register_concmd("amx_auto_rr_knives","auto_rr",LEVEL_LEVEL," - 1 : ON | 0 : OFF")
    register_cvar("auto_rr_time","45")
    register_event("TextMsg","restart_time","a","2&#Game_C")
    register_event("CurWeapon","switchweapon","be","1=1","2!29")
    return PLUGIN_CONTINUE
}

public auto_rr(id)
{
    if (!(get_user_flags(id)&LEVEL_LEVEL)) {
        client_print(id, print_console, "[AMXX] %L", LANG_PLAYER, "NO_ACCESS")
       
        return PLUGIN_HANDLED
    }

    new arg [2]
    read_argv(1,arg,1)

    if(equal(arg, "1"))
    {
        AutoRR = true
        client_print(id,print_console,"[AMXX] %L", LANG_PLAYER, "ENABLED")
    }
    else if(equal(arg, "0"))
    {
        AutoRR = false
        client_print(id,print_console,"[AMXX] %L", LANG_PLAYER, "DISABLED")
    }
    else if(!equal(arg, "1") || equal(!arg, "0"))
    {
        client_print(id,print_console,"amx_auto_rr_knives 1 = On | 0 = Off");
    }
    return PLUGIN_HANDLED
 }

public switchweapon(id)
{
    if (!knifeArena)
        return PLUGIN_CONTINUE

    engclient_cmd(id,"weapon_knife")
    return PLUGIN_CONTINUE
}

public restart_time()
{
    if (AutoRR==true)
    {
        new restart_time=get_cvar_num("auto_rr_time")

        knifeArena = true
        pause("ac","M_Antirusher_2.4.amxx")

        SETHUDMSG
        show_hudmessage(0, "%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",restart_time)

        set_task(float(restart_time),"restart_map",0)
        set_task(float(restart_time)-1,"restart_1s",0)
        set_task(float(restart_time)-2,"restart_2s",0)
        set_task(float(restart_time)-3,"restart_3s",0)
        set_task(float(restart_time)-4,"restart_4s",0)
        set_task(float(restart_time)-5,"restart_5s",0)

        if (restart_time > 10)
        {
        set_task(float(restart_time)-10,"restart_10s",0)
        }
        if (restart_time > 15)
        {
        set_task(float(restart_time)-15,"restart_15s",0)
        }
        if (restart_time > 20)
        {
        set_task(float(restart_time)-20,"restart_20s",0)
        }
        if (restart_time > 30)
        {
        set_task(float(restart_time)-30,"restart_30s",0)
        }
        if (restart_time > 40)
        {
        set_task(float(restart_time)-40,"restart_40s",0)
        }
        if (restart_time > 50)
        {
        set_task(float(restart_time)-50,"restart_50s",0)
        }
        if (restart_time > 60)
        {
        set_task(float(restart_time)-60,"restart_60s",0)
        }
    }
}

public restart_60s()
{
    SETHUDMSG
    show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_MIN",1)
}
public restart_50s()
{
    SETHUDMSG
    show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",50)
}
public restart_40s()
{
    SETHUDMSG
    show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",40)
}
public restart_30s()
{
    SETHUDMSG
    show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",30)
}
public restart_20s()
{
    SETHUDMSG
    show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",20)
}
public restart_15s()
{
    SETHUDMSG
    show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",15)
}
public restart_10s()
{
    SETHUDMSG
    show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",10)
}
public restart_5s()
{
    SETHUDMSG
    show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",5)
    client_cmd(0,"spk vox/five")
}
public restart_4s()
{
    SETHUDMSG
    show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",4)
    client_cmd(0,"spk vox/four")
}
public restart_3s()
{
    SETHUDMSG
    show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",3)
    client_cmd(0,"spk vox/three")
}
public restart_2s()
{
    SETHUDMSG
    show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",2)
    client_cmd(0,"spk vox/two")
}
public restart_1s()
{
    SETHUDMSG
    show_hudmessage(0,"%L", LANG_PLAYER, "AUTO_RR_FOR_SEC",1)
    client_cmd(0,"spk vox/one")
}

public restart_map()
{
    if (AutoRR==true)
    {
        set_cvar_float("sv_restart",1.0)
        knifeArena = false
        unpause("ac","M_Antirusher_2.4.amxx")
        set_task(2.0,"hudmess_show",0)
        SETHUDMSG
        show_hudmessage(0, "%L", LANG_PLAYER, "AUTOMATIC")
        client_cmd(0,"mp3 play sound/misc/anima.mp3")
    }
}

public hudmess_show()
{
        set_hudmessage(0, 100, 200, 0.05, 0.65, 2, 0.02, 6.0, 0.01, 0.1, 2)
        show_hudmessage(0, "%L", LANG_PLAYER, "NICE_GAME")
}

public plugin_precache()
{
    precache_sound("misc/anima.mp3")
    return PLUGIN_CONTINUE
}

  • +
  • -
  • 0

#7 Miczu

    Godlike

  • Przyjaciel

Reputacja: 657
Wszechmogący

  • Postów:2 862
Offline

Napisano 01.10.2008 11:50

plik anima.wav znajduje sie w cstrike/misc


Ma byc w cstrike/sound/misc

Precache sound wrzuca zawsze z folderu sound ;>
  • +
  • -
  • 0

#8 Saper

    Godlike

  • Autor tematu
  • Przyjaciel

Reputacja: 221
Profesjonalista

  • Postów:1 315
  • GG:
  • Imię:Juzio ;d
  • Lokalizacja:Bialystok
Offline

Napisano 01.10.2008 13:38

Dobra dzięki chlopaki :) Dziala :)

Ma byc w cstrike/sound/misc

Precache sound wrzuca zawsze z folderu sound ;>


Mialem tak jak napisales , tylko sie pomylilem jak pisalem post :)

Pozdro
  • +
  • -
  • 0




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

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