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
Modyfikacja

Przeróbka rr.amxx

Modyfikacja

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

#1 Clark

    Życzliwy

  • Użytkownik

Reputacja: 0
Nowy

  • Postów:28
Offline

Napisano 29.10.2009 18:43

Witam proszę Was Bardzo o Przerobienie tego Pluginu do Formatu mp3. nie chce wav z muzyczka tylko mp3.
#include <amxmodx>             // AMX Mod X 
#include <amxmisc> 

new czas = 60 
new resety=3 
new noze=0 
new restart_title[1][] = { "La Resistance" } 

new misc[3][]={"misc/one.wav","misc/two.wav","misc/three.wav"} 

new bylo_juz=0 

public plugin_init() 
{ 
    register_plugin("ROund STart REstart","1.9","Miczu & Ox!d3") // Mi też się coś należy ;D 
    
    register_event("HLTV","Event_StartRound","a","1=0","2=0") 

    return PLUGIN_CONTINUE 
} 

public test_it(){ 
    new players[32], num, num2 
    get_players(players,num,"e","TERRORIST") 
    get_players(players,num2,"e","CT") 
    if(num2<1 || num<1) return 0 
    return 1 
} 

public client_disconnect(id){ 
    set_task(0.3,"disconnect",0) 
} 

public disconnect(){ 
    if(test_it()==0 && noze==0) bylo_juz=0 
} 

public Event_StartRound(){ 
    if(test_it()==0 && noze==0) bylo_juz=0 
    set_task(0.2,"restart_odlicz", 0) 
    set_task(6.0,"restart_odlicz", 0) 
} 

public client_PreThink ( id ) 
{ 
    if(noze) client_cmd(id,"weapon_knife") 
} 

public restart_odlicz(){ 
        
    if(test_it() && noze==0 && bylo_juz==0){ 
        noze=1 
        bylo_juz=1 
        czas=60 
        resety=3 
        pause("ac","Antirusher.amxx") 
        pause("ac","M_Antirusher.amxx") 
        pause("ac","M_Antirusher_2.4.amxx") 
        pause("ac","M_Antirusher_2.5.amxx") 
        pause("ac","M_Antirusher_2.5b.amxx") 
        pause("ac","imessage.amxx") 
        pause("ac","scrollmsg.amxx") 
        set_task(3.0,"muza_on", 0) 
        set_task(1.0,"wyswietl_res",8188,"",0,"b") 
    } 
} 

public muza_on(){ 
    client_cmd(0,"stopsound") 
    client_cmd(0,"spk misc/play_ejo.wav") 
} 

public wyswietl_res(){ 

    new jac1=random_num(0,255) 
    new jac2=random_num(0,255) 
    new jac3=random_num(0,255)    

    set_hudmessage(jac1, jac2, jac3, 0.65, 0.75, 2, 0.02, 1.0, 0.01, 0.1, 10) 
    show_hudmessage(0,"==================^n    *%s *^n  RESTART ZA: %i sec^n==================", restart_title, czas) 
    czas-- 
    if(czas==3){ 
        set_task(0.7,"restart_rundy_0", 0) 
    } 
} 

public restart_rundy_play(){ 
    set_hudmessage(10, 255, 40, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 4) 
    show_hudmessage(0,"===================^n* LIVE LA RESISTANCE *^n===================") 
} 

public restart_rundy(){ 
    unpause("ac","Antirusher.amxx") 
    unpause("ac","M_Antirusher.amxx") 
    unpause("ac","M_Antirusher_2.4.amxx") 
    unpause("ac","M_Antirusher_2.5.amxx") 
    unpause("ac","M_Antirusher_2.5b.amxx") 
    unpause("ac","imessage.amxx") 
    unpause("ac","scrollmsg.amxx") 
    client_cmd(0,"stopsound") 
    client_cmd(0,"spk misc/reset.wav")  
    server_cmd("sv_restart 1") 
    remove_task(8188) 
    set_task(2.0,"restart_rundy_play", 0) 
} 

