AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   client_cmd (https://forums.alliedmods.net/showthread.php?t=48132)

geertjan88 12-05-2006 14:09

client_cmd
 
Code:

client_cmd(players[i],"speak ^"phone/beep^"")
client_print(players[i],print_chat,"Message 1 !^n")
client_print(players[i],print_chat,"Message 2 !^n")

when i use this code. It works for everyone in the server except for me.... :/. It does download the sound file from the server but it just doesn't play it. I double checked on other players and it does play the file for them but not for me. Also i do get the 2 two client_print print's but no sound.

mateo10 12-05-2006 14:16

Re: client_cmd
 
Can't you use
Code:
client_cmd(players[i], "play phone/beep")

The Specialist 12-05-2006 14:27

Re: client_cmd
 
well the problem is obviously in the indexs held in the players[i]. if we cold see the rest of the code we can tell you why its not executing on you.

geertjan88 12-05-2006 14:28

Re: client_cmd
 
oke i am off to get some food now after that i will thanks in advance

geertjan88 12-05-2006 16:14

Re: client_cmd
 
Quote:

Originally Posted by The Specialist (Post 411190)
well the problem is obviously in the indexs held in the players[i]. if we cold see the rest of the code we can tell you why its not executing on you.

No it's not couse it does show the 2 messages to me.

dutchmeat 12-05-2006 16:23

Re: client_cmd
 
try this instead of the speak:

Code:

emit_sound(players[i], CHAN_AUTO, "phone/beep.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)

The Specialist 12-05-2006 17:03

Re: client_cmd
 
well if the file he want to emit is wav then use emit_sound but emit_sound doesnt support mp3 . so if he wants to use an mp3 he has to use the speak.

dutchmeat 12-05-2006 17:29

Re: client_cmd
 
true, or:
mp3 play ...

stupok 12-05-2006 18:03

Re: client_cmd
 
Correct me if I'm wrong, but I think the fact that he is an admin has to do with it. Does the immunity flag prevent client_cmd() from being executed on the client?

Too lazy to look at the client_cmd function at the moment.

watch 12-06-2006 05:28

Re: client_cmd
 
No^

Play, speak and spk all work the same afaik, add .wav to the end and see if it works.

client_cmd(0,"speak phone/beep.wav")

If its an mp3 use "mp3 play phone/beep.mp3"

Precaching a file or putting it in a .res file will mean clients download it


All times are GMT -4. The time now is 07:01.

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