Raised This Month: $18 Target: $400
 4% 

[CS:GO] Retakes (v0.3.2, 2016-4-6)


Post New Thread Reply   
 
Thread Tools Display Modes
BoosterGold
Member
Join Date: Nov 2016
Old 02-13-2017 , 17:41   Re: [CS:GO] Retakes (v0.3.2, 2016-4-6)
Reply With Quote #121

Quote:
Originally Posted by rogeraabbccdd View Post
You have to prrcache your sound first.
Sorry, don't know what this means. The file is from CS:GO, not custom, if that has any relevance.

EDIT:

Progress! I added this:

Code:
    PrecacheSound("*player/vo/phoenix/goingtoplantbomba02.wav", true);
    PrecacheSound("*player/vo/phoenix/goingtoplantbombb01.wav", true);
Now, when I play in the server solo, it plays the sounds correctly. Even selects the correct sound depending on the site it chooses.

However, when another player joins the server, the sound is played to neither of us. It also does not give any errors in the console log.

Last edited by BoosterGold; 02-13-2017 at 18:06. Reason: Progress!
BoosterGold is offline
BoosterGold
Member
Join Date: Nov 2016
Old 02-13-2017 , 18:07   Re: [CS:GO] Retakes (v0.3.2, 2016-4-6)
Reply With Quote #122

Quote:
Originally Posted by waylander3 View Post
*player/vo/phoenix/goingtoplantbombb01.wav
Try use "*" before folder-file
Hi Waylander, thank you for this. I did add a * before my file names and it's semi-working as described above.
BoosterGold is offline
Trans_Am_00
Senior Member
Join Date: Jul 2013
Location: 127.0.0.1
Old 03-06-2017 , 22:53   Suggestion
Reply With Quote #123

@splewis

when i type this command /scramble

This message is shown at the chat
Quote:
[Retakes] Trans_am_00 has set the teams to be scrambled next round.
Is it possible that when /scramble is typed, this message is shown instead

Quote:
[Retakes] Admin has set the teams to be scrambled next round.
__________________
-= Trans-Am =-
Quote:
Where pink owns everything
Trans_Am_00 is offline
Gdk
Member
Join Date: Oct 2014
Old 03-07-2017 , 19:08   Re: [CS:GO] Retakes (v0.3.2, 2016-4-6)
Reply With Quote #124

Quote:
Originally Posted by BoosterGold View Post
Sorry, don't know what this means. The file is from CS:GO, not custom, if that has any relevance.

EDIT:

Progress! I added this:

Code:
    PrecacheSound("*player/vo/phoenix/goingtoplantbomba02.wav", true);
    PrecacheSound("*player/vo/phoenix/goingtoplantbombb01.wav", true);
Now, when I play in the server solo, it plays the sounds correctly. Even selects the correct sound depending on the site it chooses.

However, when another player joins the server, the sound is played to neither of us. It also does not give any errors in the console log.
You can just do a client command on every player you want to play the sound to:

ClientCommand(client, playgamesound player/vo/phoenix/goingtoplantbombb01.wav);

Last edited by Gdk; 03-08-2017 at 12:16. Reason: mistake
Gdk is offline
BoosterGold
Member
Join Date: Nov 2016
Old 03-09-2017 , 17:14   Re: [CS:GO] Retakes (v0.3.2, 2016-4-6)
Reply With Quote #125

Quote:
Originally Posted by Gdk View Post
You can just do a client command on every player you want to play the sound to:

ClientCommand(client, playgamesound player/vo/phoenix/goingtoplantbombb01.wav);
Here's the updated, working code:

In OnMapStart:
PHP Code:
    PrecacheSound("player/vo/phoenix/goingtoplantbomba02.wav"true);
    
PrecacheSound("player/vo/phoenix/goingtoplantbombb01.wav"true); 
In Action Event_RoundPostStart:
PHP Code:
    if (!g_EditMode) {
        
GameRules_SetProp("m_iRoundTime"g_hRoundTime.IntValue40true);
        
Retakes_MessageToAll("%t""RetakeSiteMessage"SITESTRING(g_Bombsite), g_NumTg_NumCT);

        
CreateTimer(0.5timer_imgoingtoplantthebomb);
    } 
By itself:
PHP Code:
public Action timer_imgoingtoplantthebomb(Handle timer) {
        if (
g_Bombsite == BombsiteA) {
            
EmitSoundToAll("player/vo/phoenix/goingtoplantbomba02.wav");
        }

        if (
g_Bombsite == BombsiteB) {
            
EmitSoundToAll("player/vo/phoenix/goingtoplantbombb01.wav");
        }

For some reason, putting it inside a timer made the EmitSoundToAll wrapper work. My next task is to change the voice files depending on which character models the map's .kv loads.

Last edited by BoosterGold; 03-09-2017 at 17:15.
BoosterGold is offline
Gdk
Member
Join Date: Oct 2014
Old 03-10-2017 , 14:36   Re: [CS:GO] Retakes (v0.3.2, 2016-4-6)
Reply With Quote #126

Quote:
Originally Posted by BoosterGold View Post
Here's the updated, working code:
.......
That's fine if it's working but what I am saying is if it's an included game sound, you dont need to precache or use any timers using this method
Gdk is offline
BoosterGold
Member
Join Date: Nov 2016
Old 03-10-2017 , 18:50   Re: [CS:GO] Retakes (v0.3.2, 2016-4-6)
Reply With Quote #127

Quote:
Originally Posted by Gdk View Post
That's fine if it's working but what I am saying is if it's an included game sound, you dont need to precache or use any timers using this method
Oh, true. Some people around here seem to think that forcing clients to perform commands is a less 'clean' way of doing stuff, though. It's all up to preference.
BoosterGold is offline
Dency
Junior Member
Join Date: Jul 2015
Old 04-26-2017 , 14:24   Re: [CS:GO] Retakes (v0.3.2, 2016-4-6)
Reply With Quote #128

Not working after today update?!
__________________
Dency is offline
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 04-26-2017 , 14:59   Re: [CS:GO] Retakes (v0.3.2, 2016-4-6)
Reply With Quote #129

Quote:
Originally Posted by Dency View Post
Not working after today update?!
Unrelated to the plugin. Update your sourcemod and metamod. https://forums.alliedmods.net/showthread.php?t=296642
__________________
sneaK is offline
Dency
Junior Member
Join Date: Jul 2015
Old 04-27-2017 , 08:51   Re: [CS:GO] Retakes (v0.3.2, 2016-4-6)
Reply With Quote #130

Quote:
Originally Posted by sneaK View Post
Unrelated to the plugin. Update your sourcemod and metamod. https://forums.alliedmods.net/showthread.php?t=296642
Thanks
__________________

Last edited by Dency; 04-27-2017 at 10:12.
Dency 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 15:50.


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