Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

[Help] Car finding


Daniel_Absolu
 Share

Recommended Posts

Daniel_Absolu

Samp is a cleo in it using cmd to find, but I want it to automatically draw all vehicles in the range , I do like?

{$CLEO}
0000: NOP
0B34: samp register_client_command "cfind" to_label @cfind
0B34: samp register_client_command "cfind2" to_label @cfind2
0B34: samp register_client_command "ctog" to_label @ctog
0B34: samp register_client_command "creset" to_label @creset
0B34: samp register_client_command "chelp" to_label @chelp
[email protected] = 0
[email protected] = 0

:First
wait 0
if
0118: actor $PLAYER_ACTOR dead
then
jump @First
end

if
056D: actor $PLAYER_ACTOR defined
jf @First
[email protected] = 0

if
[email protected] == 1
then
jump @First
end

if [email protected] == 1
then
0AB1: @Find_car 4 Car_model [email protected] Display_offset [email protected] Color 0x00C8FF Search_number 1
[email protected] += 43
end

if [email protected] == 1
then
0AB1: @Find_car 4 Car_model [email protected] Display_offset [email protected] Color 0xFF4800 Search_number 2
[email protected] += 43
end
jump @First

:cfind
wait 0
0B35: samp [email protected] = get_last_command_params //
if 0AD4: [email protected] = scan_string [email protected] format "%d" [email protected]
then
[email protected] = 1
else
0164: disable_marker [email protected]
[email protected] = 0
end
samp.CmdRet

:cfind2
wait 0
0B35: samp [email protected] = get_last_command_params //
if 0AD4: [email protected] = scan_string [email protected] format "%d" [email protected]
then
[email protected] = 1
else
[email protected] = 0
end
samp.CmdRet

:creset
wait 0
[email protected] = 0
[email protected] = 0
samp.CmdRet

:ctog
wait 0
0B12: [email protected] = [email protected] XOR 1
samp.CmdRet

:chelp
wait 0
0AF8: samp add_message_to_chat "{00C8FF}c{FF4800}a{00C8FF}r{F7F694}Finder commands:" color 0xFFFFFFFF
0AF8: samp add_message_to_chat "{FFFFFF}/cfind <modelID> {00C8FF}(blue markers)" color 0xFFFFFFFF
0AF8: samp add_message_to_chat "{FFFFFF}/cfind2 <modelID> {FF4800}(red markers)" color 0xFFFFFFFF
0AF8: samp add_message_to_chat "{FFFFFF}/creset {F7F694}(reset current searches)" color 0xFFFFFFFF
0AF8: samp add_message_to_chat "{FFFFFF}/ctog {F7F694}(tog current searches)" color 0xFFFFFFFF
samp.CmdRet

//0AB1: @Find_car 4 Car_model [email protected] Display_offset [email protected] Color [email protected] Search_number [email protected]
:Find_car
[email protected] = 0
0B5A: get_screen_resolution [email protected] [email protected] //int
[email protected] /= 10
[email protected] *= 8
//[email protected] /= 2
[email protected] /= 10
[email protected] *= 7
005A: [email protected] += [email protected]
[email protected] = 0
for [email protected] = 0 to 2000
if 0AFF: samp [email protected] = car_handle_by_samp_vehicle_id [email protected]
then
0441: [email protected] = car [email protected] model
if 003B: [email protected] == [email protected] // (int)
then
03F0: enable_text_draw 1
[email protected] += 1
if
02CA: car [email protected] bounding_sphere_visible
then
0B66: render argb [email protected] to_a [email protected] r [email protected] g [email protected] b [email protected]
0AB1: @Box_car 6 Car_handle [email protected] Red [email protected] Green [email protected] Blue [email protected] Alpha 255 Thickness 180.0
end
end
end
if [email protected] > 14
then break
end
end
0AD3: [email protected] = format "Model: %d" [email protected]
0AD3: [email protected] = format "Number: %d" [email protected]
if
[email protected] == 0
then
0D94: draw_text [email protected] pos_xy [email protected] [email protected] align_xy 0.0 0.0 color 0x575757 shadow 1
[email protected] += 19
0D94: draw_text [email protected] pos_xy [email protected] [email protected] align_xy 0.0 0.0 color 0x575757 shadow 1
else
0D94: draw_text [email protected] pos_xy [email protected] [email protected] align_xy 0.0 0.0 color [email protected] shadow 1
[email protected] += 19
0D94: draw_text [email protected] pos_xy [email protected] [email protected] align_xy 0.0 0.0 color [email protected] shadow 1
end
0AB2: ret 0


