Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- startPrivateChat: function()
- {
- var chatEnt = scene.GetEntityByName("ChatApplication");
- if (chatEnt == null)
- {
- console.LogWarning("Cannot start private chat with user, chat entity missing.");
- return;
- }
- var avData = GetDataComponent();
- if (avData == null)
- {
- console.LogWarning("Cannot start private chat with user, data component missing.");
- return;
- }
- var username = avData.GetAttribute("Username");
- var connId = avData.GetAttribute("ID");
- if (username == null || connId == null)
- {
- console.LogWarning("Cannot start private chat with user, name or id is null.");
- return;
- }
- chatEnt.Exec(1, "StartPrivateChat", username, connId);
- },
- startPrivateVoip: function()
- {
- var voipEnt = scene.GetEntityByName("AdminoVoipApplication");
- if (voipEnt == null)
- {
- console.LogWarning("Cannot start private voip with user, voip entity missing.");
- return;
- }
- var avData = GetDataComponent();
- if (avData == null)
- {
- console.LogWarning("Cannot start private voip with user, data component missing.");
- return;
- }
- var username = avData.GetAttribute("Username");
- var connId = avData.GetAttribute("ID");
- if (username == null || connId == null)
- {
- console.LogWarning("Cannot start private voip with user, name or id is null.");
- return;
- }
- voipEnt.Exec(1, "StartPrivateVoip", username, connId);
- },
Add Comment
Please, Sign In to add comment