Raised This Month: $ Target: $400
 0% 

can't play sound! client_cmd(0,"spk misc/humiliation");


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
skype321
Member
Join Date: Mar 2014
Old 03-25-2014 , 02:08   can't play sound! client_cmd(0,"spk misc/humiliation");
Reply With Quote #1

Hello,In this script i can't hear any sounds this plugin pre-caches the sounds but can't play it using
PHP Code:
client_cmd(0,"spk misc/humiliation"); 
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>

#define PLUGIN "Knife Double Frags"
#define VERSION "0.3"
#define AUTHOR "Rul4"

new 
toggle,getmoney,sounds,frags;

new 
pun_list[][] =
{
    
"%s has sliced %s^nand stole %s bucks!!!",
    
"%s has given %s a taste of his cold steel!!!^n(he took %s from him)",
    
"%s rules! %s bows to his mighty skills ^nand surrenders %s from his purse."
};

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
register_event("DeathMsg","hook_death","a");
    
toggle register_cvar("kdf_enabled","1");
    
sounds register_cvar("kdf_sounds","1");
    
frags register_cvar("kdf_frags","1");
    
getmoney register_cvar("kdf_stealmoney","1");
    
}

public 
plugin_precache()
{
    
precache_sound("misc/humiliation.wav");
}

public 
hook_death()
{
    if(
get_pcvar_num(toggle) != 1)
        return 
PLUGIN_HANDLED;
    new 
amount 0;
    new 
killer read_data(1);
    new 
victim read_data(2);
    new 
kname[32]; get_user_name(killer,kname,31);
    new 
vname[32]; get_user_name(victim,vname,31);
    new 
weapon[24];
    new 
namount[32];
    
read_data(4,weapon,23);
    
    if(
weapon[0] == 'k' && get_user_team(killer) != get_user_team(victim))
    {
        
inc_frag(killer);
        if(
get_pcvar_num(getmoney) == 1)
        {
            
amount cs_get_user_money(victim)*random(5)/4;
            
stealmoney(victimkilleramount);
        }
        
num_to_str(amountnamount32);
        
        
set_hudmessage(255127420.5, -1.006.07.0);
        
show_hudmessage(0,pun_list[random(sizeof pun_list)],kname,vname,namount);
        if(
bsounds(sounds)) client_cmd(0,"spk misc/humiliation");
    }

    return 
PLUGIN_HANDLED;
}

inc_frag(index)
{
    if(!
is_user_connected(index)) return;    
    
set_user_frags(index,get_user_frags(index)+get_pcvar_num(frags));
}

stealmoney(victimkilleramount)
{
    if(!
is_user_connected(victim) || !is_user_connected(killer)) return;
    
cs_set_user_money(killer,cs_get_user_money(killer)+amount);
    
cs_set_user_money(victim,cs_get_user_money(victim)-amount);
}

boolbsounds(pcvar)
{
    if(
get_pcvar_num(pcvar) == 1)
        return 
true;
    return 
false;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang11274\\ f0\\ fs16 \n\\ par }
*/ 

Last edited by skype321; 03-25-2014 at 02:08.
skype321 is offline
 


Thread Tools
Display Modes

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 05:58.


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