public async static Task <Lawman> CreateLawman(Vector3 pos, float hdg = 0F) { // Horse string horseModel = horseModels[random.Next(horseModels.Count)]; await LoadModel(API.GetHashKey(horseModel)); int horse = API.CreatePed((uint)API.GetHashKey(horseModel), pos.X, pos.Y, pos.Z, hdg, true, true, true, true); Function.Call((Hash)0x283978A15512B2FE, horse, true); // Lawman await LoadModel(API.GetHashKey("S_M_M_DispatchLawRural_01")); int ped = API.CreatePedOnMount(horse, (uint)API.GetHashKey("S_M_M_DispatchLawRural_01"), -1, true, true, true, true); int blip = Function.Call <int>((Hash)0x23F74C2FDA6E7C61, 662885764, ped); // Weapon GiveWeaponToPed(ped, WeaponHash.PistolMauser); return(new Lawman { Horse = horse, Ped = ped, Blip = blip }); }