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.

MrEuphrates

Members
  • Joined

  • Last visited

  1. Ok thank you for your help I will try other things and if I find a solution I will share it here.
  2. Ok so I tried this params = {} params.speechName = "FAREWELL" params.voiceName = "0479_U_M_M_VALGUNSMITH_01" params.v3 = 1 params.speechParamHash = 0x67F3AB43 params.entity = 0 params.v6 = true params.v7 = 1 params.v8 = 1 Citizen.InvokeNative(0x8E04FEDD28D42462, cl, params) and got this error SCRIPT ERROR: Invalid Lua type in __data Pointing to the line where I Invoked the native.
  3. Yes you can use this line I had in my example Citizen.InvokeNative(0x283978a15512b2fe, clerk, true) -- You can invoke natives like this too
  4. Exactly! It doesn't make any sense. and it's not only lua I thought I could write it in c# but it doesn't work either. They put your c++ solution in description but it can't be achieved with what they gave. In both lua and c# params is a returned value by the native.
  5. This function PlayPedAmbientSpeechNative() Used to be called. PlayAmbientSpeech1() (They recently changed the name of the function.) And it basically invokes the native _PLAY_AMBIENT_SPEECH1. Here is a link to the native document: https://vespura.com/doc/natives/?_0x8E04FEDD28D42462 The problem is even though it's in the natives document I cannot pass any parameters into it. I see that you have to give it a struct that holds the parameters in c++ but you can't do that in lua. And here is a code example that spawn peds at pre-defined positions: Citizen.CreateThread(function() clerkHash = GetHashKey(store.ClerkModel) pos = Config.Stores[1].pos heading = Config.Stores[1].hdg if IsModelInCdimage(clerkHash) and IsModelValid(clerkHash) then RequestModel(clerkHash) while not HasModelLoaded(clerkHash) do RequestModel(clerkHash) Wait(0) end clerk = CreatePed(clerkHash, pos.x, pos.y, pos.z, hdg, 1, 1, 0, 0) SetModelAsNoLongerNeeded(clerkHash) Citizen.InvokeNative(0x283978a15512b2fe, clerk, true) -- You can invoke natives like this too end end)
  6. There is this line in Natives local retval --[[ boolean ]], params --[[ Any ]] = PlayPedAmbientSpeechNative( ped --[[ Ped ]] ) And this as a description struct ScriptedSpeechParams { const char* speechName; const char* voiceName; alignas(8) int v3; alignas(8) Hash speechParamHash; alignas(8) Entity entity; alignas(8) BOOL v6; alignas(8) int v7; alignas(8) int v8; }; static_assert(sizeof(ScriptedSpeechParams) == 0x40, "incorrect ScriptedSpeechParams size"); Example: ScriptedSpeechParams params{"RE_PH_RHD_V3_AGGRO", "0405_U_M_M_RhdSheriff_01", 1, 0x67F3AB43, 0, true, 1, 1}; _PLAY_AMBIENT_SPEECH1(PLAYER_PED_ID(), (Any*)&params); When I found the code in the description here I thought there was a way to do it in lua for RedM but I guess not. I cannot give params to this function no matter what I do. I think this function just doesn't work in RedM.
  7. Oh, I see... I am creating a resource in redm and I don't know if I can do that.
  8. Since all of my resources are in lua I would like to do this in lua too. If there is no other way I can change it to c++. If you can think of any other way to do it in lua please tell. Thanks.
  9. Hi, I know this topic is solved but is there anyway I can use this in lua. Because lua version of PLAY_AMBIENT_SPEECH1 only accepts ped as param.

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.