Kopra Posted November 16, 2020 Share Posted November 16, 2020 (edited) If someone can tell me why this isn't working, all the other CEFs work, just this one doesn't. It all compiles withour error and when i use /testnotif it sends me a message but does not show CEF. Im using this resource: Clientside: class Notification : Events.Script { RAGE.Ui.HtmlWindow NotificationCEF = null; public Notification() { NotificationCEF = new RAGE.Ui.HtmlWindow("package://cs_packages/CEF/popup/popup.html"); Events.Add("Show_Notif_CEF", ShowNotificationPopup); ShowCEF(false); } public void ShowNotificationPopup(object[] args) { ShowCEF((bool)args[0], (string)args[1]); } public void ShowCEF(bool show, string text = "") { if(show) { NotificationCEF.ExecuteJs($"ProvideInfo({text})"); } NotificationCEF.Active = show; } } Test command: [Command("testnotif")] public void CMD_testnotif(Player player) { NAPI.ClientEvent.TriggerClientEvent(player, "Show_Notif_CEF", true, "Test"); player.SendChatMessage("Notification test"); } Edited November 17, 2020 by Kopra Link to comment Share on other sites More sharing options...
sui228 Posted November 21, 2020 Share Posted November 21, 2020 remove cs_packages: NotificationCEF = new RAGE.Ui.HtmlWindow("package://CEF/popup/popup.html"); 1 Link to comment Share on other sites More sharing options...
Kopra Posted November 21, 2020 Author Share Posted November 21, 2020 The path is correct, as i stated in first post all the other CEFs work, it's just that one that does not. In the meantime i made new one myself so it's probably something about that resource. Thanks anyway. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now