Search the Community

Showing results for tags 'Cs'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • RAGE Multiplayer
    • Announcements
    • Discussion
    • Suggestions
    • RDR2 Multiplayer
  • Scripting
    • Scripting
    • Resources
  • Community
    • Support
    • Servers
    • Media Gallery
  • Non-English
    • Русский - Russian
    • Français - French
    • Deutsch - German
    • Espanol - Spanish
    • Română - Romanian
    • Portuguesa - Portuguese
    • Polski - Polish


  • Scripts
  • Gamemodes
  • Libraries
  • Plugins
  • Maps
  • Tools

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



About Me






Found 8 results

  1. So, i was on my way to create a simple practice Script. Everything fine so far, my ClientSide Menu opens etc. The button activation gets fired and is from the correct element. The the Remote Event should trigger which does not seem to happen. Any Thoughts where i messed up? So far i received no Error what so ever. Server Side Main.cs (Snippet) [RemoteEvent("VehicleSpawn")] public void VehicleSpawn(Player player, bool locked, bool engine, string vehName) { player.SendChatMessage("Got called"); uint vHash = NAPI.Util.GetHashKey(vehName); player.SendChatMessage(vHash.ToString()); NAPI.Vehicle.CreateVehicle(vHash, player.Position.Around(5), 0.0f, 0, 0, locked: locked, engine: engine); } Client Side Main Class public class Main : Events.Script { public Main() { Events.Add("playRP.CMD.vehicle", VehicleNative); } public void VehicleNative(object[] args) { Chat.Show(false); RAGE.Ui.Cursor.Visible = true; MenuPool mPool = new MenuPool(); UIMenu VehicleMenu = new UIMenu("Spawner","Spawn your desired Vehicle"); mPool.Add(VehicleMenu); bool Locked = false; bool Engine = true; UIMenuCheckboxItem locked = new UIMenuCheckboxItem("Locked?", false); UIMenuCheckboxItem engine = new UIMenuCheckboxItem("Engine On?", true); VehicleMenu.AddItem(locked); VehicleMenu.AddItem(engine); var vehNames = new List<dynamic> { "Infernus", "Cheetah", "Dominator" }; string selectedVeh = vehNames[0]; UIMenuListItem VehicleName = new UIMenuListItem("Vehicle", vehNames, 0); VehicleMenu.AddItem(VehicleName); UIMenuItem CreateButon = new UIMenuItem("Create Vehicle!"); VehicleMenu.AddItem(CreateButon); VehicleMenu.OnCheckboxChange += (sender, item, flag) => { if(sender == VehicleMenu) { if (item == locked) Locked = flag; else if (item == engine) Engine = flag; } }; VehicleMenu.OnListChange += (sender, item, index) => { if(sender == VehicleMenu) { if(item == VehicleName) { selectedVeh = item.IndexToItem(index).ToString(); } } }; CreateButon.Activated += (sender, item) => { if(sender == VehicleMenu) { if(item == CreateButon) { Chat.Output("CALLED ACTIVATED"); Events.CallRemote("VehicleSpawn", locked, engine, selectedVeh); Chat.Show(true); VehicleMenu.Visible = false; VehicleMenu.FreezeAllInput = false; RAGE.Ui.Cursor.Visible = false; } } }; VehicleMenu.OnMenuClose += (sender) => { if(sender == VehicleMenu) { Chat.Show(true); VehicleMenu.Visible = false; VehicleMenu.FreezeAllInput = false; RAGE.Ui.Cursor.Visible = false; } }; VehicleMenu.Visible = true; VehicleMenu.FreezeAllInput = true; VehicleMenu.RefreshIndex(); Events.Tick += (name) => { mPool.ProcessMenus(); }; } } Thanks in Advance for helping and hopefully pointing out the Obvious ^^
  2. Hey, ich wollte mit dem programmieren für RageMP anfangen, aber da stelle ich mir eine Frage. Man kann ja clientseitig mit C# und JS programmieren, kann man mit beidem alles machen oder ist eins der zwei Sprachen im nachteil oder deutlich schwerer? Auf eine Antwort würde ich mich freuen. Mit freundlichen Grüßen FabioPimo
  3. Version 2.1


    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(); }
  4. CXXY

    remote event error

    Client side: class KeyManager { constructor() { mp.keys.bind(0x11, true, function() { if(mp.players.local.vehicle && mp.players.local.vehicle.getPedInSeat(-1) === mp.players.local.handle) {'BANG_onVehicleShotPrimary', mp.players.local.vehicle.getForwardVector()); } }); } } export default new KeyManager(); Server side: [RemoteEvent ("BANG_onVehicleShotPrimary")] public void BANG_onVehicleShotPrimary (Client player, object[] arguments) { player.SendChatMessage("HALLILUAH"); } Console: at object RuntimeMethodHandle.InvokeMethod(object target, object[] arguments, Signature sig, bool constructor) at object System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(object obj, object[] parameters, object[] arguments) at void GTANetworkInternals.RemoteEventParser.Parse(Client sender, ulong eventNameHash, object[] args) in C:\Users\Adam\Documents\Git\comp-layer2\BootstrapperNC\Handlers\ResourceInfo.cs:line 62 at void GTANetworkInternals.RemoteEventHandler.Parse(Client sender, ulong eventNameHash, object[] arguments) in C:\Users\Adam\Documents\Git\comp-layer2\BootstrapperNC\Handlers\ResourceInfo.cs:line 67 System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —-> System.NullReferenceException: Object reference not set to an instance of an object. at void GC_FunGame.Main.BANG_onVehicleShotPrimary(Client player, object[] arguments)
  5. Version 1.0.0


    Just an example/wrapper on how to properly use "GetClosestObjectOfType" and fetch data from an object. I've been using this in my server for a while now to make it easier to get XYZ and rotation of objects in bulk, instead of having to go through them in codewalker which can be a pain. Installation Move client_packages to your client_packages folder Move Serverside C#/GetWorldObjects.cs to your gamemode or script. Move objectLocations.json to your server root directory. Usage The JSON file included in the zip contains the pacific bank vault door as an example object. Use the /getworldobjects or /gwo command to run through all the items in the JSON file and fetch the X, Y, Z and XYZ Rotation of the object. As of right now it'll simply log the object to your server console and continue to the next object in the list, you can extend this functionality by editing the "REMOTE_EVENT_OnWorldObjectFetched" method in GetWorldObjects.cs server-side script. JSON file object info public class ObjectLocation { // The model name to look for, you can fetch this from CodeWalker or RAGEMP objectdb for example. public string Model { get; set; } // The model that should replace the model at this location, optional. I personally used this to store in the database and then on server start it'd delete the world object and replace it with the object model specified here. public string ReplacementModel { get; set; } = ""; // A position within X distance of the object you want to get the data of, distance can be specified by the Radius. public Vector3 Position { get; set; } // An optional type you can pass to the method so you can use it later on for data storage purposes(eg keep objects of certain types separated by an ID) public int Type { get; set; } = 0; // The radius to find the object, doesn't have to be too precise altho I generally recommend putting the player's teleport coordinates as close to the object as possible and decreasing range to 5 or 10. public int Radius { get; set; } } [ { "Model": "v_ilev_bk_vaultdoor", "ReplacementModel": "v_ilev_bk_vaultdoor", "Type": 0, "Radius": 25, "Position": { "X": 254.2859, "Y": 225.3845, "Z": 101.8757 } }, { "Model": "another_object_model_name", "ReplacementModel": "another_object_model_name_to_replace", "Type": 0, "Radius": 10, "Position": { "X": 1234.567, "Y": 123.456, "Z": 12.345 } }, ... ] All you have to do is add more items to the JSON file and it'll run thru all of them.
  6. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Data.Common, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Не удается найти указанный файл. at new ServerSide.mysqli(string host, string user, string password, string db) at new ServerSide.Manager() in D:\rumod\ragemp\server-files\ragemp_csharp_scripts\ragemp_uncomiled_scripts_csharp\ServerSide\Manager.cs:line 9 --- End of inner exception stack trace --- at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at GTANetworkInternals.GameServer.<InstantiateScripts>d__61.MoveNext() at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext() at System.Collections.Generic.List`1.AddEnumerable(IEnumerable`1 enumerable) at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection) at GTANetworkInternals.GameServer.StartResource(String resourceName, String parent) Я подключил модуль MySql, написал реализации класса, но появляются такие ошибки. Сразу скажу, что он не может найти библиотеку я понимаю, дело в том, что она присутствует. I connected the MySql module, wrote class implementations, but such errors appear. I must say right away that he cannot find the library, I understand, the fact is that it is present.
  7. Our dev team is looking for a nice and friendly developer for our new project. If somebody has time and desire then join the discord and contact the head of devemopment. We have a big community with 700 persons. Actually we have 3 devs we speak German and English. If you are interested dm the head of development. And if you want we will pay you when you help us. Discord:
  8. Ищем разработчиков для скриптинга GTA RAGE платим отлично Так же принимаем любого человека который готов приносить пользу развивающемуся проекту, получать опыт и в будущем стать частью его. Уже написаны сервера по Counter-Strike, пишутся сервера по RUST и MINECRAFT VK: MAIL: [email protected]