Jump to content

NetRaider

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by NetRaider

  1. how do i do this properly?: myBrowser.callFunction("myJSFunctionInHtml(MyVariableThatIWantToAdd)");
    Nice
  2. I tried the code and it doesn't work....I am switching to javascript now. C# client side CEF is bugged for sure
  3. I erased my code, because I am transferring to client side javascript. I can't check the code right now, if I fail with the client side javascript, I'll take a look at the code, but I doubt it works, I tried many things. I've ended up with the login function, it does not work. Someone told me to transfer to client side javascript
  4. On player Connect it DOES NOT hide the chat, [ServerEvent(Event.PlayerConnected)] but when I use /login, it DOES hide the chat
  5. So I followed this tutorial: Now I am NOT calling the login.html to be shown in the game, and it still GETS SHOWN, idk how. Also I created a function where I do /login to make this pop up, so I added this line of code in the /login function: NAPI.ClientEvent.TriggerClientEvent(player, "ShowLoginCEF", true); public void ShowLoginPage(object [] args) { bool flag = (bool)args[0]; //This shows the Login.html page LoginCEF.Active = flag; RAGE.Ui.Cursor.Visible = flag; Chat.Show(!flag); RAGE.Elements.Player.LocalPlayer.FreezePosition(flag); } and it does not show the mouse cursor. Shortly said I have 5 problems. 1st one is, that the login.html gets shown automatically without my will. 2nd problem is when I want to show it over this code [ServerEvent(Event.PlayerConnected)] public void OnPlayerConnected(Player player) { //Loading the CEF on the clients pc //Launching the Login event NAPI.ClientEvent.TriggerClientEvent(player, "ShowLoginCEF", true); } it does not freeze the player and it does not show the mouse. 3rd problem is when i try to use /login , it freezes the player, but it does not show the mouse cursor. [Command("login")] public void CMD_Login(Player player) { NAPI.ClientEvent.TriggerClientEvent(player, "ShowLoginCEF", true); } 4th problem when is on player connect, the chat doesn't hide. But when i do /login, it does hide 5th problem: I managed to type in the password field by using the tab button, and nothing happens. The functions don't get executed. EDIT: If you're using RAGEMP 1.1 version you must add rage-sharpN.dll and NOT rage-sharp.dll as a dependency. I did it and still I have the page shown without my will and the mouse does not appear
  6. Thanks to Mr.Duck @Jer who has helped me, here is the solution: https://docs.microsoft.com/en-us/dotnet/api/system.timers.timer?view=net-5.0 P.S. If you are using System.IO; to write down logs, make sure to put the code in this: NAPI.Task.Run(() => { // code here });
  7. How can I use or make a periodic event? Let's say I want to give money to players every 1 hour, just like a sign check. I did something, but it doesn't work, I used System.Threading; , but it crashes when I call a function from a main thread inside the background thread function... EDIT: It crashed because I was making logs.txt, I wrote down the solution for the logs.txt
  8. Ok thanks to DaNeo, he helped me out, here is how to do it: 1.Go to your server folder and find bootstrapper.dll that is located in server-files\dotnet\runtime\bootstrapper.dll copy it and copy the Bootstrapper.xml file as well. 2.Create a folder named dependencies and paste the files inside there(Make the folder located inside your projects folder, your project folder is located near the .sln) 3. Open your project 4.In solution explorer right click on dependencies and select "Add Project Reference" 5. Browse and select the bootstrapper.dll that is located inside your project dependencies folder that you have created. 6.Uninstall the old version 0.3.7 GTANetworksAPI from the nuget package manager Note: Make sure you do create the folder dependencies inside your project folder that is located next to the project.sln, because it did not work for me without the folder part
  9. I have never experienced this thing to know how to solve it. I'm sure there are others that didn't knew it until they were told. Can someone show me how to do it? The bootstrapper.dll is located inside the server folder: server-files\dotnet\runtime\bootstrapper.dll
  10. The title says it all? Please, do give only the updated version. This link is outdated: https://wiki.gtanet.work/index.php?title=Main_Page Here is an example why: https://wiki.gtanet.work/index.php?title=GetPlayerName
  11. I can't compile the code, I don't know why. I even changed the Player to Client and still it does not work....also they said that the Client has been changed to Player. Image Image 2 Is the Player changed to Client? Because in the docs it says Client, and in a tutorial video it says Player and on the forum someone said it is Player and not Client anymore. I am using rage server 1.1 I think ( Well the latest server that is currently available) The problem is this: The type or namespace name 'Player' could not be found (are you missing a using directive or an assembly reference?) I followed this tutorial https://www.youtube.com/watch?v=HLRFF6A36mM the code is here: https://pastebin.com/G4UPTbup I've tried adding this line of code: using GTANetworkMethods; but it still didn't repair the problem, because I have ended up having a problem with the item.SendChatMessage, even though it did stop marking the Player as an error I did replace the Player with Client, and still no success, the script does not load when the server runs if it is replaced with the Client instead of Player. Please do help, I don't know how to fix this problem
×
×
  • Create New...