elchoky10 3 Posted December 3, 2019 Posted December 3, 2019 I want to learn how make scripts but well i just need to ask if this is ok.. Spawn Option addTitle("Vehicles"); addOption("Spawn a POLICE WAGON"); // option 1 if (optionPress && getOption() == 1) { printf("SPAWN BUTTON PRESSED"); Entity ent = PLAYER::PLAYER_PED_ID(); // GET THE ENTITY printf("Entity Player:", ent); SpawnVehicle("POLICEWAGON01X"); printf("TRY POLICWAGON01X"); //if (PED::IS_PED_ON_MOUNT(ent) == false) { //} } normalMenuActions(); SpawnVehicle fuc Entity ent = PLAYER::PLAYER_PED_ID(); printf("Entity Player FUNCTION VEHICLE:", ent); Vector3 pos = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(ent, 3.0, 2.0, 0); printf("Post: ", pos); DWORD Hash = MISC::GET_HASH_KEY(VehicleModel);; printf("Hash for model:", Hash); VEHICLE::CREATE_VEHICLE(Hash, pos.x, pos.y, pos.z, ENTITY::GET_ENTITY_HEADING(ent), false, false,false,false); Quote
LMS 681 Posted December 3, 2019 Posted December 3, 2019 On 12/3/2019 at 5:53 AM, elchoky10 said: I want to learn how make scripts but well i just need to ask if this is ok.. - snip - Expand It looks fine to me, is something not working as expected? Quote
elchoky10 3 Posted December 3, 2019 Author Posted December 3, 2019 (edited) On 12/3/2019 at 3:32 PM, LMS said: It looks fine to me, is something not working as expected? Expand Spawn ped are invisible //invisible horse Hash ped = MISC::GET_HASH_KEY("A_C_Horse_TennesseeWalker_Chestnut"); Entity player = PLAYER::PLAYER_PED_ID(); Vector3 playerCor = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(player, 0,5,0); Entity spawn = PED::CREATE_PED(ped, playerCor.x, playerCor.y, playerCor.z, 0.f, false, false, true, true, true, true); I think the problem are some bools in the native create_ped any trainer maker have a example or how this create_ped has to be filled? Edited December 3, 2019 by elchoky10 Quote
LMS 681 Posted December 3, 2019 Posted December 3, 2019 On 12/3/2019 at 4:41 PM, elchoky10 said: Spawn ped are invisible //invisible horse Hash ped = MISC::GET_HASH_KEY("A_C_Horse_TennesseeWalker_Chestnut"); Entity player = PLAYER::PLAYER_PED_ID(); Vector3 playerCor = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(player, 0,5,0); Entity spawn = PED::CREATE_PED(ped, playerCor.x, playerCor.y, playerCor.z, 0.f, false, false, true, true, true, true); I think the problem are some bools in the native create_ped any trainer maker have a example or how this create_ped has to be filled? Expand You need to call a native to reset the peds components after creation to make it visible. If you are using Alex's ScripHook, that native is called PED::SET_PED_VISIBLE. You can find it here too: Quote
elchoky10 3 Posted December 3, 2019 Author Posted December 3, 2019 (edited) On 12/3/2019 at 4:50 PM, LMS said: You need to call a native to reset the peds components after creation to make it visible. If you are using Alex's ScripHook, that native is called PED::SET_PED_VISIBLE. You can find it here too: No i using tuxi, i see this with same hash static void _0x283978A15512B2FE(Any p0, Any p1), supose is fir p0 the entityt Ped? and the other a true? Expand i HAVE TOO THE IS_ENTITY_VISIBLE(Entity entity) _NETWORK_SET_ENTITY_INVISIBLE_TO_NETWORK(Entity entity, BOOL toggle) SET_ENTITY_VISIBLE(Any p0, Any p1) 0x1794B4FCC84D812F Edited December 3, 2019 by elchoky10 Quote
LMS 681 Posted December 3, 2019 Posted December 3, 2019 On 12/3/2019 at 4:54 PM, elchoky10 said: No i using tuxi, i see this with same hash static void _0x283978A15512B2FE(Any p0, Any p1), supose is fir p0 the entityt Ped? and the other a true? Expand Yes, you can call it with ped, true and it should work. The other natives you listed unfortunately do not have any effect on this. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.