Jump to content

[CLEO] My Mods


quix
 Share

Recommended Posts

  • Manager

In this topic, I'll post some codes I'll create for you to understand how this language works.

(NOTE: These codes might not work as intended and might need some changes!)

1. Gives you 1000 health, 1337 armor, and Deagle when pressing F2:

{$CLEO .cs}

// Key codes
const
  KEY_F2 = 113;  // F2 key code

// Weapon IDs
const
  WEAPON_DEAGLE = 24;  // Deagle weapon ID

// Script entry point
thread 'LeaksForTheWin' 
  while true 
    wait 0 
    if is_key_pressed(KEY_F2) then 
      // Give player the Deagle
      give_player_weapon($PLAYER_CHAR, WEAPON_DEAGLE, 9999)
      // Set player health and armor
      set_player_health($PLAYER_CHAR, 1000)
      set_player_armour($PLAYER_CHAR, 1337)
      // Display text
      wait 500
      show_text_box('Leaks for the win!')
      wait 5000
      clear_text_box()
    end_if
  end_while
end_thread

 

1.png.56210348f845fad9f2d8f843d77e3c16.png

Click! : adelinrzo

Click! quiixx.

Click! : raizo

 

Guardian of Leaks!

 

image.png.3ca1bf60c26a3523b93df92ea8521802.png (24.01.2023)

image.png.990bdf55e8ebaad7e92cc11967598b8d.png (12.03.2023)

image.png.25e5d76f6f7de46f49423812d3d500a3.png (30.03.2023)

Link to comment
Share on other sites

  • quix featured this topic
  • Manager

2. Transforms you (the player) into Michelle. Also teleports you to her garage and spawns a monster truck after 3 seconds:

{$CLEO .cs}

// Key codes
const
  KEY_F4 = 115;  // F4 key code

// Location coordinates
const
  MICHELLE_GARAGE_X = -1996.37;
  MICHELLE_GARAGE_Y = 276.6;
  MICHELLE_GARAGE_Z = 35.17;
  
// Script entry point
thread 'MichelleGarageTeleport' 
  while true 
    wait 0 
    if is_key_pressed(KEY_F4) then 
      // Set player's skin to Michelle (id 191)
      set_player_skin($PLAYER_CHAR, 191)
      // Teleport player to Michelle's Garage
      teleport_with_car($PLAYER_CHAR, MICHELLE_GARAGE_X, MICHELLE_GARAGE_Y, MICHELLE_GARAGE_Z, 90.0, -1)
      // Wait for 3 seconds
      wait 3000
      // Spawn a Monster Truck in front of the player
      new_car = create_car(MONSTER, get_offset_from_car_in_world_coords($PLAYER_CAR, 0.0, 5.0, 0.0))
      // Set the car's speed to 0
      set_car_speed(new_car, 0.0)
    end_if
  end_while
end_thread

 

1.png.56210348f845fad9f2d8f843d77e3c16.png

Click! : adelinrzo

Click! quiixx.

Click! : raizo

 

Guardian of Leaks!

 

image.png.3ca1bf60c26a3523b93df92ea8521802.png (24.01.2023)

image.png.990bdf55e8ebaad7e92cc11967598b8d.png (12.03.2023)

image.png.25e5d76f6f7de46f49423812d3d500a3.png (30.03.2023)

Link to comment
Share on other sites

  • Manager

3. Creates a menu containing 4 options: Random Teleport, Teleport to LS, Teleport to SF, Teleport to LV. These are self explanatory (you get teleported to the middle of each city, but the first selection, where you get teleported somewhere random on the map):

{$CLEO .cs}

// Key codes
const
  KEY_F10 = 121;  // F10 key code
  
// Menu options
const
  MENU_OPTION_RANDOM = 0;
  MENU_OPTION_LS = 1;
  MENU_OPTION_SF = 2;
  MENU_OPTION_LV = 3;
  
// Location coordinates
const
  LS_CENTER_X = 1399.76;
  LS_CENTER_Y = -1168.98;
  LS_CENTER_Z = 23.97;
  SF_CENTER_X = -2352.27;
  SF_CENTER_Y = 988.43;
  SF_CENTER_Z = 35.17;
  LV_CENTER_X = 1705.9;
  LV_CENTER_Y = 1471.31;
  LV_CENTER_Z = 10.82;
  
