Skip to content

Commit

Permalink
example fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
WelaurS committed Mar 14, 2024
1 parent ae25dd2 commit 02a8e77
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 32 deletions.
29 changes: 0 additions & 29 deletions docs/articles/events/server/before-player-connect.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/articles/events/server/entity-enter-colshape.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import alt from "alt-server";
let colshape = new alt.ColshapeSphere(new alt.Vector3(0, 0, 71), 5, 10);

alt.on("entityEnterColshape", (colshape, entity) => {
if (entity.type === alt.BaseObjectType.Player) {
if (entity.type instanceof alt.Player) {
console.log(`Player ${entity.name} entered colshape ${colshape.id}`);
}
});
Expand Down
2 changes: 1 addition & 1 deletion docs/articles/events/server/entity-leave-colshape.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import alt from "alt-server";
let colshape = new alt.ColshapeSphere(new alt.Vector3(0, 0, 71), 5, 10);

alt.on("entityLeaveColshape", (colshape, entity) => {
if (entity.type === alt.BaseObjectType.Player) {
if (entity instanceof alt.Player) {
console.log(`Player ${entity.name} left colshape ${colshape.id}`);
}
});
Expand Down
2 changes: 1 addition & 1 deletion docs/articles/events/server/net-owner-change.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Triggered when netOwner of the entity changes.
import alt from "alt-server";

alt.on("netOwnerChange", (entity, owner, oldOwner) => {
if (entity.type === alt.BaseObjectType.Ped) {
if (entity instanceof alt.Ped) {
alt.log(`Ped ${entity.id} has a new owner: ${owner ? owner.id : "null"}, old owner: ${oldOwner ? oldOwner.id : "null"}`);
}
});
Expand Down

0 comments on commit 02a8e77

Please sign in to comment.