From 32195263502966cc7bfbbcc3b4c15411069d2653 Mon Sep 17 00:00:00 2001 From: Mathis Cucci Date: Wed, 19 Jun 2019 23:16:47 +0200 Subject: [PATCH 1/2] Link to new way to get all Players, Vehicles & cursorPos --- docs/ClientAPI/modules/alt/classes/Player/index.md | 1 + .../ClientAPI/modules/alt/classes/Vehicle/index.md | 1 + docs/ClientAPI/modules/alt/index.md | 14 +++++++++++--- .../nodejs/modules/alt/classes/Player/index.md | 1 + .../nodejs/modules/alt/classes/Vehicle/index.md | 1 + 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/docs/ClientAPI/modules/alt/classes/Player/index.md b/docs/ClientAPI/modules/alt/classes/Player/index.md index b078948..69c9d7a 100644 --- a/docs/ClientAPI/modules/alt/classes/Player/index.md +++ b/docs/ClientAPI/modules/alt/classes/Player/index.md @@ -6,6 +6,7 @@ | Property name | Type | Access | Inherited from | Description | | -------------- | ----------- | -------- | -------- | ----------- | +| all | Array | get | | Replace alt.players since build 569 | | name | string | get | | | | scriptID | number | get | | | | vehicle | Vehicle | get | | | diff --git a/docs/ClientAPI/modules/alt/classes/Vehicle/index.md b/docs/ClientAPI/modules/alt/classes/Vehicle/index.md index c24da51..b42afbf 100644 --- a/docs/ClientAPI/modules/alt/classes/Vehicle/index.md +++ b/docs/ClientAPI/modules/alt/classes/Vehicle/index.md @@ -6,6 +6,7 @@ | Property name | Type | Access | Inherited from | Description | | -------------- | ----------- | -------- | -------- | ----------- | +| all | Array | get | | Replace alt.vehicles since build 569 | | gear | number | get | | | | rpm | number | get | | | | scriptID | number | get | | | diff --git a/docs/ClientAPI/modules/alt/index.md b/docs/ClientAPI/modules/alt/index.md index 1dec792..65bcb94 100644 --- a/docs/ClientAPI/modules/alt/index.md +++ b/docs/ClientAPI/modules/alt/index.md @@ -14,9 +14,9 @@ | Property name | Type | Access | Description | | -------------- | ----------- | -------- | ----------- | -| cursorPos | object | set, get | | -| players | Array | get | | -| vehicles | Array | get | | +| cursorPos | object | set, get | Removed in Build 569 | +| players | Array | get | Removed in Build 569 | now alt.Player.all => [Player](docs/ClientAPI/modules/alt/classes/Player/index.md) | +| vehicles | Array | get | Removed in Build 569 | now alt.Vehicle.all => [Vehicle](docs/ClientAPI/modules/alt/classes/Vehicle/index.md) | ## Methods @@ -190,4 +190,12 @@ function toggleGameControls(state: boolean); function wait(waitTime: number); ``` +* [getCursorPos](docs/ClientAPI/modules/alt/method_getCursorPos.md) +```js +function getCursorPos(); +``` +* [setCursorPos](docs/ClientAPI/modules/alt/method_setCursorPos.md) +```js +function setCursorPos(cursorPos: object); +``` diff --git a/docs/ServerAPI/nodejs/modules/alt/classes/Player/index.md b/docs/ServerAPI/nodejs/modules/alt/classes/Player/index.md index bc2df1b..1a88323 100644 --- a/docs/ServerAPI/nodejs/modules/alt/classes/Player/index.md +++ b/docs/ServerAPI/nodejs/modules/alt/classes/Player/index.md @@ -6,6 +6,7 @@ | Property name | Type | Access | Inherited from | Description | | -------------- | ----------- | -------- | -------- | ----------- | +| all | Array | get | | Replace alt.players since build 569 | | health | number | get | | | | name | string | set, get | | | | ping | number | get | | | diff --git a/docs/ServerAPI/nodejs/modules/alt/classes/Vehicle/index.md b/docs/ServerAPI/nodejs/modules/alt/classes/Vehicle/index.md index d3369b5..6562231 100644 --- a/docs/ServerAPI/nodejs/modules/alt/classes/Vehicle/index.md +++ b/docs/ServerAPI/nodejs/modules/alt/classes/Vehicle/index.md @@ -11,6 +11,7 @@ new Vehicle(model: string, x: number, y: number, z: number, rx: number, ry: numb | Property name | Type | Access | Inherited from | Description | | -------------- | ----------- | -------- | -------- | ----------- | | activeRadioStation | number | set, get | | | +| all | Array | get | | Replace alt.vehicles since build 569 | | bodyAdditionalHealth | number | set, get | | | | bodyHealth | number | set, get | | | | customPrimaryColor | object | set, get | | | From e3e7587d6ce830c0823754e9558080044dd8d215 Mon Sep 17 00:00:00 2001 From: Mathis Cucci Date: Wed, 19 Jun 2019 23:23:17 +0200 Subject: [PATCH 2/2] Add getCursorPosition/setCursorPosition method files and small example --- docs/ClientAPI/modules/alt/method_getCursorPos.md | 7 +++++++ docs/ClientAPI/modules/alt/method_getCursorPos_m.md | 10 ++++++++++ docs/ClientAPI/modules/alt/method_setCursorPos.md | 7 +++++++ docs/ClientAPI/modules/alt/method_setCursorPos_m.md | 10 ++++++++++ 4 files changed, 34 insertions(+) create mode 100644 docs/ClientAPI/modules/alt/method_getCursorPos.md create mode 100644 docs/ClientAPI/modules/alt/method_getCursorPos_m.md create mode 100644 docs/ClientAPI/modules/alt/method_setCursorPos.md create mode 100644 docs/ClientAPI/modules/alt/method_setCursorPos_m.md diff --git a/docs/ClientAPI/modules/alt/method_getCursorPos.md b/docs/ClientAPI/modules/alt/method_getCursorPos.md new file mode 100644 index 0000000..9bc2b9c --- /dev/null +++ b/docs/ClientAPI/modules/alt/method_getCursorPos.md @@ -0,0 +1,7 @@ +## alt.getCursorPos + +```js +function getCursorPos(); +``` + +[filename](method_getCursorPos_m.md ':include') \ No newline at end of file diff --git a/docs/ClientAPI/modules/alt/method_getCursorPos_m.md b/docs/ClientAPI/modules/alt/method_getCursorPos_m.md new file mode 100644 index 0000000..163ffa2 --- /dev/null +++ b/docs/ClientAPI/modules/alt/method_getCursorPos_m.md @@ -0,0 +1,10 @@ +## Example + +```js +const cursorPosition = alt.getCursorPos(); +alt.log(cursorPosition.x + " | " + cursorPosition.y); +``` +Will print you your current cursor position + +## References + diff --git a/docs/ClientAPI/modules/alt/method_setCursorPos.md b/docs/ClientAPI/modules/alt/method_setCursorPos.md new file mode 100644 index 0000000..bf73a1e --- /dev/null +++ b/docs/ClientAPI/modules/alt/method_setCursorPos.md @@ -0,0 +1,7 @@ +## alt.setCursorPos + +```js +function setCursorPos(cursorPos: object); +``` + +[filename](method_setCursorPos_m.md ':include') \ No newline at end of file diff --git a/docs/ClientAPI/modules/alt/method_setCursorPos_m.md b/docs/ClientAPI/modules/alt/method_setCursorPos_m.md new file mode 100644 index 0000000..bbbe937 --- /dev/null +++ b/docs/ClientAPI/modules/alt/method_setCursorPos_m.md @@ -0,0 +1,10 @@ +## Example + +```js +alt.setCursorPos({x: 1920/2, y: 1080/2}); +``` + +Will set your cursor to midscreen if your playing in 1920x1080 + +## References +