Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/30/21 in Posts

  1. Hello. I've been meddling around with the RageMP API and I've learned most of it myself with the help of the discord members. Shoutout to Xabi, Sake and everyone else for helping me out with this language. Anywho I've come to realise that when I had started out there was nothing that would guide me through the process of making a server or creating the script for that matter. So here I bring you a YouTube playlist of the RageMP C# language tutorial. It is still under progress but I keep uploading new tutorials daily. And I mostly describe most of the elements so the videos might seem longer than usual tutorials. But I'd suggest to not skip anything and go over everything that I have to offer thoroughly. And if you do like my tutorials then do subscribe and like it too! And happy coding!
    1 point
  2. Inside your server folder, open config.json and add the following line "allow-cef-debugging": true Now head to your registry (Windows Key + R ) and type regedit and hit enter. Head to the following path: Once you're there, right click and Go New > String Value and put "launch.cefPort" as the name and Hit Enter, then right click and hit Modify and set the data to the port you'd like to use (9222 for example) and it should look the same as below Now head to your browser using the following: http://localhost:9222/ or whatever port you had entered to enable it. You'll need to quit Rage and open it back up if you enabled this while in game, and make sure you restart your server when you change the setting. Credits to @kemperrr as I used his post on Discord to make this up.
    1 point
  3. Client-side: mp.events.add({ 'entityStreamIn' : (entity) => { if(entity.type == 'player') { if (entity.hasVariable("animData")) { const value = entity.getVariable("animData"); if (null != value) { const anim = value.split("%"); loadAnimDict(anim[0], function() { mp.players.exists(entity) && 0 !== entity.handle && entity.taskPlayAnim(anim[0], anim[1], 1, 0, -1, parseInt(anim[2]), 1, !1, !1, !1) }) } } } }, }); mp.events.addDataHandler("animData", function(a, b) { if (0 !== a.handle) if (null != b) { const c = b.split("%"); loadAnimDict(c[0], function() { mp.players.exists(a) && 0 !== a.handle && (a.clearTasksImmediately(), a.taskPlayAnim(c[0], c[1], 1, 0, -1, parseInt(c[2]), 1, !1, !1, !1)) }) } //else a.clearTasksImmediately() }); function loadAnimDict(a, b) { if (mp.game.streaming.hasAnimDictLoaded(a)) return void b(); mp.game.streaming.requestAnimDict(a); let c = setInterval(function() { mp.game.streaming.hasAnimDictLoaded(a) && (clearInterval(c), b()) }, 100) } Server-side: player.playAnimation(dist, name, speed, flag); player.setVariable("animData", `${dist}%${name}%${flag}`); Stop animation: player.playAnimation("rcmcollect_paperleadinout@","kneeling_arrest_get_up", 1, 33); player.setVariable("animData", null);
    1 point
  4. Nah, nevermind. I found a fix. Updated this in here and here.
    1 point
×
×
  • Create New...