Disables all emissive textures, street/building/vehicle lights. "EMP" effect.
On or off.
Get the opacity of current cloud hat. Value is between 0-1.
The current cloud opacity between 0.0 and 1.0
Set opacity of current cloud hat between 0-1.
Opacity between 0.0 and 1.0
The current cloud opacity between 0.0 and 1.0
Get the current date in the world.
The current date.
Set the current date of the world.
The current date.
Get the current camera that's rendering.
The camera that's currently used.
Set the rendering camera. World.RenderingCamera = null to reset.
const position = new Vector3(-802.311, 175.056, 72.8446);
const myCamera = World.createCamera(position, new Vector3(0,0,0), 180);
World.RenderingCamera = myCamera;
// Reset to default cam
World.RenderingCamera = null;
The camera to render.
The camera that's currently used.
Create a pickup in a specific position in the world with a specified type and value.
The [[PickupType
]] of pickup.
The position in the world it should be spawned.
The model of the spawned pickup.
Give a value for the pickup when picked up.
If set, create a rotating pickup with this rotation.
Pickup object.
Creates a blip at a given position and optionally radius.
const position = new Vector3(-802.311, 175.056, 72.8446);
const myStoreBlip = World.createBlip(position, 5.0);
myStoreBlip.Sprite = BlipSprite.Store;
World coordinate of blip.
(Optional) Radius of where blip should be shown.
Blip object.
Creates a cam that defaults to {@link CameraTypes.Scripted}
const cam = World.createCamera(CameraTypes.Spline, true);
unknown
Creates a camera using 'DEFAULT_SCRIPTED_CAMERA'.
const position = new Vector3(-802.311, 175.056, 72.8446);
const myCamera = World.createCameraWithParams(position, new Vector3(0,0,0), 180);
World coordinate where the camera should render.
Rotation of camera relative to world.
Field of view angle of camera.
Camera object.
Create a ped at a desired location.
const position = new Vector3(-802.311, 175.056, 72.8446);
const model = new Model("a_f_m_beach_01");
const myPed = await World.createPed(model, position);
Ped model to be spawned.
World position (coordinates) of Ped spawn.
Heading of Ped when spawning.
Ped object.
Spawns a Prop
at the given position.
const position = new Vector3(-802.311, 175.056, 72.8446);
const model = new Model("prop_barrel_02a");
const myBarrelProp = await World.createProp(model, position, false, true);
The Model
to spawn (must be a Prop)
Location of Prop
If set to true, the Prop will have physics otherwise it's static.
If set to true, sets the Prop on the ground nearest to position.
Prop object.
Create a random vehicle at a desired location.
const position = new Vector3(-802.311, 175.056, 72.8446);
const randomVehicle = await World.createRandomVehicle(position);
World position (coordinates) of Vehicle spawn.
Heading of Vehicle when spawning.
Vehicle object.
Create a vehicle at a desired location.
const position = new Vector3(-802.311, 175.056, 72.8446);
const model = new Model("adder");
const myVehicle = await World.createVehicle(model, position);
Vehicle model to be spawned.
World position (coordinates) of Vehicle spawn.
Heading of Vehicle when spawning.
Vehicle object.
Destroys all existing cameras and sets your rendering camera back to GameplayCam.
Draw a marker at a desired location. Careful! Must be drawn every tick.
const position = new Vector3(-802.311, 175.056, 72.8446);
const zeroVector = new Vector3(0,0,0);
setTick(() => {
World.drawMarker(MarkerType.ThickChevronUp, position, zeroVector, zeroVector, 1.0, new Color(255,0,0));
})
Type of marker.
Location of marker.
Direction facing.
World rotation.
Size of marker.
Color of marker.
Animated movement along marker's own X axis.
Rendering marker facing rendering camera.
Rotate along Y axis.
Custom texture dictionary for custom marker.
Custom texture name for custom marker.
Render the marker on an entity.
Creates a light in the world. More configurable than World.drawLightWithRange.
World coordinate of spotlight.
Direction to face spotlight.
RGB colors of spotlight.
The maximum distance the spotlight can reach.
Brightness of the spotlight.
"Smoothness" of the edge of the spotlight.
Radius size of spotlight.
Falloff size of the spotlight's edge.
Creates a light in the world. Same as World.drawSpotlight, but also draws shadows.
World coordinate of spotlight.
Direction to face spotlight.
RGB colors of spotlight.
The maximum distance the spotlight can reach.
Brightness of the spotlight.
"Smoothness" of the edge of the spotlight.
Radius size of spotlight.
Falloff size of the spotlight's edge.
Get all Ped
entities in your own scope.
We recommend using getAllPedsInGamePool instead.
Array of Peds.
Get all Pickup
entities in your own scope.
We recommend using getAllPickupsInGamePool instead.
Array of Pickups.
Get all Prop
entities in your own scope.
We recommend using getAllPropsInGamePool instead.
Array of Props.
Get all Vehicle
entities in your own scope.
We recommend using getAllVehiclesInGamePool instead.
Array of Vehicles.
Cast ("shoot") a ray in a certain direction to detect entities in the way.
Starting position of raycast.
Direction to cast a ray to.
Max distance to cast the ray.
Possible entity types to detect.
An entity to ignore (usually player's Ped).
RaycastResult object.
Transition to different weather type within a certain time.
Weather type to change to.
Time for full weather change (in milliseconds);
Generated using TypeDoc
Class with common world manipulations.
This class includes methods for creating entities and common world rendering.
You can create blips, entities, cameras and more.