Etpro greeting sound with lua?


(system) #1

has anyone got a greeting sound lua for etpro or knows how to make a sound play every time someone joins the server?

So my sound will play, New player connected. I have the wav file.
Just need a welcome sound lua script


(stealth6) #2

You need to put the wav file into a pk3 file and then get the client to download it. Then you can use lua script to play it when a client connects. From the wiki: http://wolfwiki.anime.net/index.php/ETPro:Lua_Mod_API

sound

et.G_globalSound( sound )
Plays the global sound indicated by the filename sound.

et.G_Sound( entnum, soundindex )
Plays the sound soundindex at the location of entity entnum

client management

rejectreason = et_ClientConnect( clientNum, firstTime, isBot )
Called when a client attempts to connect to the server. clientNum is the client slot id, firstTime indicates if this is a new connection (1) or a reconnection (0). isBot indicates if the client is a bot (1) or not (0). If the mod accepts the connection, it should return nil. Otherwise, the mod should return a string describing the reason the client connection was rejected.

et_ClientDisconnect( clientNum )
Called when a client disconnects. clientNum is the client slot id.

et_ClientBegin( clientNum )
Called when a client begins (becomes active, and enters the gameworld). clientNum is the client slot id.

et_ClientUserinfoChanged( clientNum )
Called when a client’s Userinfo string has changed. clientNum is the client slot id.
note: In ETPro 3.2.6 and below, this only gets called when the players CS_PLAYERS config string changes, rather than every time the userinfo changes. This only happens for a subset of userinfo fields.

et_ClientSpawn( clientNum, revived )
Called when a client is spawned. clientNum is the client slot id. revived is 1 if the client was spawned by being revived.


(system) #3

Thanks, That helped alot!