Log in to reply
 

Is it possible to create a ped from a ped's hash?



  • I am trying to recreate specific peds (clothes, face etc) for a script mod.

    For example if I spawn a ped of model (code is vb.net):
    CreatedPed = World.CreatePed(New Model(PedHash.Hooker01SFY), Game.Player.Character.Position.Around(3))

    The ped will spawn with a lot of random characteristics like face, clothes, skintone, hair etc. I am assuming that when i get the peds hash (not model hash)
    for example:

    Dim Pedhash as integer = CreatedPed.gethashcode

    that this hashcode is what holds this random information. I tried using a script to create 100,000 peds and delete instantly if NOT the hashcode I'm looking for and still didn't get the exact pedhash (52023) i was looking for which had spawned previously

    Is it possible at all to create a ped with a specific pedhash (not modelhash) code or even to apply it to an existing one?



  • GetHashCode doesn't return the ped's model/clothing. It returns the ped's handle, the ID set by the game.

    You'll have to use these natives to get the clothing for each body part:
    GET_PED_DRAWABLE_VARIATION
    GET_PED_TEXTURE_VARIATION
    GET_PED_PALETTE_VARIATION

    And set clothing with this one:
    SET_PED_COMPONENT_VARIATION



  • Thank You, that's very helpful and I was way off assuming about the hashcode. I'll try this method


Log in to reply
 

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