Maksimo007 Posted September 16, 2019 Posted September 16, 2019 (edited) 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 September 16, 2019 by Maksimo007
Ritmanet Posted September 17, 2019 Posted September 17, 2019 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)
Maksimo007 Posted September 17, 2019 Author Posted September 17, 2019 Oh yes, thank you! I tried that before but I used the wrong model names. Thanks!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now