// Script entry point
thread 'TeleportMenu' 
  while true 
    wait 0 
    if is_key_pressed(KEY_F10) then 
      // Create menu
      menu('Teleport Menu', 'Random Location', 'Middle of LS', 'Middle of SF', 'Middle of LV')
      // Wait for menu selection
      menu_item_selected = 0
      while not menu_item_selected 
        wait 0 
        if menu_active('Teleport Menu') then 
          menu_item_selected = menu_selected_item()
        end_if
      end_while
      // Teleport player to selected location
      if menu_item_selected == MENU_OPTION_RANDOM then 
        random_x = random_float_in_range(-3000.0, 3000.0)
        random_y = random_float_in_range(-3000.0, 3000.0)
        teleport($PLAYER_CHAR, random_x, random_y, 0.0)
      else_if menu_item_selected == MENU_OPTION_LS then 
        teleport($PLAYER_CHAR, LS_CENTER_X, LS_CENTER_Y, LS_CENTER_Z)
      else_if menu_item_selected == MENU_OPTION_SF then 
        teleport($PLAYER_CHAR, SF_CENTER_X, SF_CENTER_Y, SF_CENTER_Z)
      else_if menu_item_selected == MENU_OPTION_LV then 
        teleport($PLAYER_CHAR, LV_CENTER_X, LV_CENTER_Y, LV_CENTER_Z)
      end_if
      // Wait for menu to close
      while menu_active('Teleport Menu') 
        wait 0 
      end_while
    end_if
  end_while
end_thread

 

1.png.56210348f845fad9f2d8f843d77e3c16.png

Click! : adelinrzo

Click! quiixx.

Click! : raizo

 

Guardian of Leaks!

 

image.png.3ca1bf60c26a3523b93df92ea8521802.png (24.01.2023)

image.png.990bdf55e8ebaad7e92cc11967598b8d.png (12.03.2023)

image.png.25e5d76f6f7de46f49423812d3d500a3.png (30.03.2023)

Link to comment
Share on other sites

  • Manager

4. Creates a menu with 3 options, first one gives you Deagle, second gives you M4 and third gives you Rocket Launcher: 

{$CLEO .cs}

// Key codes
const
  KEY_F10 = 121;  // F10 key code

// Menu options
const
  MENU_OPTION_DEAGLE = 0;
  MENU_OPTION_M4 = 1;
  MENU_OPTION_ROCKET_LAUNCHER = 2;

// Script entry point
thread 'WeaponMenu'
  while true
    wait 0
    if is_key_pressed(KEY_F10) then
      // Create menu
      menu('Weapon Menu', 'Deagle', 'M4', 'Rocket Launcher')
      // Wait for menu selection
      menu_item_selected = 0
      while not menu_item_selected
        wait 0
        if menu_active('Weapon Menu') then
          menu_item_selected = menu_selected_item()
        end_if
      end_while
      // Give the player the selected weapon
      if menu_item_selected == MENU_OPTION_DEAGLE then
        give_weapon_to_char($PLAYER_CHAR, 24, 9999)
      else_if menu_item_selected == MENU_OPTION_M4 then
        give_weapon_to_char($PLAYER_CHAR, 31, 9999)
      else_if menu_item_selected == MENU_OPTION_ROCKET_LAUNCHER then
        give_weapon_to_char($PLAYER_CHAR, 35, 9999)
      end_if
      // Wait for menu to close
      while menu_active('Weapon Menu')
        wait 0
      end_while
    end_if
  end_while
end_thread

 

1.png.56210348f845fad9f2d8f843d77e3c16.png

Click! : adelinrzo

Click! quiixx.

Click! : raizo

 

Guardian of Leaks!

 

image.png.3ca1bf60c26a3523b93df92ea8521802.png (24.01.2023)

image.png.990bdf55e8ebaad7e92cc11967598b8d.png (12.03.2023)

image.png.25e5d76f6f7de46f49423812d3d500a3.png (30.03.2023)

Link to comment
Share on other sites

  • Manager

5. Creates a mission : You get teleported to big smoke's house and you have his skin, and you need to go to CJ's house and kill him, after the mission, you get $3.000.000:

{$CLEO .cs}

// Key codes
const
  KEY_F10 = 121;  // F10 key code

// Checkpoint coordinates
const
  CHECKPOINT_X = 2495.5;
  CHECKPOINT_Y = -1669.2;
  CHECKPOINT_Z = 12.5;

