From 03db8bd1a3dad3e2ffa51dfe3e2e022411a72858 Mon Sep 17 00:00:00 2001 From: xshady <54737754+xxshady@users.noreply.github.com> Date: Wed, 10 Apr 2024 12:28:31 +0300 Subject: [PATCH] fix: object streaming article (#82) --- articles/tutorials/stream_objects.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/articles/tutorials/stream_objects.md b/articles/tutorials/stream_objects.md index 014f475..547d0f8 100644 --- a/articles/tutorials/stream_objects.md +++ b/articles/tutorials/stream_objects.md @@ -15,7 +15,7 @@ Just throw the dlc.rpf as resource (available since [v15](https://docs.altv.mp/a ``` . ├── resources/ -│ └── altvlogo/ +│ └── / │ └── dlc.rpf └── server.toml ``` @@ -23,11 +23,11 @@ Just throw the dlc.rpf as resource (available since [v15](https://docs.altv.mp/a > [!NOTE] > `resource.toml` is not even needed! -Add "meteor" resource to `resources` in `server.toml` like this: +Add your resource to `resources` in `server.toml` like this: ```toml resources = [ - "altvlogo", + "", # other resources... ] ``` @@ -95,9 +95,9 @@ Add the `altvlogo` (folder name is your resource name) to the `server.toml` file To spawn the object now, use the following snippet: ```js -async function spawnLogo() { - const modelHash = alt.hash("tw_altv_logo"); - await alt.Utils.requestModel(modelHash); - native.createObject(modelHash, 0, 0, 100, false, false, false); -} +import alt from 'alt-client'; + +const pos = new alt.Vector3(0, 3, 72); +const rot = alt.Vector3.zero; +new alt.LocalObject('tw_altv_logo', pos, rot); ```