AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   precache_sound in parts (https://forums.alliedmods.net/showthread.php?t=271404)

mati009988 09-11-2015 16:35

precache_sound in parts
 
Hi,
Can I download sounds in parts?
I have got more than 20 sounds on my server and download time is to long for players.
I would to download 5 songs every connect to server.

Something like...
PHP Code:

public plugin_precache(id){
    if(!
part_1_songs){
        
precache_sound("misc/1.mp3")
        
precache_sound("misc/2.mp3")
        
precache_sound("misc/3.mp3")
        
precache_sound("misc/4.mp3")
        
precache_sound("misc/5.mp3")
    } else if(!
part_2_songs){
        
precache_sound("misc/6.mp3")
        
precache_sound("misc/7.mp3")
        
precache_sound("misc/8.mp3")
        
precache_sound("misc/9.mp3")
        
precache_sound("misc/10.mp3")
    } else if(!
part_x){
        
    }


Maby nvalut or another way to check downloaded?

Please help :)

wickedd 09-11-2015 16:39

Re: precache_sound in parts
 
I suggest setting up fast download.

mati009988 09-11-2015 16:44

Re: precache_sound in parts
 
I`ve got fast download but first connect to server continues more than three minutes. Without songs it`s above one...

wickedd 09-11-2015 16:56

Re: precache_sound in parts
 
Well remove some of the songs because what you want to do is not possible.

mati009988 09-11-2015 16:58

Re: precache_sound in parts
 
I think it`s possible. If cs can check it, why amxx can not? Maby someone have any ideas?

wickedd 09-11-2015 17:06

Re: precache_sound in parts
 
If the player needs a sprite, sound or model to play then he will download it. If he doesn't have it then he can't join the server until he does. So if the player need part 2 of a song then he can't join the server until he download it.

mati009988 09-11-2015 17:13

Re: precache_sound in parts
 
If server have not got any sounds, cs only warn about it in console. Player still can play, he can`t only hear sounds...

wickedd 09-11-2015 17:21

Re: precache_sound in parts
 
That's the server not the player.

Edit: Will the player need the sound to play?

mati009988 09-11-2015 17:33

Re: precache_sound in parts
 
If server haven`t got, then player haven`t got it to... Ok, maby someone else have any ideas?

No, he don`t need it. Its`s only background sound

wickedd 09-11-2015 18:16

Re: precache_sound in parts
 
Ok, but it's still not possible to do what you want.


All times are GMT -4. The time now is 22:14.

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