User:Phenomenon: Difference between revisions
Jump to navigation
Jump to search
Phenomenon (talk | contribs) |
Phenomenon (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
[[Category:ETPro:Mods]] | [[Category:ETPro:Mods]] | ||
== ''Personal profile'' == | == ''Personal profile'' == | ||
| Line 14: | Line 15: | ||
:[irc://irc.quakenet.org:6667/force-opponents #force-opponents] - channel on QuakeNet | :[irc://irc.quakenet.org:6667/force-opponents #force-opponents] - channel on QuakeNet | ||
<br> | |||
===== | == ''LUA script - <font color=blue>playsoundcmd.lua</font>'' == | ||
This script adds new console commands ''<font color=gray>playsound</font>'' and ''<font color=gray>playsound_env</font>'' to your server. The difference to the already existing ''[[User:RoadKillPuppy|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 [http://et.tjw.org/etpub ETPub] behavior). | |||
===== '''''Requirements''''' ===== | |||
:*Wolfenstein - Enemy Territory (patched to v2.60b) - ''[http://www.splashdamage.com splashdamage.com]'' | :*Wolfenstein - Enemy Territory (patched to v2.60b) - ''[http://www.splashdamage.com splashdamage.com]'' | ||
:*[[ETPro]] >= 3.2.6 installed - ''[http://etpro.anime.net etpro.anime.net]'' | :*[[ETPro]] >= 3.2.6 installed - ''[http://etpro.anime.net etpro.anime.net]'' | ||
===== Installation ===== | ===== '''''Installation''''' ===== | ||
:*Download the LUA script ''[http://www.force-opponents.de/lua/playsoundcmd.lua playsoundcmd.lua]'' to your [[ETPro]] folder | |||
:*Add the following command to your server configuration<pre>set lua_modules "playsoundcmd.lua"</pre> | |||
:*Restart your server | |||
: | ===== '''''Usage''''' ===== | ||
:''<font color=gray>\rcon (rconpassword) playsound [sound]</font>'' plays '''sound''' for all clients<br> | |||
:''<font color=gray>\rcon (rconpassword) playsound [name/slot#] [sound]</font>'' plays '''sound''' for '''name/slot#''' only<br> | |||
:''<font color=gray>\rcon (rconpassword) playsound_env [name/slot#] [sound]</font>'' plays '''sound''' for '''name/slot#''' and surrounding clients only | |||
<br> | |||
< | == ''LUA function - <font color=blue>et.G_ClientSound()</font>'' == | ||
Use this function in your own projects to play a sound for a certain client only. | |||
</ | |||
:* | ===== '''''Requirements''''' ===== | ||
:*[[ETPro]] >= 3.2.6 - ''[http://etpro.anime.net etpro.anime.net]'' | |||
===== Usage ===== | ===== '''''Usage''''' ===== | ||
:et.G_ClientSound('''clientnum''', '''soundfile''') | |||
::Plays a global sound '''soundfile''' for a certain client '''clientnum''' only. | |||
===== '''''<font color=blue>CODE</font>''''' ===== | |||
<table><tr><td> </td><td><pre> | |||
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 | |||
</pre></td></tr></table> | |||
__NOTOC__ | |||
__NOEDITSECTION__ | |||
Revision as of 09:52, 26 July 2006
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 |