Example #1
0
        public static Vehicle CreateVehicle(Model model, Vector3 position)
        {
            model.Load();
            var car = Internal.Function.Call<Vehicle>(0x00a5, model, position);
            model.Release();

            return car;
        }
Example #2
0
        public static Pickup CreatePickup(Vector3 position, Model model, PickupType type)
        {
            model.Load();

            var retval = Internal.Function.Call<Pickup>(0x0213, model, (int)type, position);
            PickupHandler.Register(retval);

            model.Release();

            retval._origPos = position;
            return retval;
        }
Example #3
0
        public static Ped CreatePed(Model model, Vector3 position, int pedtype)
        {
            if (model.ID >= 290 && model.ID <= 299)
            {
                return Internal.Function.Call<Ped>(0x009a, pedtype, model, position);
            }

            model.Load();
            var ped = Internal.Function.Call<Ped>(0x009a, pedtype, model, position);
            model.Release();

            return ped;
        }