Git Product home page Git Product logo

altv-athena's Introduction

Stuyk (Pronounced as 'Stuck')

Currently working as a Senior Software Engineer for All in Bits

Work History

Hi, here's a brief summary of my work over the years.

  • Worked 5 years at Ultra.io and built wallets, protocol changes, visual studio code extensions, applications, ci/cd pipelines, smart contracts, and decentralized applications.

    • Created their 1st Proof of Concept Wallet
    • Built their 1st NFT Contract
    • Built their discord to blockchain smart contract linking
    • Built their smart contract toolkit
    • Built their ci/cd pipeline across multiple repositories
    • Built their ledger library for better eos integration
  • Built a 400+ File GTA:V Roleplay Framework for alt:V with TypeScript, Vue, and MongoDB

  • Built the original resource hub for alt:V

  • Helped manage the alt:V Discord by providing support, and professional outlook that created a welcoming development space.

  • Wrote a book on C# development for rage:mp

  • Created Hardware Store for Stardew Valley

  • Created Longer Days for Stardew Valley

  • Created Modern Modulars for Fallout 4

  • Created Simply Modular Housing for Fallout 4

  • Created Alternate Settlements for Fallout 4

  • Created the original Settlement Keywords for Fallout 4

  • Created a prcoedural dungeon generator for Fallout 4

  • Featured in PC Gamer Magazine 2011 December for Level Design for Alien Swarm

Frameworks

Vue, Tailwind CSS, REST, Vite, Vitest, SWC, Electron, GraphQL

Languages

TypeScript, JavaScript, HTML, CSS, C#, GDScript, Go, C++

Other

Node.js, MongoDB, MySQL, Docker, CI/CD, Git, Ledger, GCP, Godot

altv-athena's People

Contributors

booster1212 avatar canakil avatar datmayo avatar dav-renz avatar deemace avatar domeplayshd avatar dotdevpro avatar dylanwritescode avatar flavianooo avatar fnkybot avatar frankofm avatar gotgameio avatar itsspencer avatar jonasesser avatar jonesxyz avatar justzerooo avatar konijima avatar kuroosh avatar leonardssh avatar mathieugermain avatar mohamedamrmahdy avatar pavinrex avatar r3diance avatar ravenous47 avatar shareghzadeh avatar shirobaka avatar stuyk avatar unfloned avatar xluxy avatar yiin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

altv-athena's Issues

package-lock.json is not in sync

try npm ci - this will try install packages with respect of lock file and it will fail saying

can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in syn

to fix this issue just use npm i and commit latest package-lock.json file

faction.vehicles.find

After restarting the server failure on vehicle check for already spawned faction vehicles

branch 3.0.4

