@nativewrappers/server 0.0.167 → 0.0.169
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/entities/Player.d.ts +2 -3
- package/entities/Player.js +4 -6
- package/package.json +1 -1
package/entities/Player.d.ts
CHANGED
|
@@ -31,10 +31,9 @@ export declare class Player {
|
|
|
31
31
|
*/
|
|
32
32
|
get Src(): string;
|
|
33
33
|
/**
|
|
34
|
-
* Gets the
|
|
35
|
-
* cached
|
|
34
|
+
* Gets the player ped
|
|
36
35
|
*/
|
|
37
|
-
get Ped(): Ped;
|
|
36
|
+
get Ped(): Ped | null;
|
|
38
37
|
get Tokens(): string[];
|
|
39
38
|
get Identifiers(): string[];
|
|
40
39
|
get Endpoint(): string;
|
package/entities/Player.js
CHANGED
|
@@ -59,14 +59,12 @@ class Player {
|
|
|
59
59
|
return this.source;
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
|
-
* Gets the
|
|
63
|
-
* cached
|
|
62
|
+
* Gets the player ped
|
|
64
63
|
*/
|
|
65
64
|
get Ped() {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
return this.ped;
|
|
65
|
+
const ped = GetPlayerPed(this.source);
|
|
66
|
+
if (ped === 0) return null;
|
|
67
|
+
return new Ped(ped);
|
|
70
68
|
}
|
|
71
69
|
get Tokens() {
|
|
72
70
|
return getPlayerTokens(this.source);
|