CLEO Help GetObjectId?

CLEO related
Status
Not open for further replies.

Hidend

Expert
Joined
Mar 4, 2013
Messages
625
Reaction score
39
Is possible to make that with cleo, and how? I need to get some object ids and idk how :/
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,126
Solutions
1
Reaction score
157
/oid
Code:
{$CLEO}
0000: NOP
0B34: samp register_client_command "oid" to_label @showobjectID
26@ = 0

:ID_First
wait 0
if 26@ == 1
then
for 6@ = 0 to 10000
     if 0B50: samp 0@ = object_handle_by_id 6@
     then
        if
        02CC:   object 0@ bounding_sphere_visible
        then
        01BB: store_object 0@ position_to 1@ 2@ 3@
        0B55: convert_3D_coords 1@ 2@ 3@ to_screen 4@ 5@
        03F0: enable_text_draw 1
        0AD3: 30@v = format "%d" 6@
        5@ += 17
        0D94: draw_text 30@v pos_xy 4@ 5@ align_xy 0.5 0.0 color 0xF7F694 shadow 1            
        end 
    end     
end
end
jump @ID_First

:showobjectID
wait 0
0B12: 26@ = 26@ XOR 1
samp.CmdRet
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,126
Solutions
1
Reaction score
157
Should it show ID of the model type or ID of the object on some server?

The one below is for model ID if you need it
Code:
{$CLEO}
0000: NOP
0B34: samp register_client_command "oid" to_label @showobjectID
26@ = 0

:ID_First
wait 0
if 26@ == 1
then
for 6@ = 0 to 10000
     if 0B50: samp 0@ = object_handle_by_id 6@
     then
        if
        02CC:   object 0@ bounding_sphere_visible
        then
        01BB: store_object 0@ position_to 1@ 2@ 3@
        0B55: convert_3D_coords 1@ 2@ 3@ to_screen 4@ 5@
        03F0: enable_text_draw 1
        0984: 7@ = object 0@ model
        0AD3: 30@v = format "%d" 7@
        5@ += 17
        0D94: draw_text 30@v pos_xy 4@ 5@ align_xy 0.5 0.0 color 0xF7F694 shadow 1            
        end 
    end     
end
end
jump @ID_First

:showobjectID
wait 0
0B12: 26@ = 26@ XOR 1
samp.CmdRet
 
Status
Not open for further replies.
Top