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

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


Post New Thread Reply   
 
Thread Tools Display Modes
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
MihaiGamerXD
Member
Join Date: Aug 2018
Old 08-23-2018 , 10:49   Re: The sound is not playing when the game is over!
Reply With Quote #2

Can anyone help me pls?

Last edited by MihaiGamerXD; 08-23-2018 at 10:49.
MihaiGamerXD is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 08-23-2018 , 13:41   Re: The sound is not playing when the game is over!
Reply With Quote #3

Did you just bump your thread in less than a minute? You should get a medal for this.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
MihaiGamerXD
Member
Join Date: Aug 2018
Old 08-23-2018 , 14:07   Re: The sound is not playing when the game is over!
Reply With Quote #4

No.
MihaiGamerXD is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-23-2018 , 14:20   Re: The sound is not playing when the game is over!
Reply With Quote #5

Could you explain what event is this?
register_event("30","TheEnd","a")
}
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
MihaiGamerXD
Member
Join Date: Aug 2018
Old 08-23-2018 , 15:00   Re: The sound is not playing when the game is over!
Reply With Quote #6

This is the Intermission Event!
MihaiGamerXD is offline
MihaiGamerXD
Member
Join Date: Aug 2018
Old 08-23-2018 , 15:01   Re: The sound is not playing when the game is over!
Reply With Quote #7

That means Game End Event!
MihaiGamerXD is offline
MihaiGamerXD
Member
Join Date: Aug 2018
Old 08-23-2018 , 15:02   Re: The sound is not playing when the game is over!
Reply With Quote #8

Don't understand? In this event you'll see team score when the game is over, or the time's up!
MihaiGamerXD is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 08-23-2018 , 15:14   Re: The sound is not playing when the game is over!
Reply With Quote #9

Is it difficult to write everything in a single post?
iceeedr is offline
Send a message via Skype™ to iceeedr
MihaiGamerXD
Member
Join Date: Aug 2018
Old 08-23-2018 , 15:35   Re: The sound is not playing when the game is over!
Reply With Quote #10

No. But I FORGOT to write into a single post! I'm Just Sorry!

Last edited by MihaiGamerXD; 08-23-2018 at 15:50.
MihaiGamerXD is offline
Reply


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:16.


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