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

[Problem]Muzyka przed wybuchem bomby


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

#1 Misiaczek ;c

    /dev/null

  • Moderator

Reputacja: 1 678
Godlike

  • Postów:2 496
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Halemba
Offline

Napisano 28.08.2008 22:17

Witam
mam problem z pluginem który puszcza muze przed wybuchem bomby
zmieniłem w nim czas z 12 sek na 30 oraz plik który ma byc odtwarzany i nie działa :/
tutaj przerobione sma :/

#include <amxmodx>
#include <csx>

#define PLUGIN "Bomb Countdown HUD Timer"
#define VERSION "0.2"
#define AUTHOR "SAMURAI"

#define muzyczka "misc/wybuch.mp3"
#define czas 30


new g_c4timer, pointnum;
new bool:b_planted = false;

new g_msgsync;

public plugin_init()
{
register_plugin(PLUGIN,VERSION,AUTHOR);

pointnum = get_cvar_pointer("mp_c4timer");

register_logevent("newRound", 2, "1=Round_Start");
register_logevent("endRound", 2, "1=Round_End");
register_logevent("endRound", 2, "1&Restart_Round_");

g_msgsync = CreateHudSyncObj();
}

public newRound()
{
g_c4timer = -1;
remove_task(652450);
b_planted = false;
}

public endRound()
{
g_c4timer = -1;
remove_task(652450);
}

public bomb_planted()
{
b_planted = true;
g_c4timer = get_pcvar_num(pointnum);
dispTime()
set_task(1.0, "dispTime", 652450, "", 0, "b");
}

public bomb_defused()
{
if(b_planted)
{
remove_task(652450);
b_planted = false;
}

}

public bomb_explode()
{
if(b_planted)
{
remove_task(652450);
b_planted = false;
}

}

