Raised This Month: $51 Target: $400
 12% 

Solved The sound is not playing when the game is over!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
MihaiGamerXD
Member
Join Date: Aug 2018
Old 08-23-2018 , 10:48   The sound is not playing when the game is over!
Reply With Quote #1

Hello everybody, I have one more problem: The sound is not playing when the game is over! I tried this code:

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

new ct_point 0
new t_point 0

new const ct_win[] = "ct_win/yes!.wav"
new const t_win[] = "t_win/no!.wav"

public plugin_init() {
    
register_event("DeathMsg","onDeath","a")
    
register_event("30","TheEnd","a")
}

public 
onDeath() {
    new 
iKiller read_data(1)
    new 
iVictim read_data(2)
    if (
iKiller && iVictim && iKiller != iVictim) {
        if (
is_user_alive(iKiller)) {
            if (
cs_get_user_team(iKiller) == CS_TEAM_CT) {
                
bird_point += 1
            
}
            if (
cs_get_user_team(iKiller) == CS_TEAM_T) {
                
pig_point += 1
            
}
        }
    }
}

public 
TheEnd() {
    if (
is_user_alive(id)) {
        new 
mapname[32]
    
get_mapname(mapname,31)
    if (
equal(mapname,"redswar_tdm")) {
        if (
bird_point pig_point) {
                
client_cmd(0,"stopsound")
        
client_cmd(0,"spk %s",ct_win)
            }
        else if (
bird_point pig_point) {
                
client_cmd(0,"stopsound")
                
client_cmd(0,"spk %s",t_win)
        }
        }
    }


Last edited by MihaiGamerXD; 08-23-2018 at 14:09.
MihaiGamerXD 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 03:10.


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