igotnothing Posted March 7 Share Posted March 7 how do i change NPC model and pedtype with cleo? Link to comment Share on other sites More sharing options...
ArmanCan Posted March 8 Share Posted March 8 9 hours ago, igotnothing said: how do i change All peds, weapons, vehicles and some objects are already described in Sanny Builder and if i remember correctly it is impossible to change or add a new one.. #ARMY - 287 // Model Name - Model ID #AK47 - 355 // Model Name - Model ID #KART - 571 // Model Name - Model ID #BOMB - 364 // Model Name - Model ID All you can do is change the peds by correctly rigging via 3DMax or Zmodeler, export it to a "txd" and "dff" file and tweak the initiated ped files in "Data" and "Models" folders igotnothing 1 Link to comment Share on other sites More sharing options...
vladvo Posted March 10 Share Posted March 10 (edited) Maybe something like that. Find a char. Get his model. If model is the one you want to change - then delete char and create another one at exactly the same coordinate. :FIND_CHAR 0AE1: [email protected] = random_char_near_point [email protected] [email protected] [email protected] in_radius 25.0 find_next 1 pass_deads 1 0665: get_actor [email protected] model_to [email protected] :CHECK_MODEL wait 0 8039: not [email protected] == 28 //28 is the model you want to replace jf @FIND_CHAR 00A0: store_actor [email protected] position_to [email protected] [email protected] [email protected] 0172: [email protected] = actor [email protected] Z_angle 009B: destroy_actor [email protected] 009A: [email protected] = create_actor_pedtype 17 model %put_desired_moel_here% at [email protected] [email protected] -100.0 0173: set_actor [email protected] Z_angle_to [email protected] Edited March 10 by vladvo Link to comment Share on other sites More sharing options...
Jack Posted March 13 Share Posted March 13 On 3/7/2023 at 11:56 PM, igotnothing said: how do i change NPC model and pedtype with cleo? :changePedModel // [email protected] - actorHandle; [email protected] - newModelID 0226: [email protected] = actor [email protected] health if [email protected] == 100 then // if (CStreaming::ms_aInfoForModel[newModelID].m_nLoadState == LOADSTATE_LOADED) { if 0248: model [email protected] available then // DWORD savedAnimGroup = ped->m_dwAnimGroup; 0A96: [email protected] = actor [email protected] struct 0A8E: [email protected] = [email protected] + 0x4D4 // m_dwAnimGroup from CPed 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 // ped->DeleteRwObject(); 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 0A8E: [email protected] = [email protected] + 0x20 // DeleteRwObject from CEntityVtbl 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 0AA6: call_method [email protected] struct [email protected] num_params 0 pop 0 // ped->m_nModelIndex = -1; 0A8E: [email protected] = [email protected] + 0x22 // m_nModelIndex from CEntity 0A8C: write_memory [email protected] size 2 value -1 virtual_protect 0 // ped->SetModelIndex(newModelID); 0A8E: [email protected] = [email protected] + 0x14 // SetModelIndex from CEntityVtbl 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 0AA6: call_method [email protected] struct [email protected] num_params 1 pop 0 [email protected] // ped->m_dwAnimGroup = savedAnimGroup; 0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 0 0223: set_actor [email protected] health_to 99 else 0247: load_model [email protected] // CStreaming::RequestModel(newModelID, 0x0C); 038B: load_requested_models // CStreaming::LoadAllRequestedModels(false); end end 0AB2: cleo_return 0 Call it like this: 0AB1: cleo_call @ChangePedModel params 2 param1 [email protected] param2 #SWAT where [email protected] (param1) is a ped handle and MODEL_SWAT is just a showcase. igotnothing and vladvo 2 Wanted Level Editor Gore Level Effect [III] My YouTube Channel Link to comment Share on other sites More sharing options...
igotnothing Posted March 18 Author Share Posted March 18 On 3/13/2023 at 8:16 PM, Jack said: :changePedModel // [email protected] - actorHandle; [email protected] - newModelID 0226: [email protected] = actor [email protected] health if [email protected] == 100 then // if (CStreaming::ms_aInfoForModel[newModelID].m_nLoadState == LOADSTATE_LOADED) { if 0248: model [email protected] available then // DWORD savedAnimGroup = ped->m_dwAnimGroup; 0A96: [email protected] = actor [email protected] struct 0A8E: [email protected] = [email protected] + 0x4D4 // m_dwAnimGroup from CPed 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 // ped->DeleteRwObject(); 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 0A8E: [email protected] = [email protected] + 0x20 // DeleteRwObject from CEntityVtbl 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 0AA6: call_method [email protected] struct [email protected] num_params 0 pop 0 // ped->m_nModelIndex = -1; 0A8E: [email protected] = [email protected] + 0x22 // m_nModelIndex from CEntity 0A8C: write_memory [email protected] size 2 value -1 virtual_protect 0 // ped->SetModelIndex(newModelID); 0A8E: [email protected] = [email protected] + 0x14 // SetModelIndex from CEntityVtbl 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 0AA6: call_method [email protected] struct [email protected] num_params 1 pop 0 [email protected] // ped->m_dwAnimGroup = savedAnimGroup; 0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 0 0223: set_actor [email protected] health_to 99 else 0247: load_model [email protected] // CStreaming::RequestModel(newModelID, 0x0C); 038B: load_requested_models // CStreaming::LoadAllRequestedModels(false); end end 0AB2: cleo_return 0 Call it like this: 0AB1: cleo_call @ChangePedModel params 2 param1 [email protected] param2 #SWAT where [email protected] (param1) is a ped handle and MODEL_SWAT is just a showcase. thank you so much Jack 1 Link to comment Share on other sites More sharing options...