User:Phenomenon: Difference between revisions
Jump to navigation
Jump to search
Phenomenon (talk | contribs) mNo edit summary |
Phenomenon (talk | contribs) mNo edit summary |
||
| Line 1: | Line 1: | ||
[[Category:ETPro:Mods]] | [[Category:ETPro:Mods]] | ||
= | <table><tr><td width=200>http://wowdev.org/wiki/images/thumb/9/95/Lua.gif/180px-Lua.gif</td><td> | ||
'''''Homepage''''' | |||
:[http://www.force-opponents.de www.force-opponents.de] - Home of the Force Opponents Clan | :[http://www.force-opponents.de www.force-opponents.de] - Home of the Force Opponents Clan | ||
'''''EMail''''' | |||
:[mailto:phenomenon@force-opponents.de phenomenon@force-opponents.de] | :[mailto:phenomenon@force-opponents.de phenomenon@force-opponents.de] | ||
'''''[[IRC]]''''' | |||
:[irc://irc.quakenet.org:6667/force-opponents #force-opponents] - channel on QuakeNet | :[irc://irc.quakenet.org:6667/force-opponents #force-opponents] - channel on QuakeNet | ||
</td></tr></table> | |||
<br> | <br> | ||
Revision as of 07:55, 27 July 2006
| http://wowdev.org/wiki/images/thumb/9/95/Lua.gif/180px-Lua.gif |
Homepage
|
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 |