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

CSGO loading screen music problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
panparapet
Junior Member
Join Date: Jul 2022
Old 12-12-2022 , 07:10   CSGO loading screen music problem
Reply With Quote #1

Hi i wrote this plugin and it work but it has one preblem i cant solve and it is that .mp3 files are downloaded as the last ones and when my plugin tries to play this file CSGO finds out that it is not existing and it wont be able to play it only solution after this is to restart csgo. I think that solution maybe is to somehow download sound before plugin tries to play it but i cant manage to do it. If someone can help me here is the file.
Attached Files
File Type: sp Get Plugin or Get Source (ldn_music.sp - 43 views - 1,004 Bytes)
panparapet is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 12-12-2022 , 19:05   Re: CSGO loading screen music problem
Reply With Quote #2

Set
- AddFileToDownloadsTable() and FakePrecacheSound() into OnConfigsExecuted(). You only need do this once when map start.

- Play sound much later when client connect.
For example try play sound on OnClientPostAdminCheck()

*edit
Sometimes *.wav files work better than *.mp3 ones
__________________
Do not Private Message @me

Last edited by Bacardi; 12-12-2022 at 19:07.
Bacardi is offline
panparapet
Junior Member
Join Date: Jul 2022
Old 12-13-2022 , 04:54   Re: CSGO loading screen music problem
Reply With Quote #3

Quote:
Originally Posted by Bacardi View Post
Set
- AddFileToDownloadsTable() and FakePrecacheSound() into OnConfigsExecuted(). You only need do this once when map start.

- Play sound much later when client connect.
For example try play sound on OnClientPostAdminCheck()

*edit
Sometimes *.wav files work better than *.mp3 ones

Hi thank you for replying.

The solution you are proposing is working but it makes plugin play music after player downloaded all assets from server and i am trying to play it when player is downloading them this is why i was trying to download sound file before anything else is being downloaded and because of that i need a way of downloading my music file as the first file not just playing it after everything has been downloaded
panparapet is offline
azalty
AlliedModders Donor
Join Date: Feb 2020
Location: France
Old 12-17-2022 , 22:10   Re: CSGO loading screen music problem
Reply With Quote #4

Quote:
Originally Posted by panparapet View Post
i am trying to play it when player is downloading them this is why i was trying to download sound file before anything else is being downloaded and because of that i need a way of downloading my music file as the first file not just playing it after everything has been downloaded
I think you're trying to do something like gmod loading screens but I'm afraid you can't do that on cs:go or any other source game.
__________________
GitHub | Discord: @azalty | Steam
azalty 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 12:32.


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