// Script entry point
thread 'BigSmokeMission'
  while true
    wait 0
    if is_key_pressed(KEY_F10) then
      // Change player skin to Big Smoke
      change_player_skin(271)
      // Teleport player to Big Smoke's house
      set_char_coordinates($PLAYER_CHAR, 2467.4, -1663.3, 13.3)
      // Create checkpoint at CJ's house
      create_checkpoint(0, CHECKPOINT_X, CHECKPOINT_Y, CHECKPOINT_Z)
      // Wait for player to reach checkpoint
      while true
        wait 0
        if is_char_in_area_3d($PLAYER_CHAR, CHECKPOINT_X-2.0, CHECKPOINT_Y-2.0, CHECKPOINT_Z-2.0, CHECKPOINT_X+2.0, CHECKPOINT_Y+2.0, CHECKPOINT_Z+2.0, true) then
          // Spawn enemy ped with CJ's skin and a Deagle
          enemy_ped = create_ped(26, 0, 0.0, 0.0, 0.0)
          set_char_coordinates(enemy_ped, 2467.4, -1663.3, 13.3)
          set_char_weapon(enemy_ped, 24, 9999)
          set_char_health(enemy_ped, 500)
          // Wait for enemy ped to die
          while is_char_alive(enemy_ped)
            wait 0
          end_while
          // Remove checkpoint and give player money
          delete_checkpoint(0)
          give_player_money(3000000)
          break
        end_if
      end_while
    end_if
  end_while
end_thread

 

1.png.56210348f845fad9f2d8f843d77e3c16.png

Click! : adelinrzo

Click! quiixx.

Click! : raizo

 

Guardian of Leaks!

 

image.png.3ca1bf60c26a3523b93df92ea8521802.png (24.01.2023)

image.png.990bdf55e8ebaad7e92cc11967598b8d.png (12.03.2023)

image.png.25e5d76f6f7de46f49423812d3d500a3.png (30.03.2023)

Link to comment
Share on other sites

  • Manager

6. Cool script: Creates a hot air balloon that starts flying, after you exit the balloon you get a cutscene and a parachute to land safely. Keybind for activation : F10
 

{$CLEO .cs}

// Key codes
const
  KEY_F10 = 121;  // F10 key code

// Mission variables
var
  blip_marker: MarkerID;
  car: CarID;

// Script entry point
thread 'CoolScript'
  while true
    wait 0
    if is_key_pressed(KEY_F10) then
      // Show message and play sound effect
      show_text_highpriority("Welcome to the cool script!", 5000, 1)
      audio_play_sound_frontend(0x11D, "FRONTEND_BEAST_MENU_SOUNDSET")
      
      // Spawn a hot air balloon and attach a marker to it
      balloon = create_object(17268, 2495.0, -1669.0, 12.0)
      blip_marker = create_marker_above_object(balloon)
      set_marker_color(blip_marker, 1)
      set_marker_size(blip_marker, 3)
      
      // Teleport player to the hot air balloon and start flying
      set_char_coordinates($PLAYER_CHAR, 2495.0, -1669.0, 15.0)
      set_char_z_angle($PLAYER_CHAR, 0.0)
      wait 2000
      set_char_proof_cars($PLAYER_CHAR, true)
      set_char_proof_fire($PLAYER_CHAR, true)
      set_char_proof_explosions($PLAYER_CHAR, true)
      car = create_car(424, 2495.0, -1669.0, 50.0)
      set_car_z_angle(car, 0.0)
      wait 1000
      set_car_color(car, 2, 2)
      set_car_immunities(car, true, true, true, true, true)
      attach_object_to_car(balloon, car, 0.0, 0.0, 10.0, 0.0, 0.0, 0.0)
      set_car_cruise_speed(car, 50.0)
      
      // Wait for player to jump out of the hot air balloon
      while true
        wait 0
        if is_char_in_car($PLAYER_CHAR, car) then
          if is_key_pressed(32) then  // Space key code
            audio_play_sound_frontend(0x10A, "FRONTEND_DEFAULT_SOUNDSET")
            set_char_coordinates($PLAYER_CHAR, 2495.0, -1669.0, 12.0)
            detach_object(balloon)
            destroy_object(balloon)
            delete_marker(blip_marker)
            destroy_car(car)
            break
          end_if
        end_if
      end_while
      
      // Play a cutscene of a helicopter flying away
      cutscene_start(1)
      set_camera_position(2467.0, -1467.0, 89.0, 0.0, 0.0, 0.0)
      set_camera_point_at_position(2507.0, -1667.0, 50.0, 2)
      wait 1000
      cutscene_end()
      
      // Display a message and give the player a parachute
      show_text_highpriority("Use the parachute to land safely!", 5000, 1)
      give_player_weapon($PLAYER_CHAR, 46, 1)
    end_if
  end_while
