Jump to content
View in the app

A better way to browse. Learn more.

RDR2Mods.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Me myself and I

Members
  • Joined

  • Last visited

Everything posted by Me myself and I

  1. Me myself and I commented on admin's native in PED
    For anyone using C#, I've had a couple headaches figuring it out, so here's my code: Get ped nearby peds unsafe List<Ped> GetNearbyPeds(Ped p, int maxPeds = 50) { int[] buffer = new int[maxPeds * 2 + 2]; buffer[0] = maxPeds; List<Ped> foundPeds = new List<Ped>(); fixed (int* pBuffer = buffer) { int foundCount = Function.Call<int>(Hash.GET_PED_NEARBY_PEDS, p, pBuffer, -1, 0); for (int i = 0; i < foundCount; i++) { int pedHandle = buffer[i * 2 + 2]; Ped nearbyPed = new Ped(pedHandle); foundPeds.Add(nearbyPed); } } return foundPeds; } The function deals with a ton of memory, so it needs to be unsafe. For some reason, the first index for the buffer, where the list of handles will go, needs to have the amount of peds, and the second is garbage data, so it'll be empty. It starts at the 2 index, and every other index will be full of garbage. Using fixed (int* pBuffer = buffer) is required so that the garbage collector doesn't change the address of the buffer, which is why it's also used to create the pointer. The return of the function will contain the amount of peds found, which will usually, though not always, be the same amount as the amount of peds that you wanted. The function requires p, which will be the ped that we will search around, and the pointer to the buffer, though not the buffer itself, because it will change the data of the address that you give it. If you give it an object, it will crash. The -1 refers to the type of peds that will be filtered, and while I don't know what the other numbers do, -1 returns all peds. No one knows what the third argument does. Whenever you want to access a handle, you need to first skip the first two, which contain the amount of peds and garbage data respectively, and then multiply your index by two, because every other index has garbage data that will not hesitate to crash the game.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.