alt.evalModule

Used to execute JavaScript code that is written in string format. Useful when you want to execute some unique code that you want to pass down from server-side.

Basically it's eval just renamed

Declaration

alt.evalModule(code: string): Record<string, any>

Usage

const someResult = alt.evalModule("console.log('logged')");

Example

const someResult = alt.evalModule("console.log('logged')");

console.log(someResult);

These examples assume you have imported alt from alt-client.

results matching ""

    No results matching ""