public restart_rundy_0(){ 
    client_cmd(0,"stopsound") 
    client_cmd(0,"spk %s",misc[resety-1]) 
    resety-- 
    if(resety==0){ 
        noze=0 
        set_task(1.0,"restart_rundy", 0) 
    } 
    else set_task(1.2,"restart_rundy_0", 0) 
} 

public plugin_precache() 
{ 
    precache_sound("misc/play_ejo.wav") 
    precache_sound("misc/reset.wav") 
    precache_sound(misc[0]) 
    precache_sound(misc[1]) 
    precache_sound(misc[2]) 

    return PLUGIN_CONTINUE 
}

  • +
  • -
  • 0

#2 baku

    [M]anchester[U]nited

  • Przyjaciel

Reputacja: 455
Wszechobecny

  • Postów:1 054
  • Steam:steam
  • Imię:Rafał
  • Lokalizacja:Polska
Offline

Napisano 29.10.2009 19:22

#include <amxmodx>             // AMX Mod X
#include <amxmisc>

new czas = 60
new resety=3
new noze=0
new restart_title[1][] = { "La Resistance" }

new misc[3][]={"misc/one.wav","misc/two.wav","misc/three.wav"}

new bylo_juz=0

public plugin_init()
{
    register_plugin("ROund STart REstart","1.9","Miczu & Ox!d3") // Mi też się coś należy ;D
   
    register_event("HLTV","Event_StartRound","a","1=0","2=0")

    return PLUGIN_CONTINUE
}

public test_it(){
    new players[32], num, num2
    get_players(players,num,"e","TERRORIST")
    get_players(players,num2,"e","CT")
    if(num2<1 || num<1) return 0
    return 1
}

public client_disconnect(id){
    set_task(0.3,"disconnect",0)
}

public disconnect(){
    if(test_it()==0 && noze==0) bylo_juz=0
}

public Event_StartRound(){
    if(test_it()==0 && noze==0) bylo_juz=0
    set_task(0.2,"restart_odlicz", 0)
    set_task(6.0,"restart_odlicz", 0)
}

public client_PreThink ( id )
{
    if(noze) client_cmd(id,"weapon_knife")
}

public restart_odlicz(){
       
    if(test_it() && noze==0 && bylo_juz==0){
        noze=1
        bylo_juz=1
        czas=60
        resety=3
        pause("ac","Antirusher.amxx")
        pause("ac","M_Antirusher.amxx")
        pause("ac","M_Antirusher_2.4.amxx")
        pause("ac","M_Antirusher_2.5.amxx")
        pause("ac","M_Antirusher_2.5b.amxx")
        pause("ac","imessage.amxx")
        pause("ac","scrollmsg.amxx")
        set_task(3.0,"muza_on", 0)
        set_task(1.0,"wyswietl_res",8188,"",0,"b")
    }
}

public muza_on(){
    client_cmd(0,"stopsound")
    client_cmd(0,"spk misc/play_ejo.mp3")
}

public wyswietl_res(){

    new jac1=random_num(0,255)
    new jac2=random_num(0,255)
    new jac3=random_num(0,255)   

    set_hudmessage(jac1, jac2, jac3, 0.65, 0.75, 2, 0.02, 1.0, 0.01, 0.1, 10)
    show_hudmessage(0,"==================^n    *%s *^n  RESTART ZA: %i sec^n==================", restart_title, czas)
    czas--
    if(czas==3){
        set_task(0.7,"restart_rundy_0", 0)
    }
}

public restart_rundy_play(){
    set_hudmessage(10, 255, 40, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 4)
    show_hudmessage(0,"===================^n* LIVE LA RESISTANCE *^n===================")
}

