Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs events section rework #300

Draft
wants to merge 4 commits into
base: dev
Choose a base branch
from
Draft

Docs events section rework #300

wants to merge 4 commits into from

Conversation

WelaurS
Copy link
Contributor

@WelaurS WelaurS commented Mar 8, 2024

Modifying the events section of the documentation to include a description of each event with an example of use.

Marked as a draft for discussion and further additions

let colshape = new alt.ColshapeSphere(new alt.Vector3(0, 0, 71), 5, 10);

alt.on("entityEnterColshape", (colshape, entity) => {
if (entity.type === alt.BaseObjectType.Player) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your example is js but you use ts enums

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then maybe there is a point to add them to alt exports?

or is there another workaround to detect entity type?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can also check entity type like this:

entity instanceof alt.Player

This comment was marked as resolved.

@xLuxy
Copy link
Contributor

xLuxy commented Sep 16, 2024

Hey @WelaurS, what's the current status on this? Are you still interested in working on it?

@WelaurS
Copy link
Contributor Author

WelaurS commented Sep 16, 2024

Hi @xLuxy. I was working for while, but then I read about possible changes to API and changes to documentation engine, then I stopped working. Perhaps I'll continue after I'm free from my own work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants