GetPlayerPed(-1) is an old habit from the older games like GTA IV and before, in V there’s PlayerPedId() which should be used and is also much faster.
Hence in newer games such as RDR3 (Red Dead Redemption 2) GetPlayerPed(-1) doesn’t even work anymore.