Raised This Month: $ Target: $400
 0% 

Extra Precache Function


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 12-27-2009 , 07:24   Extra Precache Function
Reply With Quote #1

In this plugin here:

http://forums.alliedmods.net/showthread.php?p=34730

There is this Precache Function:

PHP Code:
    if (file_exists("sound/fireworks/rocket1.wav")) {
        
precache_sound("fireworks/rocket1.wav")
        
has_rocket 1
    
} else {
        
precache_sound("weapons/rocket1.wav")
        
has_rocket 0
    
}

    if (
file_exists("sound/fireworks/weapondrop1.wav")) {
        
precache_sound("fireworks/weapondrop1.wav")
        
has_drop 1
    
} else {
        
precache_sound("items/weapondrop1.wav")
        
has_drop 0
    

So, the sounds are the default files, but I can also use the new ones in the fireworks folder am I right?
Can I remove the special sound files? And how would the code look like then?
KadiR is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-27-2009 , 15:35   Re: Extra Precache Function
Reply With Quote #2

Just don't add the sound file on the server ftp, default sound will be used then.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 12-27-2009 , 15:42   Re: Extra Precache Function
Reply With Quote #3

Quote:
Originally Posted by ConnorMcLeod View Post
Just don't add the sound file on the server ftp, default sound will be used then.
Ok, but I wouldn't become any errors, would I? Cause there are already default files how I said.
KadiR is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-27-2009 , 16:11   Re: Extra Precache Function
Reply With Quote #4

No it would not.
__________________
Arkshine 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 04:05.


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