public restart_rundy(){
    unpause("ac","Antirusher.amxx")
    unpause("ac","M_Antirusher.amxx")
    unpause("ac","M_Antirusher_2.4.amxx")
    unpause("ac","M_Antirusher_2.5.amxx")
    unpause("ac","M_Antirusher_2.5b.amxx")
    unpause("ac","imessage.amxx")
    unpause("ac","scrollmsg.amxx")
    client_cmd(0,"stopsound")
    client_cmd(0,"spk misc/reset.wav") 
    server_cmd("sv_restart 1")
    remove_task(8188)
    set_task(2.0,"restart_rundy_play", 0)
}

public restart_rundy_0(){
    client_cmd(0,"stopsound")
    client_cmd(0,"spk %s",misc[resety-1])
    resety--
    if(resety==0){
        noze=0
        set_task(1.0,"restart_rundy", 0)
    }
    else set_task(1.2,"restart_rundy_0", 0)
}

public plugin_precache()
{
    precache_sound("misc/play_ejo.mp3")
    precache_sound("misc/reset.wav")
    precache_sound(misc[0])
    precache_sound(misc[1])
    precache_sound(misc[2])

    return PLUGIN_CONTINUE
}

Wystarczy raczej pozamieniać .wav na .mp3 ;>
  • +
  • -
  • 0

#3 Ortega

    mów mi Orti

  • Power User

Reputacja: 363
Wszechpomocny

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

Napisano 29.10.2009 19:27

Wyszedłem z założenia ,że chcesz mieć dźwięk play_ejo.wav> mp3 , więc:

#include <amxmodx>             // AMX Mod X
#include <amxmisc>

new czas = 60
new resety=3
new noze=0
new restart_title[1][] = { "La Resistance" }

new misc[3][]={"misc/one.wav","misc/two.wav","misc/three.wav"}

new bylo_juz=0

public plugin_init()
{
    register_plugin("ROund STart REstart","1.9","Miczu & Ox!d3") // Mi też się coś należy ;D
   
    register_event("HLTV","Event_StartRound","a","1=0","2=0")

    return PLUGIN_CONTINUE
}

public test_it(){
    new players[32], num, num2
    get_players(players,num,"e","TERRORIST")
    get_players(players,num2,"e","CT")
    if(num2<1 || num<1) return 0
    return 1
}

public client_disconnect(id){
    set_task(0.3,"disconnect",0)
}

public disconnect(){
    if(test_it()==0 && noze==0) bylo_juz=0
}

public Event_StartRound(){
    if(test_it()==0 && noze==0) bylo_juz=0
    set_task(0.2,"restart_odlicz", 0)
    set_task(6.0,"restart_odlicz", 0)
}

public client_PreThink ( id )
{
    if(noze) client_cmd(id,"weapon_knife")
}

public restart_odlicz(){
       
    if(test_it() && noze==0 && bylo_juz==0){
        noze=1
        bylo_juz=1
        czas=60
        resety=3
        pause("ac","Antirusher.amxx")
        pause("ac","M_Antirusher.amxx")
        pause("ac","M_Antirusher_2.4.amxx")
        pause("ac","M_Antirusher_2.5.amxx")
        pause("ac","M_Antirusher_2.5b.amxx")
        pause("ac","imessage.amxx")
        pause("ac","scrollmsg.amxx")
        set_task(3.0,"muza_on", 0)
        set_task(1.0,"wyswietl_res",8188,"",0,"b")
    }
}

public muza_on(){
    client_cmd(0,"stopsound")
    client_cmd(0,"mp3 play misc/play_ejo.mp3")
}

public wyswietl_res(){

    new jac1=random_num(0,255)
    new jac2=random_num(0,255)
    new jac3=random_num(0,255)   

    set_hudmessage(jac1, jac2, jac3, 0.65, 0.75, 2, 0.02, 1.0, 0.01, 0.1, 10)
    show_hudmessage(0,"==================^n    *%s *^n  RESTART ZA: %i sec^n==================", restart_title, czas)
    czas--
    if(czas==3){
        set_task(0.7,"restart_rundy_0", 0)
    }
}

