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

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


Post New Thread Reply   
 
Thread Tools Display Modes
MihaiGamerXD
Member
Join Date: Aug 2018
Old 08-23-2018 , 15:49   Re: The sound is not playing when the game is over!
Reply With Quote #11

Could you help me? Pls?

Last edited by MihaiGamerXD; 08-23-2018 at 15:49.
MihaiGamerXD is offline
MihaiGamerXD
Member
Join Date: Aug 2018
Old 08-23-2018 , 15:51   Re: The sound is not playing when the game is over!
Reply With Quote #12

Could you help me? Pls?

Quote:
Originally Posted by MihaiGamerXD View Post
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)
        }
        }
    }

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

Ops! I was wrong at the codes! I was type "bird_point" and "pig_point" instead "ct_point" and "t_point"!
But still not working?
MihaiGamerXD is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 08-23-2018 , 20:35   Re: The sound is not playing when the game is over!
Reply With Quote #14

You can not be asking for help like a crazy, you have to wait, no one here has time to be helping you all day. People will help you when they can, so wait!

If I get it right, that's what you need.

PHP Code:
#include <amxmodx>

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

public plugin_init()
{
    
register_event("SendAudio""EventTRWin","a""2&%!MRAD_terwin"
    
register_event("SendAudio""EventCTWin","a""2&%!MRAD_ctwin"
}

public 
plugin_precache()
{
    
precache_sound(ct_win)
    
precache_sound(t_win)
}

public 
EventTRWin()
{
    
client_cmd(0,"stopsound")
    
client_cmd(0,"spk %s",t_win)
}  

public 
EventCTWin()
{
    
client_cmd(0,"stopsound")
    
client_cmd(0,"spk %s",ct_win)

iceeedr is offline
Send a message via Skype™ to iceeedr
MihaiGamerXD
Member
Join Date: Aug 2018
Old 08-24-2018 , 01:14   Re: The sound is not playing when the game is over!
Reply With Quote #15

No. I don't mean that, I mean to make team kills!
MihaiGamerXD is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 08-24-2018 , 02:50   Re: The sound is not playing when the game is over!
Reply With Quote #16

You've added [Solved] tag to the thread's name.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
MihaiGamerXD
Member
Join Date: Aug 2018
Old 08-24-2018 , 06:43   Re: The sound is not playing when the game is over!
Reply With Quote #17

So I should do not solved?
MihaiGamerXD is offline
MihaiGamerXD
Member
Join Date: Aug 2018
Old 08-24-2018 , 06:44   Re: The sound is not playing when the game is over!
Reply With Quote #18

Because is not solved yet!
MihaiGamerXD is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 08-24-2018 , 06:49   Re: The sound is not playing when the game is over!
Reply With Quote #19

What's the difference between knowing if the CT killed more than the TR and playing a sound, and checking the winning team and Play the sound? Who killed the most logically will be the team winning the round ??? !! AND AGAIN, LEARN TO WRITE EVERYTHING IN A SINGLE POST.
iceeedr is offline
Send a message via Skype™ to iceeedr
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 08-24-2018 , 06:58   Re: The sound is not playing when the game is over!
Reply With Quote #20

You should explain more about your issue, you're in Scripting Help, people in this section is about to tell you what you should do, don't expect a full code.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
Reply



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 10:28.


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