Raised This Month: $ Target: $400
 0% 

Sound Range - EmitSound


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
snack_koo
Junior Member
Join Date: Jan 2012
Old 07-05-2013 , 23:47   Sound Range - EmitSound
Reply With Quote #1

I'm a new bie with amxx
Please help me clear this problem
I try to play a sound to victim and some player near him
When i use
PHP Code:
emit_sound indexchannelsample[], Float:volFloat:att,flagspitch 
I really don't understand:
1. Index: is victim index or 0 ? If is 0 that mean everybody can hear the sound so what about Float:att param?

How should i use this funtion correctly to play sound to victim and a range near him!

Thanks !
snack_koo is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-06-2013 , 05:15   Re: Sound Range - EmitSound
Reply With Quote #2

Passing 0 would mean the sound will be played from all players. It's not what you want.
You want a sound played on victim and the others near victim.
So you need to pass victim's index.
__________________
Arkshine is offline
snack_koo
Junior Member
Join Date: Jan 2012
Old 07-06-2013 , 22:51   Re: Sound Range - EmitSound
Reply With Quote #3

Thanks Arkshine! But i found my resolution!

BTW i don't want to make a new topic so i will post my next problem here - hope you show me
I./ I make a test speed - change speed to 9999 ro run faster
plugin init()
PHP Code:
RegisterHamHam_Item_PreFrame"player""fw_PlayerReset_MaxSpeed_Post"
then
PHP Code:
public fw_PlayerReset_MaxSpeed_Post(id)
{    
     
set_pev(idpev_maxspeed,9990.0)         
    

all var values :
cl_forwardspeed : 9999
cl_backspeed: 9999
cl_sidespeed:9999
sv_maxspeed:9999

But nothing happen - i still run with normal speed ? What is my problem? Show me

II./ I use
PHP Code:
set_pev(idpev_viewmodel0
to hide my v_model (try to hide my 1st view model)
It worked but i've got problem when weapon shoot.
If I shoot 5 bullet, sometime just 3 bullet fly out (2 bullet seem doesn't work)
Thanks!

Last edited by snack_koo; 07-06-2013 at 23:21.
snack_koo is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-07-2013 , 03:24   Re: Sound Range - EmitSound
Reply With Quote #4

Quote:
i don't want to make a new topic
Which is completely stupid as it's completely unrelated to the this thread. Also you make more difficult searching.
One problem = one thread.
__________________
Arkshine is offline
snack_koo
Junior Member
Join Date: Jan 2012
Old 07-07-2013 , 03:50   Re: Sound Range - EmitSound
Reply With Quote #5

Quote:
Originally Posted by Arkshine View Post
Which is completely stupid as it's completely unrelated to the this thread. Also you make more difficult searching.
One problem = one thread.
OK! I just think if i don't make a new topic, the other will have a slot to ask their problem, but i'm wrong. Sorry, i will make a new topic!
snack_koo 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 06:29.


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