end_thread

 

1.png.56210348f845fad9f2d8f843d77e3c16.png

Click! : adelinrzo

Click! quiixx.

Click! : raizo

 

Guardian of Leaks!

 

image.png.3ca1bf60c26a3523b93df92ea8521802.png (24.01.2023)

image.png.990bdf55e8ebaad7e92cc11967598b8d.png (12.03.2023)

image.png.25e5d76f6f7de46f49423812d3d500a3.png (30.03.2023)

Link to comment
Share on other sites

  • Manager

7. This code will replace cheat codes "BAGUVIX" with "INFHEALTH" and "AEZAKMI" with "NOPOLICE".

{$CLEO}

// Constants
const
    CHEAT_INFHEALTH = 'INFHEALTH';
    CHEAT_NOPOLICE = 'NOPOLICE';

// Variables
var
    cheat1: string;
    cheat2: string;

// Main function
thread 'ReplaceCheats'
while true
    wait 0
    // Get the currently entered cheats
    cheat1 := read_memory_string(0xB73490, 8, false)
    cheat2 := read_memory_string(0xB734A0, 8, false)

    // Replace BAGUVIX with INFHEALTH
    if cheat1 = 'BAGUVIX' then
        write_memory_string(0xB73490, CHEAT_INFHEALTH, 10, false)
    end

    // Replace AEZAKMI with NOPOLICE
    if cheat2 = 'AEZAKMI' then
        write_memory_string(0xB734A0, CHEAT_NOPOLICE, 9, false)
    end
end

 

1.png.56210348f845fad9f2d8f843d77e3c16.png

Click! : adelinrzo

Click! quiixx.

Click! : raizo

 

Guardian of Leaks!

 

image.png.3ca1bf60c26a3523b93df92ea8521802.png (24.01.2023)

image.png.990bdf55e8ebaad7e92cc11967598b8d.png (12.03.2023)

image.png.25e5d76f6f7de46f49423812d3d500a3.png (30.03.2023)

Link to comment
Share on other sites

  • Manager

8. Creates a new cool mission : "The Great Heist" (unfinished)
 

{$CLEO}

// Constants
const
    MISSION_NAME = 'The Great Heist';
    MISSION_BLIP = 10;
    MISSION_MARKER = 22;
    MISSION_OBJECTIVE_TEXT = 'Steal the diamonds from the jewelry store.';

// Variables
var
    mission_started: boolean;
    mission_completed: boolean;
    mission_marker: integer;
    mission_blip: integer;
    jewelry_store: integer;
    diamond: integer;

// Main function
thread 'NewMission'
while true
    wait 0

    // Start the mission
    if not mission_started then
        // Create a blip and a marker for the mission
        mission_blip := create_icon_marker_and_sphere(2, 1177.0, -1324.0, 13.6)
        mission_marker := create_marker_and_sphere(22, 1177.0, -1324.0, 13.6)

        // Load the jewelry store interior
        load_requested_models()
        jewelry_store := load_interior(7)

        // Create the diamond object
        diamond := create_object(1262, 1175.0, -1325.0, 13.6)

        // Set the mission objective text
        set_text_box(MISSION_OBJECTIVE_TEXT)

        // Set mission flag to true
        mission_started := true
    end

    // Check if the player is at the mission marker
    if mission_started and not mission_completed and is_player_within_radius_of_point_3d(1.5, 1177.0, -1324.0, 13.6) then
        // Remove the mission blip and marker
        delete_icon_marker_and_sphere(mission_blip)
        delete_marker_and_sphere(mission_marker)

        // Set the player's objective to steal the diamonds
        set_text_box('Steal the diamonds from the jewelry store.')

        // Play a cutscene of the player breaking into the jewelry store
        player_can_move(false)
        set_interior_rendering_disabled(true)
        set_widescreen(true)
        camera_behind_player()
        fade(500, 1)
        set_player_position(1169.0, -1374.0, 13.5)
        set_player_interior(jewelry_store)
        set_camera_position(1172.0, -1335.0, 16.0)
        set_camera_point_at_position(1177.0, -1324.0, 13.6, 2)
        fade(500, 0)
        wait(1000)
        player_can_move(true)
        set_interior_rendering_disabled(false)
        set_widescreen(false)

        // Spawn the diamond in the jewelry store
        set_object_coordinates(diamond, 1172.0, -1335.0, 13.6)
        set_object_interior(diamond, jewelry_store)
        set_object_visible(diamond, true)

    end

    // Check if the player has picked up the diamond
    if mission_started and not mission_completed and is_player_near_object_on_foot(diamond, 1.5) then
        // Remove the diamond object
        destroy_object(diamond)

        // Set the player's objective to escape with the diamonds
        set_text_box('Escape with the diamonds!')

        // Spawn a helicopter for the player to escape with
        create_actor(16, 487, 1185.0, -1335.0, 14.0)

 

