User:Phenomenon: Difference between revisions

From WolfWiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
[[Category:ETPro:Mods]]
[[Category:ETPro:Mods]]


== ''Personal profile'' ==
<table><tr><td width=200>http://wowdev.org/wiki/images/thumb/9/95/Lua.gif/180px-Lua.gif</td><td>
 
'''''Homepage'''''
===== 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'''''
===== EMail =====
 
:[mailto:phenomenon@force-opponents.de phenomenon@force-opponents.de]
:[mailto:phenomenon@force-opponents.de phenomenon@force-opponents.de]
 
'''''[[IRC]]'''''
===== [[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

www.force-opponents.de - Home of the Force Opponents Clan

EMail

phenomenon@force-opponents.de

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
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
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