예제 #1
0
        public async void StartCreationOfCharacter2(dynamic charsid, dynamic charxx)
        {
            API.DoScreenFadeOut(500);

            Tick   += OnTick;
            charidx = charsid;
            usedcha = charxx;
            Tick   += OnTickCameras;
            Function.Call(Hash._REQUEST_IMAP, 183712523);
            Function.Call(Hash._REQUEST_IMAP, -1699673416);
            Function.Call(Hash._REQUEST_IMAP, 1679934574);
            Function.Call(Hash.SET_CLOCK_TIME, 12, 00, 0);
            API.SetClockTime(12, 00, 00);

            Miscellanea.TeleportToCoords(-563.1345f, -3775.811f, 237.60f);
            await CreationSelectPeds();
            await CreateCams();


            API.SetCamActive(Camera, true);
            API.RenderScriptCams(true, true, 1000, true, true, 0);

            isSelectSexActive = true;
            secondchance      = true;
            API.DoScreenFadeIn(500);
        }
예제 #2
0
        private async void CreationSexPed(string model, int camedit)
        {
            model_selected    = model;
            skinPlayer["sex"] = model;


            if (model_selected == model_m)
            {
                skinPlayer["albedo"]             = API.GetHashKey("mp_head_mr1_sc08_c0_000_ab");
                texture_types["albedo"]          = API.GetHashKey("mp_head_mr1_sc08_c0_000_ab");
                texture_types["normal"]          = API.GetHashKey("mp_head_mr1_000_nm");
                texture_types["material"]        = 0x7FC5B1E1;
                texture_types["color_type"]      = 1;
                texture_types["texture_opacity"] = 1.0f;
                texture_types["unk_arg"]         = 0;
            }
            else
            {
                skinPlayer["albedo"]             = API.GetHashKey("mp_head_fr1_sc08_c0_000_ab");
                texture_types["albedo"]          = API.GetHashKey("mp_head_fr1_sc08_c0_000_ab");
                texture_types["normal"]          = API.GetHashKey("head_fr1_mp_002_nm");
                texture_types["material"]        = 0x7FC5B1E1;
                texture_types["color_type"]      = 1;
                texture_types["texture_opacity"] = 1.0f;
                texture_types["unk_arg"]         = 0;
            }


            Debug.WriteLine(model);
            await Delay(200);

            int pID    = API.PlayerId();
            int pPedID = API.PlayerPedId();

            Menus.MainMenu.GetMenu();
            Miscellanea.TeleportToCoords(-558.3258f, -3781.111f, 237.60f, 93.2f);
            API.FreezeEntityPosition(pPedID, true);
            uint model_hash = (uint)API.GetHashKey(model);
            await Miscellanea.LoadModel(model_hash);

            Function.Call((Hash)0xED40380076A31506, pID, model_hash, true);
            Function.Call((Hash)0x283978A15512B2FE, pPedID, true);
            API.RenderScriptCams(false, true, 3000, true, true, 0);
            await Delay(2500);

            API.SetCamActive(Camera_Editor, true);
            API.RenderScriptCams(true, true, 1000, true, true, 0);
            API.DeletePed(ref PedFemale);
            API.DeletePed(ref PedMale);
            isInCharCreation = true;
            Menus.MainMenu.GetMenu().OpenMenu();

            //MenuCreateCharacter(model);
        }
예제 #3
0
        public async void StartCreationOfCharacter()
        {
            Tick += OnTick;
            Tick += OnTickAnimm;
            Tick += OnTickCameras;

            /*
             * Cargamos los modelos del mapa de creación del online de RDR2
             */
            Function.Call(Hash._REQUEST_IMAP, 183712523);
            Function.Call(Hash._REQUEST_IMAP, -1699673416);
            Function.Call(Hash._REQUEST_IMAP, 1679934574);

            /*
             * Cambiamos el tiempo para que se vea de mañana
             */
            Function.Call(Hash.SET_CLOCK_TIME, 12, 00, 0);
            API.SetClockTime(12, 00, 00);

            Miscellanea.TeleportToCoords(-563.1345f, -3775.811f, 237.60f);

            /*
             * Cargammos las Peds en el sitio
             */
            await CreationSelectPeds();

            /*
             * Creamos las camaras para movernos de sala con ella y la activamos
             */
            await CreateCams();

            /*
             * Esperamos un tiempo a que pueda cargar los modelos y el tiempo
             */

            API.SetCamActive(Camera, true);
            API.RenderScriptCams(true, true, 1000, true, true, 0);

            isSelectSexActive = true;
        }
