nu merge sa modific sma-ul la coutdown_fix

Discutii legate de instalarea, configurarea si modificarea unui server de Counter-Strike.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
darkemy14
Membru, skill +1
Membru, skill +1
Posts: 269
Joined: 02 Oct 2011, 16:20
Detinator Steam: Nu
Detinator server CS: Da
Has thanked: 82 times
Been thanked: 1 time
Contact:

19 Oct 2011, 14:51

am pluginul coutdown_fix si cand numaratoarea inversa ajunge la 1, vocea de femeie care zice : warning biohazard detected (ceva de genu) se baga peste vocea de barbat cand zice 1 (one) ..... cum fac ca sunetul (timestart) sa porneasca cu o secunda sau 2 dupa ce a zis voca aia 1 (one) ? va rog mult ...

sma:

Code: Select all

/*
Original author/idea: Mr.Apple
*/

#include <amxmodx>

const TASK_LOAD_SOUNDS = 1
const TASK_SOUND = 666 // satana code =]]

#define ID_SOUND (taskid - TASK_SOUND)

static const sound_list[][] =
{
	"zp_sound/timer01.wav",
	"zp_sound/timer02.wav",
	"zp_sound/timer03.wav",
	"zp_sound/timer04.wav",
	"zp_sound/timer05.wav",
	"zp_sound/timer06.wav",
	"zp_sound/timer07.wav",
	"zp_sound/timer08.wav",
	"zp_sound/timer09.wav",
	"zp_sound/timer10.wav"  
}

static const sound_list2[] = "zp_sound/timestart.wav"

new g_count, g_time

public plugin_precache()
{
	for(new i = 0 ; i < sizeof sound_list ; i++)
		precache_sound(sound_list[i])
	precache_sound(sound_list2)
}

public plugin_init() 
{
	register_plugin("Countdown Fix", "1.0", "P.Of.Pw")
	
	register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
}

public event_round_start(id)
{
	remove_task(id+TASK_SOUND)
	
	g_time = 10
	g_count = 9

	set_task(float(TASK_LOAD_SOUNDS), "countdown_sound", id+TASK_SOUND, _, _, "b")
}

public client_disconnect(id)
	remove_task(id+TASK_SOUND)

public countdown_sound(taskid)
{
	static id
	id = ID_SOUND

	client_cmd(id, "spk %s", sound_list[g_count])
	g_count--
	
	set_hudmessage(179, 0, 0, -1.0, 0.28, 2, 0.02, 1.0, 0.01, 0.1, 10)
	show_hudmessage(id, "In %i secunde se v-a raspandi virusul !", g_time) 
	
	--g_time
    
	if(g_time < 1)
	{
		client_cmd(id, "spk %s", sound_list2)
		remove_task(id+TASK_SOUND)
	}
}
RoyalServer
User avatar
darkemy14
Membru, skill +1
Membru, skill +1
Posts: 269
Joined: 02 Oct 2011, 16:20
Detinator Steam: Nu
Detinator server CS: Da
Has thanked: 82 times
Been thanked: 1 time
Contact:

20 Oct 2011, 15:06

nu stie nimeni cum pot face ca "timestart.wav" sa se auda cu 2 secunde mai tarziu dupa ce se termina numaratoarea inversa ?:(
Post Reply

Return to “Probleme la servere dedicate de Counter-Strike”

  • Information
  • Who is online

    Users browsing this forum: Mail.RU [Bot] and 143 guests