public dispTime()
{
if(!b_planted)
{
remove_task(652450);
return;
}


if(g_c4timer >= 0)
{
if(g_c4timer > 13) {
set_hudmessage(0, 150, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
}
else if(g_c4timer > 7) {
set_hudmessage(150, 150, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
if(g_c4timer == czas) {
client_cmd(0, "spk %s", muzyczka)
}
}
else {
set_hudmessage(150, 0, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
}

ShowSyncHudMsg(0, g_msgsync, "Bomba wybuchnie za: %d", g_c4timer);
--g_c4timer;
}

}

public plugin_precache()
{
precache_sound(wybuch.mp3)

return PLUGIN_CONTINUE
}

czyste sma

#include <amxmodx>
#include <csx>

#define PLUGIN "Bomb Countdown HUD Timer"
#define VERSION "0.2"
#define AUTHOR "SAMURAI"

//
// KONFIGURACJA TUTAJ
//
#define muzyczka "sound/misc/bomba.wav"
#define czas 10
//

//

new g_c4timer, pointnum;
new bool:b_planted = false;

new g_msgsync;

public plugin_init()
{
register_plugin(PLUGIN,VERSION,AUTHOR);

pointnum = get_cvar_pointer("mp_c4timer");

register_logevent("newRound", 2, "1=Round_Start");
register_logevent("endRound", 2, "1=Round_End");
register_logevent("endRound", 2, "1&Restart_Round_");

g_msgsync = CreateHudSyncObj();
}

public newRound()
{
g_c4timer = -1;
remove_task(652450);
b_planted = false;
}

public endRound()
{
g_c4timer = -1;
remove_task(652450);
}

public bomb_planted()
{
b_planted = true;
g_c4timer = get_pcvar_num(pointnum);
dispTime()
set_task(1.0, "dispTime", 652450, "", 0, "b");
}

public bomb_defused()
{
if(b_planted)
{
remove_task(652450);
b_planted = false;
}

}

public bomb_explode()
{
if(b_planted)
{
remove_task(652450);
b_planted = false;
}

}

public dispTime()
{
if(!b_planted)
{
remove_task(652450);
return;
}


if(g_c4timer >= 0)
{
if(g_c4timer > 13) {
set_hudmessage(0, 150, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
}
else if(g_c4timer > 7) {
set_hudmessage(150, 150, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
if(g_c4timer == czas) {
client_cmd(0, "spk %s", muzyczka)
}
}
else {
set_hudmessage(150, 0, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
}

ShowSyncHudMsg(0, g_msgsync, "C4: %d", g_c4timer);

--g_c4timer;
}

}

public plugin_precache()
{
precache_sound(bomba.wav)

return PLUGIN_CONTINUE
}


Przerobi mi też ktoś plik ktory dałem w załączniku na .wav?? bo jak ja przerabiam to ma 5 MB :/

Załączone pliki

  • Załączony plik  wybuch.rar   470,72 KB  123 Ilość pobrań

  • +
  • -
  • 0

#2 choyrack

    Wszechpomocny

  • Użytkownik

Reputacja: 64
Pomocny

  • Postów:369
  • GG:
  • Lokalizacja:Wrocław
Offline

Napisano 28.08.2008 23:35

MisieQ, Tu masz przekonwertowane na wav http://cs-sma.pl/dow...ne/muzaamxx.rar
Dwie jakości. Jeden zajmuje 1,25MB, a drugi: 644KB

PS. Nie wiem dlaczego Ci to mp3 nie odtwarza, ale może masz ustawione w CSie mp3_volume 0 czy jak to tam szlo :-)
Wymień na wav i musi być dobrze.
  • +
  • -
  • 0

#3 Misiaczek ;c

    /dev/null

  • Autor tematu
  • Moderator

Reputacja: 1 678
Godlike

  • Postów:2 496
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Halemba
Offline

Napisano 29.08.2008 08:29

choyrack, dzięki za muze :)

i sprawdzi to ktoś kto się zna na pluginach amx??
bo błąd wywala w tej linijce kodu:
public plugin_precache()
{
precache_sound(wybuch.mp3)

return PLUGIN_CONTINUE
}

  • +
  • -
  • 0

#4 choyrack

    Wszechpomocny

  • Użytkownik

Reputacja: 64
Pomocny

  • Postów:369
  • GG:
  • Lokalizacja:Wrocław
Offline

Napisano 29.08.2008 12:34

MisieQ, Wrzuć któryś z tych dźwięków, który ci podałem do katalogu: cstrike/sound/misc

I w tym pluginie zamień tylko:

#define muzyczka "sound/misc/bomba.wav"

tak żeby na końcu była twoja nazwa pliku

precache_sound(bomba.wav)

tak żeby była twoja nazwa pliku

I nie możesz wrzucać muzyki do innego katalogu niż: sound/misc
  • +
  • -
  • 0

#5 Misiaczek ;c

    /dev/null

  • Autor tematu
  • Moderator

Reputacja: 1 678
Godlike

  • Postów:2 496
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Halemba
Offline

Napisano 29.08.2008 19:24

MisieQ, Wrzuć któryś z tych dźwięków, który ci podałem do katalogu: cstrike/sound/misc

I w tym pluginie zamień tylko:

#define muzyczka "sound/misc/bomba.wav"

tak żeby na końcu była twoja nazwa pliku

precache_sound(bomba.wav)

tak żeby była twoja nazwa pliku

I nie możesz wrzucać muzyki do innego katalogu niż: sound/misc


no i jest problem kompiluje to na amxmodx.co

/* 
Bomb Countdown HUD Timer v0.2 by SAMURAI 

* Plugin Details 
With this plugin enabled, you can see an colored Hud Message with the c4 time left, until explode 
Remeber : if until explode remains less than 8 seconds, hudmessage color will be red, if > 7 will be yellow and > 13 will be green. 

* Required Modules: 
- CSX 

* Credits: 
- Emp` for various indicates 
- Alka for full tests 

* Changelog 
- Fixed Events problems 
- Pcvars 
- Fixed any bug on plugin 

*/ 


#include <amxmodx> 
#include <csx> 

#define PLUGIN "Bomb Countdown HUD Timer" 
#define VERSION "0.2" 
#define AUTHOR "SAMURAI" 

// 
// KONFIGURACJA TUTAJ 
// 
#define muzyczka "sound/misc/wybuch.wav"
#define czas 30
// 

// 

new g_c4timer, pointnum; 
new bool:b_planted = false; 

new g_msgsync; 

public plugin_init() 
{ 
register_plugin(PLUGIN,VERSION,AUTHOR); 

pointnum = get_cvar_pointer("mp_c4timer"); 

register_logevent("newRound", 2, "1=Round_Start"); 
register_logevent("endRound", 2, "1=Round_End"); 
register_logevent("endRound", 2, "1&Restart_Round_"); 

g_msgsync = CreateHudSyncObj(); 
} 

public newRound() 
{ 
g_c4timer = -1; 
remove_task(652450); 
b_planted = false; 
} 

public endRound() 
{ 
g_c4timer = -1; 
remove_task(652450); 
} 

public bomb_planted() 
{ 
b_planted = true; 
g_c4timer = get_pcvar_num(pointnum); 
dispTime() 
set_task(1.0, "dispTime", 652450, "", 0, "b"); 
} 

public bomb_defused() 
{ 
if(b_planted) 
{ 
remove_task(652450); 
b_planted = false; 
} 

} 

public bomb_explode() 
{ 
if(b_planted) 
{ 
remove_task(652450); 
b_planted = false; 
} 

} 

public dispTime() 
{ 
if(!b_planted) 
{ 
remove_task(652450); 
return; 
} 


if(g_c4timer >= 0) 
{ 
if(g_c4timer > 13) { 
set_hudmessage(0, 150, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1); 
} 
else if(g_c4timer > 7) { 
set_hudmessage(150, 150, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1); 
if(g_c4timer == czas) { 
client_cmd(0, "spk %s", muzyczka) 
} 
} 
else { 
set_hudmessage(150, 0, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1); 
} 

ShowSyncHudMsg(0, g_msgsync, "Bomba Wybuchnie Za %d", g_c4timer);

--g_c4timer; 
} 

} 

public plugin_precache() 
{ 
precache_sound(wybuch.wav)

return PLUGIN_CONTINUE 
}

i wywala to :D

Your plugin failed to compile! Read the errors below:

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright © 1997-2006 ITB CompuPhase, AMX Mod X Team

/home/groups/amxmodx/tmp3/textQ961R5.sma(131) : error 017: undefined symbol "wybuch"

1 Error.
Could not locate output file /home/groups/amxmodx/public_html/websc3/textQ961R5.amx (compile failed).


  • +
  • -
  • 0

#6 choyrack

    Wszechpomocny

  • Użytkownik

Reputacja: 64
Pomocny

  • Postów:369
  • GG:
  • Lokalizacja:Wrocław
Offline

Napisano 29.08.2008 19:42

/*

Bomb Countdown HUD Timer v0.2 by SAMURAI



* Plugin Details

With this plugin enabled, you can see an colored Hud Message with the c4 time left, until explode

Remeber : if until explode remains less than 8 seconds, hudmessage color will be red, if > 7 will be yellow and > 13 will be green.



* Required Modules:

- CSX



* Credits:

- Emp` for various indicates

- Alka for full tests



* Changelog

- Fixed Events problems

- Pcvars

- Fixed any bug on plugin



*/





#include <amxmodx>

#include <csx>



#define PLUGIN "Bomb Countdown HUD Timer"

#define VERSION "0.2"

#define AUTHOR "SAMURAI"



//

// KONFIGURACJA TUTAJ

//

#define muzyczka "sound/misc/wybuch.wav"

#define czas 30

//



//



new g_c4timer, pointnum;

new bool:b_planted = false;



new g_msgsync;



public plugin_init()

{

register_plugin(PLUGIN,VERSION,AUTHOR);



pointnum = get_cvar_pointer("mp_c4timer");



register_logevent("newRound", 2, "1=Round_Start");

register_logevent("endRound", 2, "1=Round_End");

register_logevent("endRound", 2, "1&Restart_Round_");



g_msgsync = CreateHudSyncObj();

}



public newRound()

{

g_c4timer = -1;

remove_task(652450);

b_planted = false;

}



public endRound()

{

g_c4timer = -1;

remove_task(652450);

}



public bomb_planted()

{

b_planted = true;

g_c4timer = get_pcvar_num(pointnum);

dispTime()

set_task(1.0, "dispTime", 652450, "", 0, "b");

}



public bomb_defused()

{

if(b_planted)

{

remove_task(652450);

b_planted = false;

}



}



public bomb_explode()

{

if(b_planted)

{

remove_task(652450);

b_planted = false;

}



}



public dispTime()

{

if(!b_planted)

{

remove_task(652450);

return;

}





if(g_c4timer >= 0)

{

if(g_c4timer > 13) {

set_hudmessage(0, 150, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);

}

else if(g_c4timer > 7) {

set_hudmessage(150, 150, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);

if(g_c4timer == czas) {

client_cmd(0, "spk %s", muzyczka)

}

}

else {

set_hudmessage(150, 0, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);

}



ShowSyncHudMsg(0, g_msgsync, "Bomba Wybuchnie Za %d", g_c4timer);



--g_c4timer;

}



}



public plugin_precache()

{

precache_sound(muzyczka)



return PLUGIN_CONTINUE

}

  • +
  • -
  • 0

#7 Misiaczek ;c

    /dev/null

  • Autor tematu
  • Moderator

Reputacja: 1 678
Godlike

  • Postów:2 496
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Halemba
Offline

Napisano 29.08.2008 20:27

choyrack, nie wiem albo ten plugin ma ograniczenie albo h** wie co ;/ ale nie działa ;/ nie leci muza :/

@Edit
wkurzyłem się i przeanalizowałem plugin i chyba znalazłem błąd ale nie jestem pewien

czy zamiast tego
if(g_c4timer == czas)

nie powinno być to
if(g_c4timer = czas)
??

[ Dodano: 29-08-2008, 21:46 ]
no to jestem geniuszem ;s chyba naprawiałem plugin :D

#include <amxmodx>
#include <csx>

#define PLUGIN "Muzyka Przed Wybuchem"
#define VERSION "0.2"
#define AUTHOR "SAMURAI"

#define muzyczka "misc/wybuch.wav"
#define czas 30


new g_c4timer, pointnum;
new bool:b_planted = false;

new g_msgsync;

public plugin_init()
{
register_plugin(PLUGIN,VERSION,AUTHOR);

pointnum = get_cvar_pointer("mp_c4timer");

register_logevent("newRound", 2, "1=Round_Start");
register_logevent("endRound", 2, "1=Round_End");
register_logevent("endRound", 2, "1&Restart_Round_");

g_msgsync = CreateHudSyncObj();
}

public newRound()
{
g_c4timer = -1;
remove_task(652450);
b_planted = false;
}

public endRound()
{
g_c4timer = -1;
remove_task(652450);
}

public bomb_planted()
{
b_planted = true;
g_c4timer = get_pcvar_num(pointnum);
dispTime()
set_task(1.0, "dispTime", 652450, "", 0, "b");
}

public bomb_defused()
{
if(b_planted)
{
remove_task(652450);
b_planted = false;
}

}

public bomb_explode()
{
if(b_planted)
{
remove_task(652450);
b_planted = false;
}

}

public dispTime()
{
if(!b_planted)
{
remove_task(652450);
return;
}


if(g_c4timer >= 0)
{
if(g_c4timer > 13) {
set_hudmessage(0, 150, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
}
else if(g_c4timer > 7) {
set_hudmessage(150, 150, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
if(g_c4timer > czas) {
client_cmd(0,"spk misc/wybuch.wav")
}
}
else {
set_hudmessage(150, 0, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
}

ShowSyncHudMsg(0, g_msgsync, "Bomba Wybuchnie Za %d", g_c4timer);
--g_c4timer;
}
}

public plugin_precache()
{
  precache_sound("misc/wybuch.wav")

}
;D
  • +
  • -
  • 0

#8 choyrack

    Wszechpomocny

  • Użytkownik

Reputacja: 64
Pomocny

  • Postów:369
  • GG:
  • Lokalizacja:Wrocław
Offline

Napisano 29.08.2008 21:38

czy zamiast tego
Kod:

if(g_c4timer == czas)


nie powinno być to
Kod:

if(g_c4timer = czas)

operator = to jest przypisanie ze g_c4timer będzie miało wartość zmiennej czas
a operator == to jest porównanie czy są sobie równe :-)
  • +
  • -
  • 0

#9 Misiaczek ;c

    /dev/null

  • Autor tematu
  • Moderator

Reputacja: 1 678
Godlike

  • Postów:2 496
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Halemba
Offline

Napisano 29.08.2008 22:01

czy zamiast tego
Kod:

if(g_c4timer == czas)


nie powinno być to
Kod:

if(g_c4timer = czas)

operator = to jest przypisanie ze g_c4timer będzie miało wartość zmiennej czas
a operator == to jest porównanie czy są sobie równe :-)


dzięks ;d

ruszyłem głowa pomyślałem i wyszło coś takiego

#include <amxmodx>
#include <csx>

#define PLUGIN "Bomb Countdown HUD Timer & Sound"
#define VERSION "0.3"
#define AUTHOR "SAMURAI & MisieQ/Filcora"

#define muzyczka "misc/wybuch.wav"
#define czas 29


new g_c4timer, pointnum;
new bool:b_planted = false;

new g_msgsync;

public plugin_init()
{
register_plugin(PLUGIN,VERSION,AUTHOR);

pointnum = get_cvar_pointer("mp_c4timer");

register_logevent("newRound", 2, "1=Round_Start");
register_logevent("endRound", 2, "1=Round_End");
register_logevent("endRound", 2, "1&Restart_Round_");

g_msgsync = CreateHudSyncObj();
}

public newRound()
{
g_c4timer = -1;
remove_task(652450);
b_planted = false;
}

public endRound()
{
g_c4timer = -1;
remove_task(652450);
}

public bomb_planted()
{
b_planted = true;
g_c4timer = get_pcvar_num(pointnum);
dispTime()
set_task(1.0, "dispTime", 652450, "", 0, "b");
}

public bomb_defused()
{
if(b_planted)
{
remove_task(652450);
b_planted = false;
}

}

public bomb_explode()
{
if(b_planted)
{
remove_task(652450);
b_planted = false;
}

}

public dispTime()
{
if(!b_planted)
{
remove_task(652450);
return;
}


if(g_c4timer >= 0)
{
if(g_c4timer > 13) {
set_hudmessage(0, 150, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
}
else if(g_c4timer > 7) {
set_hudmessage(150, 150, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
if(g_c4timer == czas) {
client_cmd(0,"spk misc/wybuch.wav")
}
}
else {
set_hudmessage(150, 0, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
}

ShowSyncHudMsg(0, g_msgsync, "Bomba Wybuchnie Za %d", g_c4timer);
--g_c4timer;
}
}

public plugin_precache()
{
  precache_sound("misc/wybuch.wav")

}
działa kompilacja a w praktyce zaraz to sprawdze ;d

[ Dodano: 29-08-2008, 23:10 ]
lecz i tak nie działa odliczać czas odlicza ale muza nie leci :/
  • +
  • -
  • 0

#10 choyrack

    Wszechpomocny

  • Użytkownik

Reputacja: 64
Pomocny

  • Postów:369
  • GG:
  • Lokalizacja:Wrocław
Offline

Napisano 30.08.2008 00:02

#include <amxmodx>
#include <csx>

#define PLUGIN "Bomb Countdown HUD Timer & Sound"
#define VERSION "0.3"
#define AUTHOR "SAMURAI & MisieQ/Filcora"

#define muzyczka "sound/misc/wybuch.wav"
#define czas 29


new g_c4timer, pointnum;
new bool:b_planted = false;

new g_msgsync;

public plugin_init()
{
register_plugin(PLUGIN,VERSION,AUTHOR);

pointnum = get_cvar_pointer("mp_c4timer");

register_logevent("newRound", 2, "1=Round_Start");
register_logevent("endRound", 2, "1=Round_End");
register_logevent("endRound", 2, "1&Restart_Round_");

g_msgsync = CreateHudSyncObj();
}

public newRound()
{
g_c4timer = -1;
remove_task(652450);
b_planted = false;
}

public endRound()
{
g_c4timer = -1;
remove_task(652450);
}

public bomb_planted()
{
b_planted = true;
g_c4timer = get_pcvar_num(pointnum);
dispTime()
set_task(1.0, "dispTime", 652450, "", 0, "b");
}

public bomb_defused()
{
if(b_planted)
{
remove_task(652450);
b_planted = false;
}

}

public bomb_explode()
{
if(b_planted)
{
remove_task(652450);
b_planted = false;
}

}

public dispTime()
{
if(!b_planted)
{
remove_task(652450);
return;
}


if(g_c4timer >= 0)
{
if(g_c4timer > 13) {
set_hudmessage(0, 150, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
}
else if(g_c4timer > 7) {
set_hudmessage(150, 150, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
if(g_c4timer == czas) {
client_cmd(0,"spk muzyczka")
}
}
else {
set_hudmessage(150, 0, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
}

ShowSyncHudMsg(0, g_msgsync, "Bomba Wybuchnie Za %d", g_c4timer);
--g_c4timer;
}
}

public plugin_precache()
{
  precache_sound("muzyczka")

}

Jak to Ci nie zadziała to musi coś być skopane bardziej z tym pluginem :-)


Ewnentualnie ta wersja:
#include <amxmodx>
#include <csx>

#define PLUGIN "Bomb Countdown HUD Timer & Sound"
#define VERSION "0.3"
#define AUTHOR "SAMURAI & MisieQ/Filcora"

#define muzyczka "sound/misc/wybuch.wav"
#define czas 29


new g_c4timer, pointnum;
new bool:b_planted = false;

new g_msgsync;

public plugin_init()
{
register_plugin(PLUGIN,VERSION,AUTHOR);

pointnum = get_cvar_pointer("mp_c4timer");

register_logevent("newRound", 2, "1=Round_Start");
register_logevent("endRound", 2, "1=Round_End");
register_logevent("endRound", 2, "1&Restart_Round_");

g_msgsync = CreateHudSyncObj();
}

public newRound()
{
g_c4timer = -1;
remove_task(652450);
b_planted = false;
}

public endRound()
{
g_c4timer = -1;
remove_task(652450);
}

public bomb_planted()
{
b_planted = true;
g_c4timer = get_pcvar_num(pointnum);
dispTime()
set_task(1.0, "dispTime", 652450, "", 0, "b");
}

public bomb_defused()
{
if(b_planted)
{
remove_task(652450);
b_planted = false;
}

}

public bomb_explode()
{
if(b_planted)
{
remove_task(652450);
b_planted = false;
}

}

public dispTime()
{
if(!b_planted)
{
remove_task(652450);
return;
}


if(g_c4timer >= 0)
{
if(g_c4timer > 13) {
set_hudmessage(0, 150, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
}
else if(g_c4timer > 7) {
set_hudmessage(150, 150, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
if(g_c4timer == czas) {
client_cmd(0,"spk muzyczka")
}
}
else {
set_hudmessage(150, 0, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
}

ShowSyncHudMsg(0, g_msgsync, "Bomba Wybuchnie Za %d", g_c4timer);
--g_c4timer;
}
}

public plugin_precache()
{
  precache_sound("misc/wybuch.wav")

}

  • +
  • -
  • 0




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

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