예제 #4
0
        public async void StartCreationOfCharacter()
        {
            Tick += OnTick;

            Tick += OnTickCameras;
            Function.Call(Hash._REQUEST_IMAP, 183712523);
            Function.Call(Hash._REQUEST_IMAP, -1699673416);
            Function.Call(Hash._REQUEST_IMAP, 1679934574);
            Function.Call(Hash.SET_CLOCK_TIME, 12, 00, 0);
            API.SetClockTime(12, 00, 00);

            Miscellanea.TeleportToCoords(-563.1345f, -3775.811f, 237.60f);
            await CreationSelectPeds();
            await CreateCams();


            API.SetCamActive(Camera, true);
            API.RenderScriptCams(true, true, 1000, true, true, 0);

            isSelectSexActive = true;
            secondchance      = false;
        }
예제 #5
0
        private async void CreationSexPed(string model, int camedit)
        {
            model_selected    = model;
            skinPlayer["sex"] = model;

            await Delay(200);

            int pID    = API.PlayerId();
            int pPedID = API.PlayerPedId();

            Menus.MainMenu.GetMenu();
            Miscellanea.TeleportToCoords(-558.3258f, -3781.111f, 237.60f, 93.2f);
            API.FreezeEntityPosition(pPedID, true);
            uint model_hash = await Miscellanea.GetHash(model);

            if (model_selected == model_m)
            {
                //SetPlayerDebugBodyComponent(PedMale, (uint)SkinsUtils.WAIST_TYPES.ElementAt(0));

                skinPlayer["albedo"] = await Miscellanea.GetHash("mp_head_mr1_sc08_c0_000_ab");

                texture_types["albedo"] = await Miscellanea.GetHash("mp_head_mr1_sc08_c0_000_ab");

                texture_types["normal"] = await Miscellanea.GetHash("mp_head_mr1_000_nm");

                texture_types["material"]        = 0x7FC5B1E1;
                texture_types["color_type"]      = 1;
                texture_types["texture_opacity"] = 1.0f;
                texture_types["unk_arg"]         = 0;
            }
            else
            {
                skinPlayer["albedo"] = await Miscellanea.GetHash("mp_head_fr1_sc08_c0_000_ab");

                texture_types["albedo"] = await Miscellanea.GetHash("mp_head_fr1_sc08_c0_000_ab");

                texture_types["normal"] = await Miscellanea.GetHash("head_fr1_mp_002_nm");

                texture_types["material"]        = 0x7FC5B1E1;
                texture_types["color_type"]      = 1;
                texture_types["texture_opacity"] = 1.0f;
                texture_types["unk_arg"]         = 0;
            }
            Function.Call((Hash)0xED40380076A31506, pID, model_hash, true);
            Function.Call((Hash)0x283978A15512B2FE, pPedID, true);
            while (!API.DoesEntityExist(API.PlayerPedId()))
            {
                await Delay(100);
            }
            while (!Function.Call <bool>((Hash)0xA0BC8FAED8CFEB3C, API.PlayerPedId()))
            {
                await Delay(100);
            }
            ApplyDefaultSkin(API.PlayerPedId());

            API.RenderScriptCams(false, true, 3000, true, true, 0);
            await Delay(2500);

            API.SetCamActive(Camera_Editor, true);
            API.RenderScriptCams(true, true, 1000, true, true, 0);
            API.DeletePed(ref PedFemale);
            API.DeletePed(ref PedMale);
            isInCharCreation = true;
            Menus.MainMenu.GetMenu().OpenMenu();

            //MenuCreateCharacter(model);
        }