elchoky10 3 Posted December 3, 2019 Share 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 Link to comment Share on other sites More sharing options...
LMS 673 Posted December 3, 2019 Share Posted December 3, 2019 9 hours ago, elchoky10 said: I want to learn how make scripts but well i just need to ask if this is ok.. - snip - It looks fine to me, is something not working as expected? Quote Link to comment Share on other sites More sharing options...
elchoky10 3 Posted December 3, 2019 Author Share Posted December 3, 2019 (edited) 1 hour ago, LMS said: It looks fine to me, is something not working as expected? 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 Link to comment Share on other sites More sharing options...
LMS 673 Posted December 3, 2019 Share Posted December 3, 2019 6 minutes ago, 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? 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 Link to comment Share on other sites More sharing options...
elchoky10 3 Posted December 3, 2019 Author Share Posted December 3, 2019 (edited) 5 minutes ago, 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? 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 Link to comment Share on other sites More sharing options...
LMS 673 Posted December 3, 2019 Share Posted December 3, 2019 1 hour ago, 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? 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 Link to comment Share on other sites More sharing options...
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.