Raised This Month: $ Target: $400
 0% 

mp3 play problems


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
pob18
Member
Join Date: Jun 2014
Old 07-01-2014 , 10:37   mp3 play problems
Reply With Quote #1

why the music does not play at te rr time?

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <dhudmessage>
#include <hamsandwich>
#include <fun>

#define PRECACHE_SOUND "server/music.mp3"

new TimerSecondsCvar
new bool:g_knife true

public plugin_init()
{
    
register_event("DeathMsg""on_death""a")
    
register_event"CurWeapon""EventCurWeapon""be""2!29" )
    
    
SecondsCvar register_cvar("auto_rr_time","50.0")

    
Timer get_pcvar_num(SecondsCvar)
    
set_task(1.0"start_rr_timer"___"a"Timer)
}


public 
plugin_precache()
    
precache_sound(PRECACHE_SOUND)


public 
on_death()
{
    new 
victim
    victim 
read_data(2)
    
    if(
g_knife)
        
set_task(1.0"fnRevivePlayer"victim)
}

public 
fnRevivePlayer(id
{
    if(!
is_user_alive(id)) 
        
ExecuteHamB(Ham_CS_RoundRespawnid)    
}

public 
EventCurWeapon(id)
{
    if(
g_knife)
    {
        
engclient_cmd(id"weapon_knife")
        
set_user_gravity(id0.5)
    }
}

public 
start_rr_timer()
{
    
Timer--
    
    
//client_cmd(0, "stopsound")
    
client_cmd(0"spk ^"%s^""PRECACHE_SOUND)
    
    
set_dhudmessage(24000, -1.00.0800.00.01)
    
show_dhudmessage(0"auto restart in·: %d"Timer)

    if(
Timer 1)
    {
        
server_cmd("sv_restartround 1")
        
set_task(3.0"rr_end")
        
set_task(3.0"off_gravity")
        
g_knife false
    
}
}

public 
rr_end()
{
    
set_dhudmessage(random_num(0255), random_num(0255), random_num(0255), -1.00.7826.03.00.11.5false )
    
show_dhudmessage(0"good luck!")
}

public 
off_gravity(id
{
    
client_cmd(0"stopsound")
    new 
players[32], num
    get_players
(playersnum"c")
    for (new 
0;num;i++)
                   
set_user_gravity(players[i], 1.0

pob18 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:07.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode