Log in to reply

[Help] GET_PED_TYPE function crashes game [Edit] GET_PED_TYPE not working properly

  • I have been trying to retrieve ped types from peds so I can do more stuff with the returned integers but when I use the GET_PED_TYPE function, the game crashes. I have tried a couple different ped IDs but all of them so far just crash the game. I would really appreciate it if someone could tell me what I'm screwing up. Thanks!

    Ped IDs:

    [Edit] Pretty sure I was using an outdated list of uints that didn't function correctly on PC. Realizing I had probably made a rookie mistake, I used a string as the one and only input for the function instead of a uint and it took it. (Ex. "a_f_o_soucent_01" (Although "Soucent01AMM" doesn't crash the game - it just returns zero.)) I figured this would solve the crashing problem but sadly, it did not. The game still crashes. Am I not supposed to use the ped models? If not, then what am I supposed to input there???

    [Edit #2] Well I got to the point where the game doesn't crash anymore.(Still haven't really gotten anywhere though) Now, the only thing that the function returns is zero. The function on http://dev-c.com/nativedb/ explains that 0 = Michael. The different kinds of inputs I tried include Ex. PedHash.Soucent01AMM.ToString(), (uint)PedHash.Soucent01AMM, long, UInt32, Int32. So now I have NO clue what kind of input I'm supposed to use to get this thing to work. (I have been using this function on Michael and I switched over to Franklin to see if it was just returning the ped value for the game character but it still returns zero(Franklin = 1 is what the website says.).)

  • Ped plrPed = Game.Player.Character;
    int pedType = Function.Call<int>(Hash.GET_PED_TYPE, plrPed);

Log in to reply

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.