←  Problemy

AMXX.pl: Support AMX Mod X i SourceMod

»

Malutki Problemik

Zablokowany

  • +
  • -
Misiaczek ;c - zdjęcie Misiaczek ;c 19.12.2008

Witam, pobrałem sobie bcd_hudtimer 0.2 i postanowiłem go lekko za edytować lecz 1 rzecz z edycji mi nie działa :/ a mianowicie że jak bomba wybuchnie lub skończy się runda przed wybuchem bomby to muzyka się nie pauzuje :/

Tutaj SMA :)
#include <amxmodx>
#include <amxmisc>
#include <csx>

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

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);
	client_cmd(0,"spk stop")
}
 
public bomb_planted()
{
	client_cmd(0,"spk pzb/pzb_planted.wav")
	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;
	}
	client_cmd(0,"spk stop")
}
 
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);
		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( "pzb/pzb_planted.wav")
} 
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{ rtf1 ansi deff0{ fonttbl{ f0 fnil Tahoma;}}n viewkind4 uc1 pard lang1045 f0 fs16 n par }
*/
Odpowiedz

  • +
  • -
mgr inż. Pavulon - zdjęcie mgr inż. Pavulon 19.12.2008

zamiast:

client_cmd(0,"spk stop")

daj:
client_cmd(0,"stopsound; mp3 stop")
Odpowiedz
Zablokowany