14 Object targetObject = target.GetObject();
16 string test = player.GetDisplayName();
17 string test2 = item.GetType();
18 string test3 = targetObject.GetDisplayName();
20 if ( player && targetObject && item )
22 int componentIndex = target.GetComponentIndex();
23 if( targetObject.IsActionComponentPartOfSelection(componentIndex,
"wheel_1_1") )
25 Print(
"Predni leve" );
30 if( targetObject.IsActionComponentPartOfSelection(componentIndex,
"wheel_1_2") )
32 Print(
"zadni leve" );
37 if( targetObject.IsActionComponentPartOfSelection(componentIndex,
"wheel_1_3") )
39 Print(
"prostredni leve" );
44 if( targetObject.IsActionComponentPartOfSelection(componentIndex,
"wheel_1_4") )
46 Print(
"druhe predni leve" );
51 if( targetObject.IsActionComponentPartOfSelection(componentIndex,
"wheel_2_1") )
53 Print(
"Predni prave" );
58 if( targetObject.IsActionComponentPartOfSelection(componentIndex,
"wheel_2_2") )
60 Print(
"zadni prave" );
65 if( targetObject.IsActionComponentPartOfSelection(componentIndex,
"wheel_2_3") )
67 Print(
"prostredni prave" );
72 if( targetObject.IsActionComponentPartOfSelection(componentIndex,
"wheel_2_4") )
74 Print(
"druhe predni prave" );
83 override void OnExecuteServer(
ActionData action_data )
86 Class.CastTo(target_entity, action_data.m_Target.GetObject() );
87 int slot_index = action_data.m_MainItem.GetInventory().GetSlotId(0);
88 int test = m_wheel_hub;
89 if (!target_entity.LocalTakeEntityAsAttachmentEx( action_data.m_MainItem, slot_index ))
90 target_entity.LocalTakeEntityAsAttachment( action_data.m_MainItem );
92 override void OnExecuteClient(
ActionData action_data )
95 Class.CastTo(target_entity, action_data.m_Target.GetObject() );
96 int slot_index = action_data.m_MainItem.GetInventory().GetSlotId(0);
97 int test = m_wheel_hub;
98 if (!target_entity.LocalTakeEntityAsAttachmentEx( action_data.m_MainItem, slot_index ))
99 target_entity.LocalTakeEntityAsAttachment( action_data.m_MainItem );