public CCEFManager() { browser = new CEF("package://html/index.html"); browser.Active = true; RAGE.Events.Add("CEF->C#", OnCEFEvent); }
private void GoBackMainBanco(object[] args) { browserCreateBank.Destroy(); browserCreateBank = new RAGE.Ui.HtmlWindow("package://statics/bank/main.html"); browserCreateBank.ExecuteJs($"setSueldoActual('{sueldo}')"); browserCreateBank.ExecuteJs($"setIBAN('{IBAN}')"); }
private void OpenCompanyBrowser(object[] args) { bCompany = new RAGE.Ui.HtmlWindow("package://statics/company/venta.html"); RAGE.Ui.Cursor.Visible = true; bCompany.ExecuteJs($"setCompaniesInfo('{args[0]}', {args[1]}, '{args[2]}');"); }
private void OpenBank(object[] args) { browserCreateBank = new RAGE.Ui.HtmlWindow("package://statics/bank/pin.html"); RAGE.Ui.Cursor.Visible = true; isATM = (bool)args[0]; browserCreateBank.ExecuteJs($"setBankCreateUsername('{RAGE.Elements.Player.LocalPlayer.Name}')"); }
public static void timer(object roundsLeft) { url = "http://localhost/CSRageOffensive/timer.html"; CefHUD = new RAGE.Ui.HtmlWindow(url); var round = roundsLeft; CefHUD.ExecuteJs($"roundsLeft('{round}')"); }
public static void CreateBrowser() { if (Browser is RAGE.Ui.HtmlWindow) { return; } Browser = new RAGE.Ui.HtmlWindow("package://ui/index.html"); }
private void OpenInventory(object[] args) { data.Inventory inventario = JsonConvert.DeserializeObject <data.Inventory>(args[0] as string); invBrowser = new RAGE.Ui.HtmlWindow("package://statics/inventory/index.html"); RAGE.Ui.Cursor.Visible = true; invBrowser.ExecuteJs($"setInventoryData('{inventario.slot1.name}', {inventario.slot1.type}, {inventario.slot1.quantity}, '{inventario.slot2.name}', {inventario.slot2.type}, {inventario.slot2.quantity}, '{inventario.slot3.name}', {inventario.slot3.type}, {inventario.slot3.quantity}, '{inventario.slot4.name}', {inventario.slot4.type}, {inventario.slot4.quantity}, '{inventario.slot5.name}', {inventario.slot5.type}, {inventario.slot5.quantity}, '{inventario.slot6.name}', {inventario.slot6.type}, {inventario.slot6.quantity}, '{inventario.slot7.name}', {inventario.slot7.type}, {inventario.slot7.quantity}, '{inventario.slot8.name}', {inventario.slot8.type}, {inventario.slot8.quantity}, '{inventario.slot9.name}', {inventario.slot9.type}, {inventario.slot9.quantity}, '{inventario.slot10.name}', {inventario.slot10.type}, {inventario.slot10.quantity}, '{inventario.slot11.name}', {inventario.slot11.type}, {inventario.slot11.quantity}, '{inventario.slot12.name}', {inventario.slot12.type}, {inventario.slot12.quantity});"); invBrowser.ExecuteJs($"setPjItems('{inventario.pjSlot1.name}', '{inventario.pjSlot2.name}', '{inventario.pjSlot3.name}', '{inventario.pjSlot4.name}', '{inventario.pjSlot5.name}', '{inventario.pjSlot6.name}');"); }
private void LoggedOpenBank(object[] args) { sueldo = args[0].ToString(); IBAN = args[1].ToString(); browserCreateBank.Destroy(); browserCreateBank = new RAGE.Ui.HtmlWindow("package://statics/bank/main.html"); browserCreateBank.ExecuteJs($"setSueldoActual('{sueldo}')"); browserCreateBank.ExecuteJs($"setIBAN('{IBAN}')"); }
public CRender() { Nametags.Enabled = false; RAGE.Game.Graphics.GetActiveScreenResolution(ref ScreenX, ref ScreenY); CEF CurrentWindow = new CEF("https://www.youtube.com/"); CurrentWindow.Active = false; RAGE.Ui.Cursor.Visible = false; Events.Tick += OnUpdate; }
/// <summary> /// Trigger if plugin should be initialized /// </summary> /// <param name="args">args[0] - minimum version | args[1] - sound pack | args[2] - channelName | args[3] - channelPassword</param> public static void OnInitialize(object[] args) { Voice._minimumVersion = (string)args[0]; Voice._soundPack = (string)args[1]; Voice._ingameChannel = (string)args[2]; Voice._ingameChannelPassword = (string)args[3]; Voice._htmlWindow = new RAGE.Ui.HtmlWindow("package://Voice/SaltyAjax.html"); Voice.IsEnabled = true; }
private void OpenMenuCompany(object[] args) { cajaFuerte = (int)args[0]; trabajadores = (int)args[1]; porcentaje = (int)args[2]; subsidio = (int)args[3]; nombre = args[4].ToString(); companyMenu = new RAGE.Ui.HtmlWindow("package://statics/company/menu.html"); RAGE.Ui.Cursor.Visible = true; companyMenu.ExecuteJs($"setStats({cajaFuerte}, {trabajadores}, {porcentaje}, {subsidio}, '{nombre}');"); }
/// <summary> /// Trigger if plugin should be initialized /// </summary> /// <param name="args">args[0] - teamSpeakName | args[1] - serverUniqueIdentifier | args[2] - soundPack | args[3] - channelId | args[4] - channelPassword | </param> public static void OnInitialize(object[] args) { VoiceManager.TeamSpeakName = (string)args[0]; VoiceManager.ServerUniqueIdentifier = (string)args[1]; VoiceManager.SoundPack = (string)args[2]; VoiceManager.IngameChannel = Convert.ToUInt64((string)args[3]); VoiceManager.IngameChannelPassword = (string)args[4]; VoiceManager.IsEnabled = true; VoiceManager._htmlWindow = new RAGE.Ui.HtmlWindow("package://Voice/SaltyWebSocket.html"); //VoiceManager._htmlWindow.Active = false; }
private void OpenDepositar(object[] args) { browserCreateBank.Destroy(); browserCreateBank = new RAGE.Ui.HtmlWindow("package://statics/bank/ingresar.html"); browserCreateBank.ExecuteJs($"setSueldoActual('{sueldo}')"); browserCreateBank.ExecuteJs($"setIBAN('{IBAN}')"); if (isATM) { browserCreateBank.ExecuteJs($"isATM()"); } }
public ClientSelectCharacter() { Events.Add("SelectCharacter", ShowSelectCharacterMenu); Events.Add("ToggleCreateCharacterMenu", ToggleCreateCharacterMenu); Events.Add("CharacterInfoFromCEF", SendCreateCharInfoToServer); Events.Add("CharacterNameExists", OnCharacterNameExists); Events.Add("GoBackToCharacterSelection", OnGoBackToCharacterSelection); createCharacterWindow = new RAGE.Ui.HtmlWindow("package://cs_packages/ClientSelectCharacter/SelectCharacter.html"); createCharacterWindow.Active = false; }
private void OpenCharacterSelector(object[] args) { // Initialize the player's position RAGE.Elements.Player.LocalPlayer.FreezePosition(true); // Create the camera var cam = Cam.CreateCameraWithParams(RAGE.Game.Misc.GetHashKey("DEFAULT_SCRIPTED_CAMERA"), -898.5869f, -435.9167f, 90.2943f, 0.0f, 24.9442f, 8.0f, 75.0f, true, 2); Cam.SetCamActive(cam, true); Cam.RenderScriptCams(true, false, 0, false, false, 0); selectorBrowser = new RAGE.Ui.HtmlWindow("package://statics/pj/selector.html"); RAGE.Ui.Cursor.Visible = true; }
public ClientPlayerBoard() { Events.Add("PlayerBoardUpdate", OnPlayerBoardUpdate); playerBoard = new RAGE.Ui.HtmlWindow("package://cs_packages/ClientPlayerBoard/PlayerBoard.html"); playerBoard.Active = false; Events.Tick += OnTick; new Timer(() => { _isAllowedToRefreshPlayerboard = true; }, _serverUpdateCooldown, 0); }
private static void prepair(bool isOpen, bool withBlure) { isOpened = isOpen; Player.LocalPlayer.FreezePosition(isOpen); RAGE.Ui.Cursor.Visible = isOpen; if (isOpen) { ClientTest.isPlayerInBrowser = true; Chat.Activate(false); Cef = new RAGE.Ui.HtmlWindow(url); if (withBlure) { RAGE.Game.Graphics.TransitionToBlurred(blureTime); } } else { ClientTest.isPlayerInBrowser = false; Cef.Destroy(); Chat.Activate(true); RAGE.Game.Graphics.TransitionFromBlurred(blureTime); } }
private void OpenCreateBankPin(object[] args) { browserCreateBank.Destroy(); browserCreateBank = new RAGE.Ui.HtmlWindow("package://statics/bank/crear.html"); }
public static void Create() { Cef = new RAGE.Ui.HtmlWindow(Url); }
private void OpenSafeMenuCompany(object[] args) { companyMenu.Destroy(); companyMenu = new RAGE.Ui.HtmlWindow("package://statics/company/cajafuerte.html"); }
private void ReturnMainMenuCompany(object[] args) { companyMenu.Destroy(); companyMenu = new RAGE.Ui.HtmlWindow("package://statics/company/menu.html"); companyMenu.ExecuteJs($"setStats({cajaFuerte}, {trabajadores}, {porcentaje}, {subsidio}, '{nombre}');"); }
private void OpenConfigMenuCompany(object[] args) { companyMenu.Destroy(); companyMenu = new RAGE.Ui.HtmlWindow("package://statics/company/configuracion.html"); }