Help I want to make a cleo script...

Viz_310

Member
Joined
Aug 12, 2020
Messages
20
Reaction score
1
Location
India
I want to make a cleo script which adds waypoint to the bimp checkpoint on my radar.. I have no knowledge of cleo scripting and pawn scripting..
I asked chatgpt to make me one and it looked promising but it doesnt work for samp, havent tested on single player either. can someone make the cleo script or share me if it exists ?
I will be thankful.
Kind Regards
Viz

{$CLEO .cs}

// This script puts the game waypoint at the location of the nearest blimp checkpoint

thread 'WAYPOINT' // Start a new thread for the script

while true // Infinite loop
wait 0 // Wait for a short time to prevent CPU hogging

if
0AB0: key_pressed 0x11 // If the 'W' key is pressed (you can change this to any desired key)
then
// Get the nearest blimp checkpoint coordinates
03F0: enable_text_draw 1
03CF: load_wav 4 'BLIP' // Load a sound effect
058A: enable_marker 1 0 // Enable red blip on radar

0247: request_model #FREEWAY // Blimp model
038B: load_requested_models

0050: 0@ = 0.0 // Initialize variable for the closest distance
024F: create_pickup #NITRO type 3 at 0.0 0.0 0.0 // Create a temporary pickup
0051: 1@ = 0@ // Copy the closest distance to a variable
005A: 2@ = 'CURRENT' // Set the search area to current location
01F0: 2@ = current_longitude // Get current longitude
01F1: 3@ = current_latitude // Get current latitude

// Loop through all blimp checkpoints
:SEARCH_CHECKPOINTS
0001: wait 0 ms
0165: 0@ = create_checkpoint_at 2@ 3@ 2.0 // Create a checkpoint at current blimp checkpoint
0087: 3@ = 0@ // Get the distance between current checkpoint and player
01BD: 4@ = current_longitude // Get current longitude
01BE: 5@ = current_latitude // Get current latitude
0166: remove_checkpoint 0@ // Remove the current checkpoint
if
or
3@ >= 1.0 // If distance is greater than 1.0 unit
then
jump @NEXT_CHECKPOINT // Jump to next checkpoint
end

// Update closest distance and coordinates
0051: 1@ = 3@ // Copy the current distance to a variable
0247: request_model #FREEWAY // Blimp model
038B: load_requested_models
01B0: store_actor $PLAYER_ACTOR position_to 6@ 7@ 8@
0050: 2@ = 4@ // Copy the current longitude to a variable
0050: 3@ = 5@ // Copy the current latitude to a variable

// Repeat for the next checkpoint
:NEXT_CHECKPOINT
jump @SEARCH_CHECKPOINTS // Jump to continue searching checkpoints

// Set the game waypoint to the nearest blimp checkpoint
04EF: set_current_marker_to_3D_coordinate 2@ 3@ 8@
058A: enable_marker 1 0 // Enable red blip on radar
0390: load_txd_dictionary 'HUD' // Load the HUD texture dictionary
038F: load_texture "RADAR" as 1 // Load the radar texture
038F: load_texture "MAIN" as 2 // Load the main texture
00BC: show_text_highpriority "Waypoint set to nearest blimp checkpoint." time 3000 // Display message
03CF: load_wav 2 'POINT' // Load a sound effect
03E5: show_text_box 'GPS' 'GWP' 10 // Show GPS instruction
jump @WAYPOINT // Jump to the beginning of the thread

end
end
 

Viz_310

Member
Joined
Aug 12, 2020
Messages
20
Reaction score
1
Location
India
So you wanna make marker on your radar
I dont think this phrase kind of makes me understand what you mean.
I want a script which puts a waypoint in the area where there is a Red checkpoint on radar
Which means the waypoint is automatically placed to the checkpoint. Then i will use autodrive function to drive there
 
Top