public restart_rundy_play(){
    set_hudmessage(10, 255, 40, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 4)
    show_hudmessage(0,"===================^n* LIVE LA RESISTANCE *^n===================")
}

public restart_rundy(){
    unpause("ac","Antirusher.amxx")
    unpause("ac","M_Antirusher.amxx")
    unpause("ac","M_Antirusher_2.4.amxx")
    unpause("ac","M_Antirusher_2.5.amxx")
    unpause("ac","M_Antirusher_2.5b.amxx")
    unpause("ac","imessage.amxx")
    unpause("ac","scrollmsg.amxx")
    client_cmd(0,"stopsound")
    client_cmd(0,"spk misc/reset.wav") 
    server_cmd("sv_restart 1")
    remove_task(8188)
    set_task(2.0,"restart_rundy_play", 0)
}

public restart_rundy_0(){
    client_cmd(0,"stopsound")
    client_cmd(0,"spk %s",misc[resety-1])
    resety--
    if(resety==0){
        noze=0
        set_task(1.0,"restart_rundy", 0)
    }
    else set_task(1.2,"restart_rundy_0", 0)
}

public plugin_precache()
{
    precache_sound("misc/play_ejo.mp3")
    precache_sound("misc/reset.wav")
    precache_sound(misc[0])
    precache_sound(misc[1])
    precache_sound(misc[2])

    return PLUGIN_CONTINUE
}

Jak pomyliłem coś piszcie, wciąż się uczę ;>
  • +
  • -
  • 0

#4 Clark

    Życzliwy

  • Autor tematu
  • Użytkownik

Reputacja: 0
Nowy

  • Postów:28
Offline

Napisano 29.10.2009 20:10

Nie dizała mi muzyczka ;/ Podobno robi się coś jeszcze z tym Spk
  • +
  • -
  • 0

#5 Vertricus

    Godlike

  • Przyjaciel

Reputacja: 426
Wszechobecny

  • Postów:1 549
  • Lokalizacja:.
Offline

Napisano 29.10.2009 20:11

No i źle panowowie :)
W przypadku mp3 play należy nie zapomnieć o sound/(lub sounds/ nie pamiętam dokładnie :P)
  • +
  • -
  • 0

#6 baku

    [M]anchester[U]nited

  • Przyjaciel

Reputacja: 455
Wszechobecny

  • Postów:1 054
  • Steam:steam
  • Imię:Rafał
  • Lokalizacja:Polska
Offline

Napisano 29.10.2009 20:16

