Zambini Posted February 28 Share Posted February 28 I remember the old layout when the code was arranged correctly but now it's all in a straight line. Tried every browser and still the same. Here's how it displays https://ibb.co/DtXpMVM Link to comment Share on other sites More sharing options...
ZAZ Posted February 28 Share Posted February 28 The old code block format is broken, because of forums software update You must correct it by manual word wrap This needs to know where a new line begins CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Zambini Posted February 28 Author Share Posted February 28 21 minutes ago, ZAZ said: The old code block format is broken, because of forums software update You must correct it by manual word wrap This needs to know where a new line begins Urgh. I was trying to follow along your cleo tutorial but it's literally impossible! And how do you do it by word wrap? Can you correct the last 2 comments by Silent and Wesser on this page: https://gtaforums.com/topic/737166-how-to-attach-object-on-left-hand-while-handle-weapon/ And save it as txt then post it? Not being lazy but I'm completely unfamiliar with that and don't know what goes where. Link to comment Share on other sites More sharing options...
ArmanCan Posted February 28 Share Posted February 28 (edited) 56 minutes ago, Zambini said: I remember the old layout when the code was arranged correctly but now it's all in a straight line. Tried every browser and still the same. Here's how it displays https://ibb.co/DtXpMVM entering the topic with http://web.archive.org/ may help you to correct the display.. Why don't you post the topic here so i may post the code to you 11 minutes ago, Zambini said: Urgh. I was trying to follow along your cleo tutorial but it's literally impossible! And how do you do it by word wrap? Can you correct the last 2 comments by Silent and Wesser on this page: https://gtaforums.com/topic/737166-how-to-attach-object-on-left-hand-while-handle-weapon/ And save it as txt then post it? Not being lazy but I'm completely unfamiliar with that and don't know what goes where. // Usage: 0AB1: call_scm_func @ATEST_ATTACH 6 AS_actor $PLAYER_ACTOR attach_to_object [email protected] offset 0.0 0.0 0.0 on_bone 6 // This SCM function works as code below. // 070A: AS_actor $PLAYER_ACTOR attach_to_object [email protected] offset 0.0 0.0 0.0 on_bone 6 16 perform_animation "NULL" IFP_file "NULL" time 0 // But it affects in only 1 frame. // It means that you have to call this in every frame and you can use this to any objects. :ATEST_ATTACH 0A9F: [email protected] = current_thread_pointer 000A: [email protected] += 0x44 0A96: [email protected] = actor [email protected] struct 0085: [email protected] = [email protected] // (int) 000A: [email protected] += 0x18 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 0AA7: call_function 0x734A40 num_params 1 pop 1 [email protected] [email protected] // _clumpGetFirstSkinAtomicHAnimHierarchy 0012: [email protected] *= 0x4 000A: [email protected] += 0x488 005A: [email protected] += [email protected] // (int) 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 000A: [email protected] += 0x14 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 0A8D: [email protected] = read_memory 0x7C51E0 size 4 virtual_protect 1 if 0039: [email protected] == 0x424548B then 0AA7: call_function 0x7C51E0 num_params 2 pop 2 [email protected] [email protected] [email protected] // _RpHAnimIDGetIndex 0AA7: call_function 0x7C5160 num_params 1 pop 1 [email protected] [email protected] // _RpHAnimHierarchyGetMatrixArray 0012: [email protected] *= 0x40 005A: [email protected] += [email protected] // (int) 0AA5: call 0x7EDDD0 num_params 4 pop 4 [email protected] 1 [email protected] [email protected] else 0AA7: call_function 0x7C51A0 num_params 2 pop 2 [email protected] [email protected] [email protected] // _RpHAnimIDGetIndex 0AA7: call_function 0x7C5120 num_params 1 pop 1 [email protected] [email protected] // _RpHAnimHierarchyGetMatrixArray 0012: [email protected] *= 0x40 005A: [email protected] += [email protected] // (int) 0AA5: call 0x7EDD90 num_params 4 pop 4 [email protected] 1 [email protected] [email protected] end 0177: set_object [email protected] Z_angle_to 0.0 0A98: [email protected] = object [email protected] struct 000A: [email protected] += 0x14 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 000A: [email protected] += -0x14 0AA6: call_method 0x411990 struct [email protected] num_params 0 pop 0 // sub_411990 0AA6: call_method 0x59AD20 struct [email protected] num_params 1 pop 0 [email protected] // _CMatrix__copyTo 0AA6: call_method 0x4241C0 struct [email protected] num_params 1 pop 0 [email protected] // sub_4241C0 000A: [email protected] += 0x18 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 if 8039: not [email protected] == 0 then 000A: [email protected] += 0x4 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 000A: [email protected] += 0x10 0AA6: call_method 0x59AD70 struct [email protected] num_params 1 pop 0 [email protected] // _CMatrix__copyTo end 000A: [email protected] += -0x18 0AA6: call_method 0x532B00 struct [email protected] num_params 0 pop 0 // _RwFrameUpdateObject 0AB2: ret 0 Silent.. {$CLEO} const _CPedIntelligence__GetTaskHold = 0x00600FF0 _CWorld__PlayerInFocus = 0x00B7CD74 _CWorld__Players = 0x00B7CD98 end const _HOOK_PTR_005E784F_CPed__Render = [email protected] _CWorld__PlayersExtras = [email protected] end 0A9F: [email protected] = current_thread_pointer [email protected] += 0x10 // CRunningScript.m_pBaseAddress 0A8D: [email protected] = read_memory [email protected] size 4 vp 0 0A8F: _HOOK_PTR_005E784F_CPed__Render = [email protected] - @_HOOK_PTR_005E784F_CPed__Render 0A8F: _CWorld__PlayersExtras = [email protected] - @_CWorld__PlayersExtras 0A8F: [email protected] = _HOOK_PTR_005E784F_CPed__Render - 0x005E7854 0A8C: write_memory 0x005E784F size 1 value 0xE9 vp 1 0A8C: write_memory 0x005E7850 size 4 value [email protected] vp 1 0A8E: [email protected] = _HOOK_PTR_005E784F_CPed__Render + 1 0A8E: [email protected] = [email protected] + 4 0A8F: [email protected] = _CPedIntelligence__GetTaskHold - [email protected] 0A8C: write_memory [email protected] size 4 value [email protected] vp 0 0A8F: [email protected] = 0x005E7858 - _HOOK_PTR_005E784F_CPed__Render 0A8F: [email protected] = 0x005E787C - _HOOK_PTR_005E784F_CPed__Render 0A8E: [email protected] = _HOOK_PTR_005E784F_CPed__Render + 9 0A8F: [email protected] = [email protected] - 0x0D 0A8C: write_memory [email protected] size 4 value [email protected] vp 0 0A8E: [email protected] = _HOOK_PTR_005E784F_CPed__Render + 0x1C 0A8F: [email protected] = [email protected] - 0x20 0A8C: write_memory [email protected] size 4 value [email protected] vp 0 0A8E: [email protected] = _HOOK_PTR_005E784F_CPed__Render + 0x25 0A8C: write_memory [email protected] size 4 value _CWorld__PlayersExtras vp 0 0A8E: [email protected] = _HOOK_PTR_005E784F_CPed__Render + 0x2D 0A8F: [email protected] = [email protected] - 0x31 0A8C: write_memory [email protected] size 4 value [email protected] vp 0 0A8E: [email protected] = _HOOK_PTR_005E784F_CPed__Render + 0x32 0A8F: [email protected] = [email protected] - 0x36 0A8C: write_memory [email protected] size 4 value [email protected] vp 0 [...] 0A90: [email protected] = 0 * 4 // PLAYERID * sizeof(CPlayerExtraInfo) 005A: [email protected] += _CWorld__PlayersExtras 0A8C: write_memory [email protected] size 1 value true vp 0 // false by default. // Here player1's weapon is always drawn. [...] :_HOOK_PTR_005E784F_CPed__Render hex E8 00000000 // 00000000 call CPedIntelligence::GetTaskHold 85C0 // 00000005 test eax, eax 0F84 00000000 // 00000007 jz CPed::Render+1D8h 8B8E 98050000 // 0000000D mov ecx, [esi+CPed.m_iPedType] 85C9 // 00000013 test ecx, ecx 74 09 // 00000015 jz ped_is_player 83F9 01 // 00000017 cmp ecx, PEDTYPE_PLAYER2 0F85 00000000 // 0000001A jne CPed::Render+1FCh // 00000020 ped_is_player: C1E1 02 // 00000020 shl ecx, 2 8A91 00000000 // 00000023 mov dl, CWorld::PlayersExtras.m_bAlwaysDrawWeapon[ecx] 84D2 // 00000029 test dl, dl 0F84 00000000 // 0000002B jz CPed::Render+1FCh E9 00000000 // 00000031 jmp CPed::Render+1D8h end { class CPlayerExtraInfo ( public: bool m_bAlwaysDrawWeapon; ); CPlayerExtraInfo CWorld::PlayersExtras[2]; } :_CWorld__PlayersExtras hex 00 000000 00 000000 end Wesser.. // This file was decompiled using SASCM.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007 {$CLEO .cs} //-------------MAIN--------------- thread 'TEST' :TEST_11 model.load(#GUN_BOXWEE) model.load(#KNIFECUR) wait 0 if Player.Defined($PLAYER_CHAR) else_jump @TEST_11 if 00E1: player 0 pressed_key 6 else_jump @TEST_11 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.1 0.0 0.0 01B2: give_actor $PLAYER_ACTOR weapon 4 ammo 0 // Load the weapon model before using this 01B9: set_actor $PLAYER_ACTOR armed_weapon_to 4 [email protected] = object.Create(#GUN_BOXWEE,[email protected], [email protected], [email protected]) 070A: AS_actor $PLAYER_ACTOR attach_to_object [email protected] offset 0.0 0.0 0.0 on_bone 5 16 perform_animation "NULL" IFP_file "NULL" time -1 wait 50 jump @PTEST_11 script is above if someone know how to fix please help me, thanks GtaHellModded.. http://web.archive.org/web/20140924175623/http://gtaforums.com/topic/737166-how-to-attach-object-on-left-hand-while-handle-weapon/ I copied them but these needs to be controlled again like ZAZ mentioned before Edited February 28 by ArmanCan Zambini 1 Link to comment Share on other sites More sharing options...
Zambini Posted February 28 Author Share Posted February 28 7 minutes ago, ArmanCan said: entering the topic with http://web.archive.org/ may help you to correct the display.. Why don't you post the topic here so i may post the code to here // Usage: 0AB1: call_scm_func @ATEST_ATTACH 6 AS_actor $PLAYER_ACTOR attach_to_object [email protected] offset 0.0 0.0 0.0 on_bone 6 // This SCM function works as code below. // 070A: AS_actor $PLAYER_ACTOR attach_to_object [email protected] offset 0.0 0.0 0.0 on_bone 6 16 perform_animation "NULL" IFP_file "NULL" time 0 // But it affects in only 1 frame. // It means that you have to call this in every frame and you can use this to any objects. :ATEST_ATTACH 0A9F: [email protected] = current_thread_pointer 000A: [email protected] += 0x44 0A96: [email protected] = actor [email protected] struct 0085: [email protected] = [email protected] // (int) 000A: [email protected] += 0x18 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 0AA7: call_function 0x734A40 num_params 1 pop 1 [email protected] [email protected] // _clumpGetFirstSkinAtomicHAnimHierarchy 0012: [email protected] *= 0x4 000A: [email protected] += 0x488 005A: [email protected] += [email protected] // (int) 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 000A: [email protected] += 0x14 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 0A8D: [email protected] = read_memory 0x7C51E0 size 4 virtual_protect 1 if 0039: [email protected] == 0x424548B then 0AA7: call_function 0x7C51E0 num_params 2 pop 2 [email protected] [email protected] [email protected] // _RpHAnimIDGetIndex 0AA7: call_function 0x7C5160 num_params 1 pop 1 [email protected] [email protected] // _RpHAnimHierarchyGetMatrixArray 0012: [email protected] *= 0x40 005A: [email protected] += [email protected] // (int) 0AA5: call 0x7EDDD0 num_params 4 pop 4 [email protected] 1 [email protected] [email protected] else 0AA7: call_function 0x7C51A0 num_params 2 pop 2 [email protected] [email protected] [email protected] // _RpHAnimIDGetIndex 0AA7: call_function 0x7C5120 num_params 1 pop 1 [email protected] [email protected] // _RpHAnimHierarchyGetMatrixArray 0012: [email protected] *= 0x40 005A: [email protected] += [email protected] // (int) 0AA5: call 0x7EDD90 num_params 4 pop 4 [email protected] 1 [email protected] [email protected] end 0177: set_object [email protected] Z_angle_to 0.0 0A98: [email protected] = object [email protected] struct 000A: [email protected] += 0x14 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 000A: [email protected] += -0x14 0AA6: call_method 0x411990 struct [email protected] num_params 0 pop 0 // sub_411990 0AA6: call_method 0x59AD20 struct [email protected] num_params 1 pop 0 [email protected] // _CMatrix__copyTo 0AA6: call_method 0x4241C0 struct [email protected] num_params 1 pop 0 [email protected] // sub_4241C0 000A: [email protected] += 0x18 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 if 8039: not [email protected] == 0 then 000A: [email protected] += 0x4 0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0 000A: [email protected] += 0x10 0AA6: call_method 0x59AD70 struct [email protected] num_params 1 pop 0 [email protected] // _CMatrix__copyTo end 000A: [email protected] += -0x18 0AA6: call_method 0x532B00 struct [email protected] num_params 0 pop 0 // _RwFrameUpdateObject 0AB2: ret 0 Silent.. {$CLEO} const _CPedIntelligence__GetTaskHold = 0x00600FF0 _CWorld__PlayerInFocus = 0x00B7CD74 _CWorld__Players = 0x00B7CD98 end const _HOOK_PTR_005E784F_CPed__Render = [email protected] _CWorld__PlayersExtras = [email protected] end 0A9F: [email protected] = current_thread_pointer [email protected] += 0x10 // CRunningScript.m_pBaseAddress 0A8D: [email protected] = read_memory [email protected] size 4 vp 0 0A8F: _HOOK_PTR_005E784F_CPed__Render = [email protected] - @_HOOK_PTR_005E784F_CPed__Render 0A8F: _CWorld__PlayersExtras = [email protected] - @_CWorld__PlayersExtras 0A8F: [email protected] = _HOOK_PTR_005E784F_CPed__Render - 0x005E7854 0A8C: write_memory 0x005E784F size 1 value 0xE9 vp 1 0A8C: write_memory 0x005E7850 size 4 value [email protected] vp 1 0A8E: [email protected] = _HOOK_PTR_005E784F_CPed__Render + 1 0A8E: [email protected] = [email protected] + 4 0A8F: [email protected] = _CPedIntelligence__GetTaskHold - [email protected] 0A8C: write_memory [email protected] size 4 value [email protected] vp 0 0A8F: [email protected] = 0x005E7858 - _HOOK_PTR_005E784F_CPed__Render 0A8F: [email protected] = 0x005E787C - _HOOK_PTR_005E784F_CPed__Render 0A8E: [email protected] = _HOOK_PTR_005E784F_CPed__Render + 9 0A8F: [email protected] = [email protected] - 0x0D 0A8C: write_memory [email protected] size 4 value [email protected] vp 0 0A8E: [email protected] = _HOOK_PTR_005E784F_CPed__Render + 0x1C 0A8F: [email protected] = [email protected] - 0x20 0A8C: write_memory [email protected] size 4 value [email protected] vp 0 0A8E: [email protected] = _HOOK_PTR_005E784F_CPed__Render + 0x25 0A8C: write_memory [email protected] size 4 value _CWorld__PlayersExtras vp 0 0A8E: [email protected] = _HOOK_PTR_005E784F_CPed__Render + 0x2D 0A8F: [email protected] = [email protected] - 0x31 0A8C: write_memory [email protected] size 4 value [email protected] vp 0 0A8E: [email protected] = _HOOK_PTR_005E784F_CPed__Render + 0x32 0A8F: [email protected] = [email protected] - 0x36 0A8C: write_memory [email protected] size 4 value [email protected] vp 0 [...] 0A90: [email protected] = 0 * 4 // PLAYERID * sizeof(CPlayerExtraInfo) 005A: [email protected] += _CWorld__PlayersExtras 0A8C: write_memory [email protected] size 1 value true vp 0 // false by default. // Here player1's weapon is always drawn. [...] :_HOOK_PTR_005E784F_CPed__Render hex E8 00000000 // 00000000 call CPedIntelligence::GetTaskHold 85C0 // 00000005 test eax, eax 0F84 00000000 // 00000007 jz CPed::Render+1D8h 8B8E 98050000 // 0000000D mov ecx, [esi+CPed.m_iPedType] 85C9 // 00000013 test ecx, ecx 74 09 // 00000015 jz ped_is_player 83F9 01 // 00000017 cmp ecx, PEDTYPE_PLAYER2 0F85 00000000 // 0000001A jne CPed::Render+1FCh // 00000020 ped_is_player: C1E1 02 // 00000020 shl ecx, 2 8A91 00000000 // 00000023 mov dl, CWorld::PlayersExtras.m_bAlwaysDrawWeapon[ecx] 84D2 // 00000029 test dl, dl 0F84 00000000 // 0000002B jz CPed::Render+1FCh E9 00000000 // 00000031 jmp CPed::Render+1D8h end { class CPlayerExtraInfo ( public: bool m_bAlwaysDrawWeapon; ); CPlayerExtraInfo CWorld::PlayersExtras[2]; } :_CWorld__PlayersExtras hex 00 000000 00 000000 end Wesser.. Woah! Thanks a TON for this!! Link to comment Share on other sites More sharing options...
ArmanCan Posted February 28 Share Posted February 28 1 minute ago, Zambini said: Woah! Thanks a TON for this!! find someone to control them.. i've only copied them for you... Link to comment Share on other sites More sharing options...
Zambini Posted February 28 Author Share Posted February 28 6 minutes ago, ArmanCan said: find someone to control them.. i've only copied them for you... Well at least I have somewhere to start now Link to comment Share on other sites More sharing options...