User:Phenomenon
Personal profile
Homepage
- www.force-opponents.de - Home of the Force Opponents Clan
IRC
- #force-opponents - channel on QuakeNet
LUA script - playsoundcmd.lua
This script adds new console commands playsound and playsound_env to your server. The difference to the already existing playsound.lua is this one can play a sound only for a certain player and/or also for players in the proximity of this player (exactly ETPub behavior).
Requirements
- Wolfenstein - Enemy Territory (patched to v2.60b) - splashdamage.com
- ETPro >= 3.2.6 installed - etpro.anime.net
Installation
- Download the LUA script playsoundcmd.lua to your ETPro folder
- Add the following command to your server configuration
set lua_modules "playsoundcmd.lua"
- Restart your server
Usage
- \rcon (rconpassword) playsound [sound] plays sound for all clients
- \rcon (rconpassword) playsound [name/slot#] [sound] plays sound for name/slot# only
- \rcon (rconpassword) playsound_env [name/slot#] [sound] plays sound for name/slot# and surrounding clients only
LUA function - et.G_ClientSound()
Use this function in your own projects to play a sound for a certain client only.
Requirements
- ETPro >= 3.2.6 - etpro.anime.net
Usage
- et.G_ClientSound(clientnum, soundfile)
- Plays a global sound soundfile for a certain client clientnum only.
CODE
EV_GLOBAL_CLIENT_SOUND = 54 function et.G_ClientSound(clientnum, soundfile) local tempentity = et.G_TempEntity(et.gentity_get(clientnum, "r.currentOrigin"), EV_GLOBAL_CLIENT_SOUND) et.gentity_set(tempentity, "s.teamNum", clientnum) et.gentity_set(tempentity, "s.eventParm", et.G_SoundIndex(soundfile)) end |