Hey XenonValstrax I just uploaded a mod where you can move your camera when the player is dead. Check it out since I made it with your mod in mind, and lmk if it doesn't work lol
Great to know! I'll add your mod in the recommended list. Thanks for your work! Sorry that I couldn't check it out in game for now since I've uninstalled the game and there's not enough disk space to install it back. =(
However may I know how you achieve that? I tried nearly all native functions about camera in native.h while developing this mod and none of them works...
Well to summarize how I was able to get to the finish mod I had 4 functions
One to initialize the Deathcam One to destroy the Deathcam after death One to process the cams controls of the cam when dead One to process the cam's position
But ye after a while or so trying to crack down a way to get this mod to work on my own and with the added bonus of being a new to modding it was beginning to seem a bit questionable. So I went to seek inspiration from redm and fivem to try to understand what they were able to do to make their deathcam mods work, because I saw multiple instances of deathcams being used in RP. And by looking through the FiveMGitHub and RedM Github lua code, I was able to get pointed in the right direction from there :)
Also, I know that you said you may have lost the source code to your mod, but do you remember how you got to your finished mod?? Just curious to know how you got it :)
Well, maybe I didn't lose the code actually...maybe. It might be on my old PC, and that old PC is not on my side currently. There's long time until I could get it back.
There's a native function that pauses death & arrest screen until it was released (Yeah it works for arrest too). I think it might be this one : MISC::PAUSE_DEATH_ARREST_RESTART(BOOL toggle) // 0x66AB6B6C7E72F393 0x296574AE b1207And we have to call it with true in a while loop so the game won't think it was released, until a specified condition was met (like pressing a key) This native function exists in GTA5 too (with a different offset 0x2C2B3493FBF51C71). And the GTA5 mod I mentioned in description tab used pretty the same thing. Therefore some issues such as locking camera or being messed up when died in missions exist in both mods. We don't have to know why Rockstar create this weird function, just use it.
As you described, you mean you done this by creating a new camera and making it work like the gameplay camera? Good idea. I tried this way tbh, but the documents and native DB is not that comprehensive at that time so there's always mass of glitches that I have to give it up. Glad that you finally made it!
Thanks! That's interesting never knew about that line of code lol. Glad our mods can be used together! It's like were connecting a puzzle, and now we just need the audio portion for when the player dies.
If you could revamp this mod to make it 'better' because when a player dies, there is a custom death sound effect that plays depending on if you're Arthur or John and using this mod, you can't hear this voice lines. Also, when a player dies, the enemies keep shooting the player even when they are dead.
I'd like to know what that custom sound effect is since I didn't make any changes other than making the dead scene longer. For the enemy issue - It's Rockstar's problem, or maybe there're still wanted levels on player after death.
Actually add a function that makes everyone ignores dead player might avoid the enemy issue. But not sure if this will bring any others and, More important is that I've lost the source code xD
Don't know if it's worth anything, but the mod begins to work like the GTAV Afterdeath mod. If you die and then go to change your model, you respawn without needing to go through the whole "DEAD" screen, bringing you back where you died. Just thought it was interesting, maybe a clue to make it like GTAV's.
It's not recommended to use this plugin while in mission. Actually I didn't have any plan to fix this for now since force disabling the death screen is very buggy itself. The GTA5 version got the same issue too.
24 comments
the dead screen show up after you die
DeathCam
DeathCam
However may I know how you achieve that? I tried nearly all native functions about camera in native.h while developing this mod and none of them works...
One to initialize the Deathcam
One to destroy the Deathcam after death
One to process the cams controls of the cam when dead
One to process the cam's position
But ye after a while or so trying to crack down a way to get this mod to work on my own and with the added bonus of being a new to modding it was beginning to seem a bit questionable. So I went to seek inspiration from redm and fivem to try to understand what they were able to do to make their deathcam mods work, because I saw multiple instances of deathcams being used in RP. And by looking through the FiveMGitHub and RedM Github lua code, I was able to get pointed in the right direction from there :)
Also, I know that you said you may have lost the source code to your mod, but do you remember how you got to your finished mod?? Just curious to know how you got it :)
There's a native function that pauses death & arrest screen until it was released (Yeah it works for arrest too). I think it might be this one :
MISC::PAUSE_DEATH_ARREST_RESTART(BOOL toggle) // 0x66AB6B6C7E72F393 0x296574AE b1207
And we have to call it with true in a while loop so the game won't think it was released, until a specified condition was met (like pressing a key)This native function exists in GTA5 too (with a different offset 0x2C2B3493FBF51C71). And the GTA5 mod I mentioned in description tab used pretty the same thing. Therefore some issues such as locking camera or being messed up when died in missions exist in both mods. We don't have to know why Rockstar create this weird function, just use it.
As you described, you mean you done this by creating a new camera and making it work like the gameplay camera? Good idea. I tried this way tbh, but the documents and native DB is not that comprehensive at that time so there's always mass of glitches that I have to give it up. Glad that you finally made it!
Actually add a function that makes everyone ignores dead player might avoid the enemy issue. But not sure if this will bring any others and, More important is that I've lost the source code xD