[21:36:57][Error] [V8] Exception at core:file:///C:/Users/Server/altv-athena-private/altv-private/resources/core/server-plugins/core-factions/src/funcs.js:68
[21:36:57][Error] const index = faction.vehicles.findIndex((fv)=>fv.id === vehicle.data._i...
[21:36:57][Error] TypeError: Cannot read property 'findIndex' of undefined
at handleFactionVehicleChecks (file:///C:/Users/Server/altv-athena-private/altv-private/resources/core/server-plugins/core-factions/src/funcs.js:68:40)
at Function.check (file:///C:/Users/Server/altv-athena-private/altv-private/resources/core/server/systems/rules.js:22:28)
at toggleLock (file:///C:/Users/Server/altv-athena-private/altv-private/resources/core/server/systems/vehicle.js:355:26)

updateFuel() skip when vehicle is not created by athena.

If updateFuel called for any vehicle not created with athena will get error:

[V8] Exception at server:resources/server/server/0.main.js:2500
[22:18:05][Error]       if (!isNaN(vehicle.data.fuel)) {
[22:18:05][Error]   TypeError: Cannot read property 'fuel' of undefined
at Object.updateFuel (resources/server/server/0.main.js:2500:29)
at handlePing (resources/server/server/0.main.js:3738:85)

Fix is simple:

server/extensions/vehicleFunctions/setter.ts:

function updateFuel(vehicle: alt.Vehicle) {
    // If vehicle is not created by athena skip it.
    if (!vehicle.data.uid) {
      return;
    }
    ....

Cannot access 'enabled' Error

Just wanted to try out Athena again and got this Error i tried multiple things but nothing worked.

(Yes i tried npm fix)

grafik

Mask stuck in face

  1. Equip mask
  2. Unequip mask
    if i use "Athena.systems.inventory.clothing.update(player)", the mask remains

Move Away from Classes with Static Function Calls

Anything that uses classes, should use consts instead.

Old Code

export class Something {
    static init() {
        console.log('hello world');
    }
}

Something.init();

New Code

const Something2 = {
    init() {
        console.log('hello world');
    }
}

Something2.init();

export Something2;

Why?

Because of how many things use the class version above; we can create incremental performance increases by migrating to just using consts entirely.

Making the Commit

If you decide to make a PR for these refactor changes. Please make sure to tag your commit with #299

Objects not always fully removed from client-side.

This bug is really difficult to reproduce; but also fix. We've tried dozens of solutions with no fix in sight.

The simplest way to reproduce the bug is to give yourself a full inventory of single items.

Drop all of the items in one place.

Then pick them all back up.

If reproduced correctly you will see 1 object with no text label above it.

Respawn broken.

At this moment, i found a solution for that, but it can not be last forever.

Try this until Stuyk found other options for that.

src/core/plugins/core-death/client/index.ts

Make it comment for this line:

    /*if (!alt.Player.local.isDead) {   <---THIS
            return;
        }

        if (isAnyMenuOpen(false)) {
            return;
        }*/     <--- to here! CAUTION! Until this line

   Only this IF part. 



For the, atm it is working.

About RmlUi

Hi About RmlUi ,I found that all input boxes do not support Chinese language input.
Can anyone help optimize it.

Add Temporary Markers

I think it would be nice to have a "duration-option for the MarkerController which will remove the Marker after the specified duration.

Which can be usefull for i.e. Temporary Editors, and something else.

About the vehicle sound

Dear author, I would like to ask how to add a sound wave to the ALTV platform, so that I can share how to put the file? Also, how should the module clothes be added?

Chat opening conflict with leaving the vehicle

Press the chat open button while leaving the vehicle and you will not be able to do anything except open the F8 console.

I can't confirm if this is my own problem,so please test yourselves.

I get the Following issue after running: "npm run linux"

===> Starting Server Process
./altv-server: 1: Syntax error: "(" unexpected
Server process exited with code 2
===> Starting Server Process
./altv-server: 1: Syntax error: "(" unexpected
Server process exited with code 2
===> Starting Server Process
./altv-server: 1: Syntax error: "(" unexpected
Server process exited with code 2
===> Starting Server Process
./altv-server: 1: Syntax error: "(" unexpected
Server process exited with code 2
===> Starting Server Process
./altv-server: 1: Syntax error: "(" unexpected
Server process exited with code 2
(repating forever ...)

is something wrong when going throu the current installer or why is it broke?

How to Repair?

How to repair it?

Console

[12:42:21] alt:V Server 2.23 (release)
[12:42:21] Starting alt:V Athena Roleplay Framework on 0.0.0.0:7788
[12:42:21] Loading resource altv-ares
[12:42:21][Error] Could not open resource.cfg
[12:42:21][Error] Failed to load resource altv-ares
[12:42:21] Loading resource core
[12:42:21][Error] Could not open resource.cfg
[12:42:21][Error] Failed to load resource core
[12:42:21] Required server permissions:
[12:42:21] Optional server permissions:
[12:42:21] Starting HTTP server on 0.0.0.0:7788
[12:42:21] Main thread started (ThreadId: 2144)
[12:42:21] VoicePacketProcess thread started (ThreadId: 16280)
[12:42:21] VoiceStreamer thread started (ThreadId: 7544)
[12:42:21] Colshape thread started (ThreadId: 18156)
[12:42:21] EntityStreamer thread started (ThreadId: 17860)
[12:42:21] Network thread started (ThreadId: 18392)
[12:42:21] Console thread started (ThreadId: 9668)
[12:42:21] Server started

Explore Plugin Folder Move

Athena currently requires all plugins to be placed inside of src/core/plugins.

It would make more sense to create a new folder just called plugins and that's where all plugins go.

What would this require and change?

  • Pathing helpers in tsconfig for @server or @client or @shared
  • Moving all plugins to individual repositories and keeping them out of the core framework.
    • This would be an effort to slim Athena down to what is actually core; and remove anything extra.
  • This would require users to download additional plugins when they get Athena.
    • Allows for more customization, and they are not forced to use core plugins outright.
  • Lots of unknowns from a file resolve perspective.

Why?

  • This removes unnecessary plugins that come with Athena.
  • Instead it focuses on just a few core plugins needed for starting the server.
  • Allows for other game modes to be quickly built out from a slim Athena.

Persistent vehicle spawn doesn't check for duplicate

Hello -

When using Athena.vehicle.spawn.persistent(), the underlying code doesn't actually check if the vehicle is already spawned. It uses Athena.document.vehicle.exists(), which checks if a vehicle exists, but not if it is spawned.

Thus, I suggest that line 74 of src/core/server/vehicle/spawn.ts gets changed to:
Athena.vehicle.get.spawnedVehicleByDocumentID()

This way, the spawn system actually checks if the vehicle is spawned, rather than if a document exists for it.

Jobs Features

Some ideas to improve jobs.

Let me know if those features are already implemented.


Job events

  • OnJobCompleted
  • OnJobCanceled

Objective Counter

  • A counter that show the total objective completed vs total objectives.
  • A setting per objective to exclude it from the count.

Simultaneous objectives

  • Possibly having multiple objectives active at the same time.

Hiding other Jobs while a job is active.

  • Preventing activating other jobs too.

Hiding starting blip/marker

  • Once the job is accepted we shouldn't see the starting marker and maybe even the blip.

Maximum Time to complete

  • With a visible timer.

Static pedestrian

  • Having a static ped at the location where the job start
    (Pretending that he give you the job)
  • Having non-moving ped at an objective destination.
    (Pretending that we deliver him something)

Inventory bug

The icons in the inventory didnt load and the item sound are disable?

Consider using TypeScript path mapping for imports

First, thank you for the awesome project.
Many of the import statements throughout the project are relative imports like here:

import { SHARED_CONFIG } from '../../shared/configurations/shared';

These imports therefore have to be changed when you move the file which might be inconvenient. TypeScript provides a solution to that problem with path mapping (Docs) which is also set up in Vue projects with TypeScript (Link) and Vue itself `(Link).

With the following lines in tsconfig.json

"baseUrl": ".",
"paths": {
    "@src/*": ["src/*"]
},

the import from above could look like this:

import { SHARED_CONFIG } from '@src/core/shared/configurations/shared'; 

Did you consider this option for the project? It can also be incrementally adopted if you want to try it out.

Move Barbershop Images to Barbershop Plugin

There will need to be some additional changes to the plugin to support the file structure changes that were enabled in August. You can read about them here: https://discord.com/channels/790039623648542760/963569191951147008/1004503655250145371

Ideally we get the images in their own folder inside of the plugin, and then reference them accordingly.

Acceptance Criteria

  • Images moved out of src-webviews for hairstyle previews
  • Vue BarberShop file now references those images in the local plugin
  • A screenshot to show changes worked

Reentering the game after setting the player's uniform cannot access the character-select plugin

After setting the player uniform, even if the player uniform is removed before offline, the character information cannot be read after the next login.

error message
[Error] Uncaught exception: TypeError: Cannot read properties of null (reading 'length') at Module.update (file:///D:/altProject/alt-V-Project/resources/core/server/systems/inventory/clothing.js:252:37) at showCharacter (file:///D:/altProject/alt-V-Project/resources/core/plugins/character-select/server/index.js:54:39) at Object.show [as callback] (file:///D:/altProject/alt-V-Project/resources/core/plugins/character-select/server/index.js:35:5) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Stop prefixing interfaces with 'I'

As this may seem like a personal preference, the TypeScript handbook does not suggest prefixing interfaces with 'I'.
This convention is borrowed from the past and I believe this project shouldn't use it since:

  • it is against encapsulation principles.
  • Hungarian notation times are long gone.
  • it is a bad naming convention.
  • major TypeScript based frameworks and libraries discourage from this (Angular, lib.d.ts etc)

A more detailed discussion and reasons can be found here and here

fivem tag?

Why does the project have a fivem tag?

Remove Husky

Remove husky from the build pipeline.

Explore options for forcing code styling through prettier cli or something else.

/getitem - Also get items by `dbName`

Currently the /getitem command only gets items based on their actual name.

Needs to support fetching items by dbName which can be done with this function:

static async get(dbItemName: string): Promise<Item | null> {

  • Make the /getitem check through ItemFactory.get first.
  • If the result is undefined or null
  • Try fetching by name
  • if still undefined or null; tell the player it was not found

Feature add taxi job and more

for driving player and npc misions with taximeter npc spawn and enter in you car

Also add mechanic job for fixing player cars and add tuning shop for upgrade cars bumper engine and other

Maybe you have in plan to create this

Hope this framework will be like esx and qbcore with all jobs scripts jail and other

Update playerFuncs.emit.meta

Currently it uses an internal custom solution with alt.emitClient. This is no longer necessary and we can use player.setLocalMeta.

Requires refactoring in multiple parts of the code base.

Permission System Update

Currently command permissions are using a bitwise flag.

Bitwise flags are generally user-unfriendly for a lot of developers.

Why?

It takes some understanding to understand how a bitwise flag works.

A lot of users assume that permissions work as follows:

if (PERMISSION.MODERATOR > PERMISSION.NONE) {
// do this
}

When in reality; this is not valid.

Proposal

Remove all numerical permissions. Replace with string based assignments for permissions.

Make the permissions all the account level. Throw out character permissions.

Example:

ADMIN = 'account-admin'
MODERATOR = 'account-moderator'
MODERATOR_CHARACTER = 'character-moderator'

This will allow very specific permissions to be assigned at two levels

  • Account
  • Character

With them being assigned in this way; the permission system can add other permissions to characters that are not moderator or administrative specific.

function addPermission(player: alt.Player, 'some-permission-string') {
    if (player.accountData.permission.includes('some-permission-string') {
      return;
    }
    
    player.accountData.permission += // append here + '|'
}

function oppositeOfAdd

When stored in database should be stored like...

"character-moderator|character-admin|character-police"

Then we can verify a permission exists or permission information by just doing

if (player.accountData.permission.includes('some-permission-string'));

No function for returning { slot: number; tab: number } for an item

playerFuncs.inventory.isInInventory is currently returning { index: number; tab: number } and not { slot: number; tab: number }
So you can't get the Item with playerFuncs.inventory.getInventoryItem like in the example below.
playerFuncs.inventory.isInInventory can't be changed because it's index value is used in other functions.
I guess we need a new function where it returns the slot. Like this:

function isInInventory(p: alt.Player, item: Partial<Item>): { tab: number; slot: number } | null {
    for (let t = 0; t < p.data.inventory.length; t++) {
        const tab = p.data.inventory[t];

        if (tab.length <= 0) {
            continue;
        }

        for (let i = 0; i < tab.length; i++) {
            const inventoryItem = tab[i];
            if (!item) {
                continue;
            }

            const objectKeys = Object.keys(item);
            const keyIndex = objectKeys.findIndex((key) => item[key] === inventoryItem[key]);

            if (keyIndex <= -1) {
                continue;
            }

            return { tab: t, slot: inventoryItem.slot };
        }
    }

    return null;
}

I don't know if this is intended or not thats why I didn't make a Pull Request. And I don't know how I should name the function.

The Example I referred to found at Docs

const slotInfo: { slot: number; tab: number } | null = playerFuncs.inventory.isInInventory({ name: 'Micro SMG' });
if (!slotInfo) {
    playerFuncs.emit.message(player, `Item was not found!`);
    return;
}

const item: Item = playerFuncs.inventory.getInventoryItem(player, slotInfo.slot, slotInfo.tab);
if (!item) {
    playerFuncs.emit.message(player, `Item was not found!`);
    return;
}

'destroyOnDrop: true' - Itembehavior

Applied destroyOnDrop: true as behavior on an item, but as soon as i drop it, the item stays in the inventory. a message shows up (destroyed item), but item is still accessible and saved in the db.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.