//0AB1: @Box_car 6 Car_handle [email protected] Red [email protected] Green [email protected] Blue [email protected] Alpha [email protected] Thickness [email protected]
:Box_car
00AA: store_car [email protected] position_to [email protected] [email protected] [email protected]
068D: get_camera_position_to [email protected] [email protected] [email protected]
050A: [email protected] = distance_between_XYZ [email protected] [email protected] [email protected] and_XYZ [email protected] [email protected] [email protected]
[email protected] = 1800.0
[email protected] = 1000.0
0073: [email protected] /= [email protected] // (float)
0073: [email protected] /= [email protected]
0073: [email protected] /= [email protected]
0AB1: call_scm_func @getScreenXYFrom3DCoords 3 3D_coords_X [email protected] Y [email protected] Z [email protected] store_screen_X_to [email protected] Y_to [email protected]
0AB1: @DRAW_OUTLINED_BOX 9 POS [email protected] [email protected] SIZE [email protected] [email protected] RGBA [email protected] [email protected] [email protected] [email protected] THICKNESS [email protected]
0AB2: ret 0

//0AB1: @DRAW_OUTLINED_BOX 9 POS 300.0 300.0 SIZE 50.0 50.0 RGBA 255 0 0 255 THICKNESS 0.5
:DRAW_OUTLINED_BOX
0087: [email protected] = [email protected] // (float)
0087: [email protected] = [email protected] // (float)
0087: [email protected] = [email protected] // (float)
[email protected] /= 2.0 // (float)
[email protected] /= 2.0 // (float)
0087: [email protected] = [email protected] // (float)
005B: [email protected] += [email protected] // (float)
0063: [email protected] -= [email protected] // (float)
0087: [email protected] = [email protected] // (float)
0063: [email protected] -= [email protected] // (float)
005B: [email protected] += [email protected] // (float)
0087: [email protected] = [email protected] // (float)
005B: [email protected] += [email protected] // (float)
0063: [email protected] -= [email protected] // (float)
0087: [email protected] = [email protected] // (float) by OpcodeXe
0063: [email protected] -= [email protected] // (float)
005B: [email protected] += [email protected] // (float)
03F0: enable_text_draw 1
038E: draw_box_position [email protected] [email protected] size [email protected] [email protected] RGBA [email protected] [email protected] [email protected] [email protected] // links
038E: draw_box_position [email protected] [email protected] size [email protected] [email protected] RGBA [email protected] [email protected] [email protected] [email protected] // rechts
038E: draw_box_position [email protected] [email protected] size [email protected] [email protected] RGBA [email protected] [email protected] [email protected] [email protected] // oben
038E: draw_box_position [email protected] [email protected] size [email protected] [email protected] RGBA [email protected] [email protected] [email protected] [email protected] // unten
0AB2: ret 0

//0AB1: call_scm_func @getScreenXYFrom3DCoords 3 3D_coords_X [email protected] Y [email protected] Z [email protected] store_screen_X_to [email protected] Y_to [email protected]
:getScreenXYFrom3DCoords
0AA7: call_function 0x70CE30 num_params 6 pop 6 clipNear 1 clipFar 1 yMult 7[member=21661]S[/member] xMult 6[member=21661]S[/member] outVector 2[member=21661]S[/member] inVector 0[member=21661]S[/member] result [email protected]
0073: [email protected] /= [email protected]
0073: [email protected] /= [email protected]
0073: [email protected] /= [email protected]
0073: [email protected] /= [email protected]
[email protected] *= 640.0
[email protected] *= 448.0
0AB2: ret 2 [email protected] [email protected]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.