Sign in to follow this  
Maksimo007

C# PedHash

Recommended Posts

Hello,

I want to create a Ped with the model ShopLowSFY. I used the following clientside statements:

Vector3 pos = (Vector3) args[0];
uint hash = Convert.ToUInt32(args[2]);
float heading = (float)args[1];
RAGE.Elements.Ped ped = new RAGE.Elements.Ped(hash, pos, heading);

At serverside I passed the arguments like this:

NAPI.ClientEvent.TriggerClientEvent(client, "create_ped_event", client.Position, client.Heading, NAPI.Util.PedNameToModel(model));

The problem is that the hash must be a uint but the model's hash is -1452399100.

How can I solve that?

Edited by Maksimo007

Share this post


Link to post
Share on other sites
uint freeroamHash = RAGE.Game.Misc.GetHashKey("mp_m_freemode_01"); 

RAGE.Elements.Ped ped = new RAGE.Elements.Ped(freeroamHash, new RAGE.Vector3(0.0f, 0.0f, 0.0f), dimension: 5);

0.3.7 c# implementation (info from announcement)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.