View Single Post
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 07-21-2011 , 16:14   Re: Playing an effect and sound at the player location
Reply With Quote #2

The function you want for the sound is EmitAmbientSound.

If I'm right, you'll also need GetClientAbsOrigin to get the players location to pass as the second argument to EmitAmbientSound.

So, something like this:
PHP Code:
new Float:origin[3] = GetClientAbsOrigin(client);
EmitAmbientSound("path/to/sound"originGetClientUserId(client)); 
Note: As I recall, a client's UserId is an entity ID, but if I'm wrong, the previous line will cause an error.

Likely you'll need a tempent for the effect, but sadly I know nothing about them.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 07-21-2011 at 16:30.
Powerlord is offline