Search the Community
Showing results for tags 'bridge'.
-
Hey ! I'm trying to communicate between serverside c# and serverside js, with this kind of code: //serverside C# Debug.Assert(NAPI.LocalEvent != null, "Never happens, LocalEvent is not null") NAPI.LocalEvent.TriggerEvent("testEvent"); //throw System.NullReferenceException (Exception has been thrown by the target of an invocation), no matter what arguments are provided //serverside JS mp.events.add( "testEvent", () =>{ console.log("Never called"); }); Did someone already used this function ? Thanks
-
Hello! I've been playing Rage-MP for the last month and now I've decided to try and make my own server but unfortunately I've run into many problems and confusions so I'm writing here in hopes of solving them. I'm currently hosting on ZAP-Hosting, and fortunately for me I can change between Windows and Linux, 0.3.7 and 1.1 versions of RageMP. Now, my first confusion is, all resources and Wiki pages about starting a RageMP server is based on 1.1 version, for which I don't see a reason for now since if you want your server on masterlist it has to be 0.3.7 version. Second thing is that I want to run CSharp scripts on my server, but I can't find anywhere 0.3.7 version of Bridge, and all Wiki posts refer to newest version which I cannot use on 0.3.7 version of server. When I install version 0.3.7 on Windows and just enable CSharp in conf.json, server runs fine but I get this warning/error in console. This is my bridge runtime folder (bridge folder is empty and only has runtime folder): And this is my plugins folder: I've tried finding some other Bridge version, but all versions just crash my server with segmentation fault on server.exe. I'll be glad to try any solution you guys might have as I've been trying to solve this myself for over 24 hours now without success.
-
Version 2.1
707 downloads
With this script you can easily create custom timer. The file is fully commented and should be easy to understand. The file in Shared is required - and then use either the file in Server or in Client depending on where you are using it. You have to use the constructor to create the timer. Examples: Examples: // Yes, the method can be private // private void testTimerFunc(Client player, string text) { NAPI.Chat.SendChatMessageToPlayer(player, "[TIMER] " + text); } void testTimerFunc() { NAPI.Chat.SendChatMessageToAll("[TIMER2] Hello"); } [Command("ttimer")] public void timerTesting(Client player) { // Lamda for parameter // new Timer(() => testTimerFunc(player, "hi"), 1000, 1); // Normal without parameters // new Timer(testTimerFunc, 1000, 1); // Without existing method // var timer = new Timer(() => { NAPI.Chat.SendChatMessageToPlayer(player, "[TIMER3] Bonus is da best"); }, 1000, 0); // Kill the timer // timer.Kill(); } -
What's the problem is that they are not created and displayed. NAPI.Marker.CreateMarker(2, client.Position, client.Position, new Vector3(), 10f, new Color(164, 26, 0), true, 1); NAPI.TextLabel.CreateTextLabel("My Text", client.Position, 10F, 3, 2, new Color(164, 26, 0), false, 2);
-
Hello everyone! I've got some errors with the linux bridge package. Some assemblies are not found by the server (and yes, they're in the runtime directory because they come with the bridge package). -> Starting admin resource.. admin: loading scripts.. found 1 script(s) admin: reading referenced assemblies.. found 1 reference(s) admin: warning, netstandard.dll is not found! admin: compiling scripts.. admin: instantiating Main.AdminScript.. admin: loading server events.. found 2 server event(s) admin: loaded 2 server events(s) admin: loading commands.. found 9 command(s) admin: loaded 9 commands(s) -> Resource admin started! Complete version: In this case, the resource doesn't need methods from the assembly (so, it doesn't really matter...) and it won't prevent the compilation. Steps to reproduce: Prepare a fresh install of linux server (with the bridge!). Go through bridge resources directory and open meta.xml in "admin/" (for example). Paste this new content: <meta> <info name="Administration Utilities" author="Guadmaz" type="script" /> <assembly ref="netstandard.dll"/> <script src="admin.cs"/> </meta> Start the server. This will not work with all of the assemblies. For example, System.Linq.dll will be detected and System.Linq.Queryable.dll will not. All of my tests have been done on Debian 9 and Ubuntu 16.04 (with all required deps). I don't know what to do to solve the problem... maybe an assembly version problem? Thanks!
-
Доброго времени суток всем. Столкнулся с проблемой установки скриптов на C# под bridge. Никакие готовые скрипты не хотят ставиться, только некоторые. Выдают куча ошибок, и только 20% запускаются. Качал bridge с офф сайта или типа того, со всеми (Которые там присутствовали) библиотеками. Если я заменю файл "bootstrapper.dll " в папке /runtime на старую версию, то некоторые из скриптов, которые ранее не запускались, начинают нормально загружаться, и то, не все. И перестают работать те, которые до этого работали. Логи: Скачать! (Ссылкой, потому что лог очень большой.) Я догадываюсь судя по логам, это ошибка импорта GtaNetwork событий или что то типа того.
-
Здравствуйте, только сегодня узнал о данном мультиплеере. Начал разработку сервера, но так как я C# знаю на довольно высоком уровне, естественно мне захотелось писать на нём. С запуском скриптов на JS всё хорошо, а вот с шарпом проблемы. Может кто знает как решить проблему на скрине и где взять файл coreclr.dll? Делал всё по данному уроку: https://github.com/SkyLaGer/RageMP-CSharp-Wiki/wiki/Новый-проект-в-Visual-Studio-2017
-
Hey folks, does someone here know how to acces a SetEntitySharedData Variable from C# bridge on ragemp clientside? Greets
-
/dell
-
Question #1 (FIXED just compiled resource) Code: https://pastebin.com/dkqQkrA2 Question #2 (FIXED) Code: https://pastebin.com/bwkspwen Fix: Use it: https://msdn.microsoft.com/ru-ru/library/system.threading.timer(v=vs.110).aspx Question #3 (FIXED just compiled resource) Code: https://pastebin.com/LC2LNkf2 Reference