AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Sound Range - EmitSound (https://forums.alliedmods.net/showthread.php?t=220025)

snack_koo 07-05-2013 23:47

Sound Range - EmitSound
 
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 !

Arkshine 07-06-2013 05:15

Re: Sound Range - EmitSound
 
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.

snack_koo 07-06-2013 22:51

Re: Sound Range - EmitSound
 
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? :shock: 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!

Arkshine 07-07-2013 03:24

Re: Sound Range - EmitSound
 
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.

snack_koo 07-07-2013 03:50

Re: Sound Range - EmitSound
 
Quote:

Originally Posted by Arkshine (Post 1985152)
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!


All times are GMT -4. The time now is 06:29.

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