> For the complete documentation index, see [llms.txt](https://barcode.gitbook.io/ps5-controller/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://barcode.gitbook.io/ps5-controller/code-examples/call-of-duty-modern-warfare-iii.md).

# Call of Duty Modern Warfare III&#x20;

#### 1. **Drop Shot Script**

**Description: Double-tap Circle to go prone while firing, and then stop firing after 2 seconds.**

```plaintext
# Binds
bind onDoublePress(buttonCircle) to dropShot     # Triggers drop shot on double-tapping Circle

# Actions
action dropShot:
    pressAndHold(buttonCircle, 2s)               # Hold Circle for 2 seconds to go prone
    log("Drop shot executed!")                   # Log the action
end
```

#### 2. **YY Quick Switch Script**

**Description: Double-tap Triangle to quickly switch weapons (used to cancel animations).**

```plaintext
# Binds
bind onDoublePress(buttonTriangle) to quickSwitch      # Executes 'quickSwitch' when Triangle (Y button) is double-pressed

# Actions
action quickSwitch:
    press(buttonTriangle)              # Press Triangle once
    wait(100ms)                        # Small wait to simulate a quick double tap
    press(buttonTriangle)              # Press Triangle again
    log("Quick switch executed!")      # Log the action
end
```

#### 3. **Slide-Cancel Script**

**Description: Double-tap Circle to slide and immediately cancel with a jump.**

```plaintext
# Binds
bind onDoublePress(buttonCircle) to slideCancel   # Triggers slide cancel on double-tapping Circle

# Actions
action slideCancel:
    press(buttonCircle)                           # Press Circle to slide
    wait(200ms)                                   # Short wait to initiate the slide
    press(buttonX)                                # Press X to jump out of the slide
    log("Slide canceled!")                        # Log the action
end
```

#### 4. **Tactical Sprint Reset Script**

**Description: Automatically resets the tactical sprint every 2 seconds while L3 is held.**

```plaintext
# Binds
bind onHold(L3) to tacticalSprint    # Executes 'tacticalSprint' when L3 is held

# Actions
action tacticalSprint:
    enableLoop                       # Start the loop to reset the sprint
    loop sprintLoop every 2s:        # Loop every 2 seconds to simulate a reset
        press(L3)                    # Press L3 to initiate sprint
        wait(100ms)                  # Wait to stabilize sprint initiation
        log("Tactical sprint reset!") # Log the action
    end
end
```

#### 5. **Drop-Cancel Script**

**Description: Double-tap Circle to drop to prone and then immediately return to crouch.**

```plaintext
# Binds
bind onDoublePress(buttonCircle) to dropCancel    # Triggers drop-cancel on double-tapping Circle

# Actions
action dropCancel:
    pressAndHold(buttonCircle, 1.5s)              # Hold Circle for 1.5 seconds to go prone
    wait(200ms)                                   # Short wait to simulate prone state
    press(buttonCircle)                           # Press Circle to stand or return to crouch
    log("Drop canceled!")                         # Log the action
end
```

#### 6. **Auto-Sniper Breath Hold Script**

**Description: Automatically holds breath when aiming down sights (ADS) with L2.**

```plaintext
# Binds
bind onHold(L2) to holdBreath         # Executes 'holdBreath' when L2 is held

# Actions
action holdBreath:
    press(L3)                         # Simulate holding breath by pressing L3
    wait(100ms)                       # Hold breath duration (adjust as needed)
    log("Breath held for sniping!")   # Log the action
end
```

#### 7. **Quick Melee Script**

**Description: Double-tap R3 to perform a quick melee attack.**

```plaintext
# Binds
bind onDoublePress(R3) to quickMelee              # Executes 'quickMelee' on double-tapping R3

# Actions
action quickMelee:
    press(R3)                                     # Press R3 for a melee attack
    log("Quick melee attack executed!")           # Log the action
end
```

#### 8. **Reload Cancel Script**

**Description: Double-tap Square to cancel reload animation (helps maintain readiness).**

```plaintext
# Binds
bind onDoublePress(buttonSquare) to reloadCancel  # Executes 'reloadCancel' on double-tapping Square

# Actions
action reloadCancel:
    press(buttonTriangle)                         # Switch weapons with Triangle to cancel the reload
    wait(100ms)                                   # Small wait
    press(buttonTriangle)                         # Switch back to the original weapon
    log("Reload canceled!")                       # Log the action
end
```

#### 9. **Fast Tactical Grenade Throw Script**

**Description: Press L1 to automatically aim and throw a tactical grenade.**

```plaintext
# Binds
bind onPress(L1) to throwTactical       # Executes 'throwTactical' on pressing L1

# Actions
action throwTactical:
    pressAndHold(L1, 1s)                # Hold L1 to aim grenade for 1 second
    press(R2)                           # Release grenade with R2
    log("Tactical grenade thrown!")     # Log the action
end
```
