Raised This Month: $ Target: $400
 0% 

Play .wav when someonay says a word...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Zenith77
Veteran Member
Join Date: Aug 2005
Old 03-14-2006 , 16:17  
Reply With Quote #7

Quote:
Originally Posted by [ --<-@
Black Rose]would this really work?
Code:
public plugin_precache() { if (file_exists("sound/misc/woohoo.wav"))         precache_sound("misc/woohoo.wav") }
the file_exist is totally unecessary and if it wold be there, there would be an ! in front of it
Putting a '!' in front of the if statement would precache the sound if it DIDN'T exist. Which would then make it truely unecssary.
Why? It prevents the server from crashing if it does not have it. But, you should make it print a warning message if its not precached to let the server know so they can add it.

Just in case somebody wants to argue
Quote:
file_exists - Checks if a file exists (returns 1 on success, 0 on failure).
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
 



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 20:22.


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