1.png.56210348f845fad9f2d8f843d77e3c16.png

Click! : adelinrzo

Click! quiixx.

Click! : raizo

 

Guardian of Leaks!

 

image.png.3ca1bf60c26a3523b93df92ea8521802.png (24.01.2023)

image.png.990bdf55e8ebaad7e92cc11967598b8d.png (12.03.2023)

image.png.25e5d76f6f7de46f49423812d3d500a3.png (30.03.2023)

Link to comment
Share on other sites

  • Manager

9. Creates a custom Loading Screen with a loading bar:

Note: In order to use this script, you would need to create a PNG file named "LOADBAR.png" in the "CLEO" folder of your GTA San Andreas installation, which will be used as the progress bar.

// Display loading text
0AFA: text_draw 1 position 320.0 200.0 GXT 'LOADING' color 2 flag 1 center 1 scale 2.0

// Define variables
0AB1: var 1@ = 0 // Current progress
0AB1: var 2@ = 0 // Total progress

// Loop until loading is complete
:LOADING_LOOP
  // Check if loading is complete
  00D6: if or
    0AB0:   var 1@ >= var 2@
  jf @LOADING_LOOP
  
  // Display progress bar
  0AFA: text_draw 2 position 320.0 230.0 width 400.0 height 20.0 color 1 flag 0 center 1
  0AFB: draw_texture "LOADBAR" position 160.0 226.0 size 210.0 30.0 RGBA 255 255 255 255
  
  // Update progress
  0AB1: var 1@ += 1
  
  // Delay for a moment
  0A8D: wait 0
  
  // Jump back to loading loop
  jmp @LOADING_LOOP

// Loading is complete, remove loading screen
0AFB: draw_texture -1
0AFA: text_draw -1

 

1.png.56210348f845fad9f2d8f843d77e3c16.png

Click! : adelinrzo

Click! quiixx.

Click! : raizo

 

Guardian of Leaks!

 

image.png.3ca1bf60c26a3523b93df92ea8521802.png (24.01.2023)

image.png.990bdf55e8ebaad7e92cc11967598b8d.png (12.03.2023)

image.png.25e5d76f6f7de46f49423812d3d500a3.png (30.03.2023)

Link to comment
Share on other sites

  • Manager

10. This mod contains a cutscene that is triggered when the F7 key is pressed. During the cutscene, the camera and player are moved to specific locations, models are loaded, and text is displayed on the screen. Once the cutscene is complete, control is returned to the player.

{$CLEO .cs}

// Cutscene script
thread 'CUTSCENE' 
wait 500
fade 0 500
wait 500
camera -2054.0127, -22.6369, 35.0938, 0.0, 0.0, 0.0
wait 500
set_player_control 0 0
wait 1000
0173: actor $PLAYER_ACTOR walk_to -2057.3604, -22.1419, 35.1641
wait 3000
038B: load_requested_models
wait 1000
01C2: remove_references_to_actor $PLAYER_ACTOR
03E6: remove_text_box
01E3: show_text_1number_highpriority "Cutscene complete!" time 5000 flag 1 // Display text for 5 seconds
fade 1 500
wait 500
camera -2065.6746, -29.5839, 35.2422, 0.0, 0.0, 0.0
wait 500
set_player_control 1 1
end_thread

// Main script
thread 'MAIN'
repeat
    wait 0
until
    00E1: player 0 pressed_key 18 // F7 key

// Start the cutscene when the F7 key is pressed
gosub 'CUTSCENE'

end_thread

 

1.png.56210348f845fad9f2d8f843d77e3c16.png

Click! : adelinrzo

Click! quiixx.

Click! : raizo

 

Guardian of Leaks!

 

image.png.3ca1bf60c26a3523b93df92ea8521802.png (24.01.2023)

image.png.990bdf55e8ebaad7e92cc11967598b8d.png (12.03.2023)

image.png.25e5d76f6f7de46f49423812d3d500a3.png (30.03.2023)

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...