Raised This Month: $ Target: $400
 0% 

Play a sound to everyone nearby?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NiQu
Veteran Member
Join Date: Nov 2009
Old 09-08-2010 , 04:40   Play a sound to everyone nearby?
Reply With Quote #1

Hi, how do i play a sound to everyone nearby me ingame?

Lets say i have a command (say /playsound), i want a sound to play to the player who types /playsound and everyone nearby him to.

How would i do that?

EDIT: emit_sound works, but sometimes with some sounds , it will just continue playing the sound and it never stops.
__________________
My Projects
  • RoTAPI V0.0.1 ------- Private
    • Progress - [||||||||||]
  • CashMod V0.0.6 ----- Public
    • Progress - [||||||||||]
  • CashMod V0.0.7 ----- Public
    • Progress - [||||||||||]

Last edited by NiQu; 09-08-2010 at 05:17.
NiQu is offline
tm.
Member
Join Date: Apr 2010
Old 09-08-2010 , 05:56   Re: Play a sound to everyone nearby?
Reply With Quote #2

I'm not sure because I never used this but I think you can do that with find_ent_in_sphere, check if the entities found are players and use client_cmd to play the sound.
tm. is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-08-2010 , 06:39   Re: Play a sound to everyone nearby?
Reply With Quote #3

emit_sound() works fine and does its job. If you have a sound which is played all the time, its probably your code fault or the sound built in a loop.
__________________
Arkshine is offline
NiQu
Veteran Member
Join Date: Nov 2009
Old 09-08-2010 , 12:08   Re: Play a sound to everyone nearby?
Reply With Quote #4

Okay, thank you guys.
__________________
My Projects
  • RoTAPI V0.0.1 ------- Private
    • Progress - [||||||||||]
  • CashMod V0.0.6 ----- Public
    • Progress - [||||||||||]
  • CashMod V0.0.7 ----- Public
    • Progress - [||||||||||]
NiQu 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 02:03.


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