public play_any_sound(sound[])
{
   new is_mpeg = ( containi(sound, ".mp") != -1 )
   if ( is_mpeg )
      client_cmd(0, "mp3 play ^"sound/misc/%s^"", sound)
   else
      client_cmd(0, "spk ^"%s^"", sound)

Zastosuj ;D
  • +
  • -
  • 0

#7 Vertricus

    Godlike

  • Przyjaciel

Reputacja: 426
Wszechobecny

  • Postów:1 549
  • Lokalizacja:.
Offline

Napisano 29.10.2009 20:18

@up jednej klamry ci brakuje <3 ;>
Look:
#include <amxmodx>             // AMX Mod X 
#include <amxmisc> 

new czas = 60 
new resety=3 
new noze=0 
new restart_title[1][] = { "La Resistance" } 

new misc[3][]={"misc/one.wav","misc/two.wav","misc/three.wav"} 

new bylo_juz=0 

public plugin_init() 
{ 
    register_plugin("ROund STart REstart","1.9","Miczu & Ox!d3") // Mi też się coś należy ;D 
    
    register_event("HLTV","Event_StartRound","a","1=0","2=0") 

    return PLUGIN_CONTINUE 
} 

public test_it(){ 
    new players[32], num, num2 
    get_players(players,num,"e","TERRORIST") 
    get_players(players,num2,"e","CT") 
    if(num2<1 || num<1) return 0 
    return 1 
} 

public client_disconnect(id){ 
    set_task(0.3,"disconnect",0) 
} 

public disconnect(){ 
    if(test_it()==0 && noze==0) bylo_juz=0 
} 

public Event_StartRound(){ 
    if(test_it()==0 && noze==0) bylo_juz=0 
    set_task(0.2,"restart_odlicz", 0) 
    set_task(6.0,"restart_odlicz", 0) 
} 

public client_PreThink ( id ) 
{ 
    if(noze) client_cmd(id,"weapon_knife") 
} 

public restart_odlicz(){ 
        
    if(test_it() && noze==0 && bylo_juz==0){ 
        noze=1 
        bylo_juz=1 
        czas=60 
        resety=3 
        pause("ac","Antirusher.amxx") 
        pause("ac","M_Antirusher.amxx") 
        pause("ac","M_Antirusher_2.4.amxx") 
        pause("ac","M_Antirusher_2.5.amxx") 
        pause("ac","M_Antirusher_2.5b.amxx") 
        pause("ac","imessage.amxx") 
        pause("ac","scrollmsg.amxx") 
        set_task(3.0,"muza_on", 0) 
        set_task(1.0,"wyswietl_res",8188,"",0,"b") 
    } 
} 

public muza_on(){ 
    client_cmd(0,"stopsound") 
    client_cmd(0,"mp3 play sound/misc/play_ejo.mp3") 
} 

public wyswietl_res(){ 

    new jac1=random_num(0,255) 
    new jac2=random_num(0,255) 
    new jac3=random_num(0,255)    

    set_hudmessage(jac1, jac2, jac3, 0.65, 0.75, 2, 0.02, 1.0, 0.01, 0.1, 10) 
    show_hudmessage(0,"==================^n    *%s *^n  RESTART ZA: %i sec^n==================", restart_title, czas) 
    czas-- 
    if(czas==3){ 
        set_task(0.7,"restart_rundy_0", 0) 
    } 
} 

public restart_rundy_play(){ 
    set_hudmessage(10, 255, 40, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 4) 
    show_hudmessage(0,"===================^n* LIVE LA RESISTANCE *^n===================") 
} 

public restart_rundy(){ 
    unpause("ac","Antirusher.amxx") 
    unpause("ac","M_Antirusher.amxx") 
    unpause("ac","M_Antirusher_2.4.amxx") 
    unpause("ac","M_Antirusher_2.5.amxx") 
    unpause("ac","M_Antirusher_2.5b.amxx") 
    unpause("ac","imessage.amxx") 
    unpause("ac","scrollmsg.amxx") 
    client_cmd(0,"stopsound") 
    client_cmd(0,"spk misc/reset.wav")  
    server_cmd("sv_restart 1") 
    remove_task(8188) 
    set_task(2.0,"restart_rundy_play", 0) 
} 

public restart_rundy_0(){ 
    client_cmd(0,"stopsound") 
    client_cmd(0,"spk %s",misc[resety-1]) 
    resety-- 
    if(resety==0){ 
        noze=0 
        set_task(1.0,"restart_rundy", 0) 
    } 
    else set_task(1.2,"restart_rundy_0", 0) 
} 

public plugin_precache() 
{ 
    precache_sound("misc/play_ejo.mp3") 
    precache_sound("misc/reset.wav") 
    precache_sound(misc[0]) 
    precache_sound(misc[1]) 
    precache_sound(misc[2]) 

    return PLUGIN_CONTINUE 
}

  • +
  • -
  • 0

#8 Clark

    Życzliwy

  • Autor tematu
  • Użytkownik

Reputacja: 0
Nowy

  • Postów:28
Offline

Napisano 30.10.2009 17:56

Dziekuje Działa ;) Pozdr Mozna zamknąć :)
  • +
  • -
  • 0





Również z jednym lub większą ilością słów kluczowych: Modyfikacja

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

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