evtl fix expired object
This commit is contained in:
@@ -4,6 +4,7 @@ import game from "../..";
|
||||
|
||||
class RageEntity implements IEntity {
|
||||
private entity: EntityMp;
|
||||
private entityType: string;
|
||||
public __attachments: any[];
|
||||
public __attachmentObjects: any[];
|
||||
|
||||
@@ -16,7 +17,7 @@ class RageEntity implements IEntity {
|
||||
}
|
||||
|
||||
exists() {
|
||||
switch (this.entity.type) {
|
||||
switch (this.entityType) {
|
||||
case "player":
|
||||
return mp.players.exists(this.entity as PlayerMp);
|
||||
case "vehicle":
|
||||
@@ -45,6 +46,7 @@ class RageEntity implements IEntity {
|
||||
|
||||
constructor(entity: EntityMp) {
|
||||
this.entity = entity;
|
||||
this.entityType = this.entity.type;
|
||||
}
|
||||
|
||||
get type(): EntityType {
|
||||
|
||||
Reference in New Issue
Block a user