This is designed to attempt to fix injection detections and certain native executions, NOT completely bypass native calls like CreateVehicle, etc.
Lean provides two simulation methods for injecting code into a resource context. Both aim to reduce detection risk, but differ in reliability and execution consistency/methodology.
Simulate1 (Safer, but less reliable successful injections)
Execute code within a specific resource context using method 1.
Parameters
resourceName (string) β Name of the target resource, or βanyβ to target a random found injectable resource
code (string) β Lua code to execute inside the resource context
Returns
Example
Simulate2 (More reliable, recommended for stability)
Execute code within a specific resource context using method 2.
Parameters
resourceName (string) β Name of the target resource, or βanyβ to target a random found injectable resource
code (string) β Lua code to execute inside the resource context
Returns
Example
Key Differences
Recommendation
- Use Simulate1 when prioritizing maximum injection detection avoidance and safety when calling certain natives or funcs
- Use Simulate2 when you need consistent execution and are unlikely to fail, although certain detections can occur due to this being the less safe method.