diff --git a/README.md b/README.md index bb007f1..e5be013 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ ShortRangeDistance | `float` | Maximum range of SR radio mode LongRangeDistace | `float` | Maximum range of LR radio mode MegaphoneRange | `float` | Range of the megaphone (only available while driving a police car) VariablePhoneDistortion | `bool` | Enables/disables variable phone distortion based on position of players -NamePattern | `string` | Naming schema of TeamSpeak clients, `{serverid}` will be replaced by the FiveM server ID of the client and `{guid}` will be replaced by a generated GUID +NamePattern | `string` | Naming schema of TeamSpeak clients, `{serverid}` will be replaced by the FiveM server ID of the client, `{playername}` by the name of the client and `{guid}` by a generated GUID RequestTalkStates | `bool` | Enables/disables [TalkState's](https://github.com/v10networkscom/saltychat-docs/blob/master/commands.md#11--talkstate) RequestRadioTrafficStates | `bool` | Enables/disables [RadioTrafficState's](https://github.com/v10networkscom/saltychat-docs/blob/master/commands.md#33--radiotrafficstate) diff --git a/saltychat/SaltyServer/VoiceManager.cs b/saltychat/SaltyServer/VoiceManager.cs index e93bb66..0ab84c5 100644 --- a/saltychat/SaltyServer/VoiceManager.cs +++ b/saltychat/SaltyServer/VoiceManager.cs @@ -677,6 +677,7 @@ public string GetTeamSpeakName(Player player) do { name = Regex.Replace(name, @"(\{serverid\})", player.Handle); + name = Regex.Replace(name, @"(\{playername\})", player.Name); name = Regex.Replace(name, @"(\{guid\})", Guid.NewGuid().ToString().Replace("-", "")); if (name.Length > 30)