stuyk / altv-athena Goto Github PK
View Code? Open in Web Editor NEWA Roleplay Framework for alt:V by Stuyk
Home Page: https://athenaframework.com/
A Roleplay Framework for alt:V by Stuyk
Home Page: https://athenaframework.com/
Remove husky from the build pipeline.
Explore options for forcing code styling through prettier cli or something else.
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
If an item hascanTrade=false
or canDrop=false
, it should not render the Give and Drop options on the page
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.
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)
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
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'));
Make the fuel station plugin allow you to specify how much fuel you want to actually purchase.
Taken from Discord from KeRR.
Currently rewriting the inventory. This is just an issue to track what's being done for it.
If you want a full breakdown of the work necessary for this rework you can see it here:
https://discord.com/channels/790039623648542760/1002195465460265000/1002205650073423923
The interface is already mostly complete for the rework.
First, thank you for the awesome project.
Many of the import statements throughout the project are relative imports like here:
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.
Please add vehicle rotation option. Ty
[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
This is more of a 'data entry' related task but going through and creating a list of acceptable fuel types.
We'll keep it very simple.
Relevant Files:
https://github.com/Stuyk/altv-athena/blob/master/src/core/shared/information/vehicles.ts
https://github.com/Stuyk/altv-athena/blob/master/src/core/shared/interfaces/vehicleInfo.ts
The icons in the inventory didnt load and the item sound are disable?
Everything is in the title
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:
/getitem
check through ItemFactory.get
first.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;
Because of how many things use the class version above; we can create incremental performance increases by migrating to just using consts entirely.
If you decide to make a PR for these refactor changes. Please make sure to tag your commit with #299
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.
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;
}
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:
A more detailed discussion and reasons can be found here and here
Missing start.sh script for linux
When you open an inventory with i
you should be able to close it with i
.
Taken from Discord from KeRR.
Let me know if those features are already implemented.
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;
}
....
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.
I noticed that when you park a car out of the garage and it spawns the GameControls are reactivated but the webview does not close.
@Stuyk confirmed this. Here is the desired issue :)
clean 3.9.0
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?
@server
or @client
or @shared
slim
Athena down to what is actually core; and remove anything extra.Why?
slim
Athena.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.
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?
Why does the project have a fivem tag?
alt.Vehicle IDs starting at 1 and not at 0. The OwnedVehicle IDs for lookups are starting with 0.
particles got
delay
dict
duration
name
pos
scale
there is color
missing :(
(not every particle supports color)
Hello author, could you please explain how to build it in detail? I'd like to study it. Thank you
Is it correct that this project is "fully" opensource but i cant use it without the codesnipped from the chargeable Api?
Hello,
I did a lot of research to install the framework on my pterodactyl (server manager) but I can't do it..
Can you help me please ?
Thanks in advance,
Sincerely,
F. Miller
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.
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)
In current branch it is not possible to change appearance to native-like skins, for example zombie skin or animal skins. the game just simply crashes.
Attached the crashdumpfiles.
altv_release_14.44_rgl_0x71c653_23-06-30_07-42-23.zip
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
Hi About RmlUi ,I found that all input boxes do not support Chinese language input.
Can anyone help optimize it.
===> 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?
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.