Raised This Month: $ Target: $400
 0% 

Force to Download


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HuTcH
Member
Join Date: Aug 2005
Location: Denmark
Old 01-06-2006 , 20:35   Force to Download
Reply With Quote #1

Ey.
How do I play a sound on my server so everybody can hear it?
is it:
Code:
public client_cmd (0, play klaxon.wav)

And how do I force a player to downlod the sound?

thank you.
HuTcH is offline
Send a message via MSN to HuTcH
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 01-06-2006 , 20:49  
Reply With Quote #2

Code:
// NOT MEANT TO BE USED, THIS IS AN EXAMPLE #include <amxmodx> #include <amxmisc> #define SOUND_LOCATION "sounds/misc/whatever.wav" public plugin_init() {     register_plugin("Play Sound","1.0","Hawk552");         register_concmd("amx_playsound","PlaySound",ADMIN_KICK," - plays sound"); } public plugin_precache() {     precache_sound(SOUND_LOCATION); } public PlaySound(id,level,cid) {     if(!cmd_access(id,level,cid,1))     {         return;     }         client_cmd(0,"play %s",SOUND_LOCATION);         // or you can use emit_sound()         return; }
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
SubFive
Senior Member
Join Date: Dec 2005
Location: USA
Old 01-06-2006 , 20:49  
Reply With Quote #3

Use plugin_precache.

Code:
public plugin_precache() {     precache_sound("klaxon.wav") }
SubFive is offline
Des12
Senior Member
Join Date: Jan 2005
Old 01-06-2006 , 20:54  
Reply With Quote #4

And forcing to download = Going into your maps folder, finding mapname.res, and adding the sound to it
__________________
-Dest Romano

www.JustRP.com
A TSRP Server

Quote:
Originally Posted by Brad
Don't you go be bringing reality into this.
Des12 is offline
syslevel2
Junior Member
Join Date: Nov 2005
Old 01-06-2006 , 21:07  
Reply With Quote #5

Quote:
Originally Posted by Des12
And forcing to download = Going into your maps folder, finding mapname.res, and adding the sound to it
Adding stuff to the .res file won't go over precache limit?
syslevel2 is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 01-06-2006 , 21:11  
Reply With Quote #6

Quote:
Originally Posted by Des12
And forcing to download = Going into your maps folder, finding mapname.res, and adding the sound to it
Wrong. Precaching it forces the download. Sorry.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Des12
Senior Member
Join Date: Jan 2005
Old 01-06-2006 , 21:11  
Reply With Quote #7

I don't think so, it might, but I think its more the plugin_precache that matters.
__________________
-Dest Romano

www.JustRP.com
A TSRP Server

Quote:
Originally Posted by Brad
Don't you go be bringing reality into this.
Des12 is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 01-06-2006 , 21:12  
Reply With Quote #8

Quote:
Originally Posted by Hawk552
Quote:
Originally Posted by Des12
And forcing to download = Going into your maps folder, finding mapname.res, and adding the sound to it
Wrong. Precaching it forces the download. Sorry.
Both do. but using the .res makes it only download for that map.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 01-06-2006 , 21:19  
Reply With Quote #9

I thought he was implying that you need both the plugin and a .res file.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Des12
Senior Member
Join Date: Jan 2005
Old 01-06-2006 , 21:35  
Reply With Quote #10

Oh nice, time to take some stuff out of my res file!
__________________
-Dest Romano

www.JustRP.com
A TSRP Server

Quote:
Originally Posted by Brad
Don't you go be bringing reality into this.
Des12 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 16:03.


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