-
Notifications
You must be signed in to change notification settings - Fork 2
alt:V Reference Implementation
Ulrich Strauss edited this page Mar 11, 2020
·
1 revision
- Copy PureVoiceServerCore.* to your alt:V Server resources directory of your gamemode and add it as Dependency to your gamemode
- Copy "purevoice" directory to resources of your alt:V Server
- include "purevoice" as resource in server.cfg
- add VoiceController.cs to your game mode
- Alter the function GetSetting to match your gamemode
- Create a VoiceContrller Instance in your gamemode somewhere and call VoiceController.Start() whenever suitable.
- (players/Users) need to install the ts3-Plugin ( PureVoice_*.ts3_plugin )
The VoiceController will emit the following events (subscribe to them with Alt.On() )
Alt.On("PUREVOICE_CLIENT_DISCONNECTED", (player) => {} );
A player disconnected from Teamspeak.
Alt.On("PUREVOICE_CLIENT_SPEAKERSTATUS", (player, areSpeakersMuted) => {} );
A player muted/unmuted their speakers
Alt.On("PUREVOICE_CLIENT_MICROPHONESTATUS", (player, isMicMuted) => {} );
A player muted/unmuted their microphone
Alt.On("PUREVOICE_CLIENT_CONNECTED", (player, isMicMuted, areSpeakersMuted) => {} );
A player connected to purevoice
Alt.On("PUREVOICE_CLIENT_NOVOICE", (player) => {} );
A player did not cobnect to purevoice within 1 Minute. (Probably plugin not installed or outdated)