Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Update Markdown of OSS. #27

Merged
merged 34 commits into from Jan 17, 2022
Merged
Changes from 30 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
e954160
Adding PedController
Booster1212 Dec 24, 2021
490f89a
md fix
Booster1212 Dec 24, 2021
43136db
Rebuilding Markdown for Doorsystem v2
Booster1212 Dec 25, 2021
15e66f2
Adding Images to Doorlock V2
Booster1212 Dec 25, 2021
72eb781
Merge branch 'main' of https://github.com/Stuyk/altv-athena-plugins-md
Booster1212 Dec 26, 2021
4b295f5
Fix Portal Plugin Link
Booster1212 Dec 26, 2021
78715cf
Athena DoorController v3.
Booster1212 Dec 30, 2021
51a4b5e
Changing URL
Booster1212 Dec 30, 2021
1bb0f83
Adding image of keys.
Booster1212 Dec 30, 2021
7092e16
New markdown for rewritten Plantsystem.
Booster1212 Jan 2, 2022
1e5c73b
Fix image / url
Booster1212 Jan 2, 2022
4184332
Add something about seeds.
Booster1212 Jan 2, 2022
a7958d2
Merge https://github.com/Stuyk/altv-athena-plugins-md
Booster1212 Jan 6, 2022
44c789c
Adding OSS & Change Icon/Name for PedController
Booster1212 Jan 6, 2022
558e085
Change Description
Booster1212 Jan 6, 2022
8351aed
PlantController Thumbnail Change
Booster1212 Jan 6, 2022
0499ca7
Adding image extensions
Booster1212 Jan 7, 2022
8c56d32
Change all Thumbnails same size.
Booster1212 Jan 8, 2022
da75ffd
Merge branch 'main' into main
Booster1212 Jan 8, 2022
0c9908c
Markdown Changes for Athena-OSS
Booster1212 Jan 11, 2022
e8981a3
Merge branch 'main' of https://github.com/Booster1212/altv-athena-plu…
Booster1212 Jan 11, 2022
d35beb9
Adding FarmController
Booster1212 Jan 11, 2022
b05d047
Fix Markdown
Booster1212 Jan 11, 2022
d2db358
Merge branch 'main' into main
Booster1212 Jan 11, 2022
f9e8ca6
Another width fix
Booster1212 Jan 11, 2022
a84419d
Merge branch 'main' of https://github.com/Booster1212/altv-athena-plu…
Booster1212 Jan 11, 2022
fad63ed
Fix Name of Ped Spawner
Booster1212 Jan 11, 2022
b8d77fc
Merge branch 'main' of https://github.com/Stuyk/altv-athena-plugins-md
Booster1212 Jan 11, 2022
78290a1
Merge branch 'main' of https://github.com/Stuyk/altv-athena-plugins-md
Booster1212 Jan 13, 2022
9f13d77
Update Markdown of OSS.
Booster1212 Jan 17, 2022
3e38905
Fix overtyping in example.
Booster1212 Jan 17, 2022
07899b2
Another Example Fix.
Booster1212 Jan 17, 2022
71f39a4
Update Markdown of FarmController
Booster1212 Jan 17, 2022
d99a661
Fix width
Booster1212 Jan 17, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
124 changes: 62 additions & 62 deletions plugins/derlord/OSS.md
@@ -1,14 +1,19 @@
---
layout: ../../../../layouts/Main.astro
title: 'Open Source Shop'
title: "Open Source Shop"
description: "Bringing Shops to the Athena Framework, absolute free and open source! Licensed under MIT"
author: 'Der Lord!'
version: '3.0.4+'
images: ['https://user-images.githubusercontent.com/82890183/148626519-5dc1ced7-a4d9-4f86-a349-26e58729cea8.png', 'https://user-images.githubusercontent.com/82890183/148910952-470985fe-5fed-41ed-8b87-08c9977f71c2.png']
keywords: ['free', 'player', 'server', 'client', 'interface', 'system', 'item']
url: 'https://github.com/Booster1212/OpenSourceShop'
discord: 'Der Lord!#6021'
author: "Der Lord!"
version: "3.0.4+"
images:
[
"https://user-images.githubusercontent.com/82890183/148626519-5dc1ced7-a4d9-4f86-a349-26e58729cea8.png",
"https://user-images.githubusercontent.com/82890183/148910952-470985fe-5fed-41ed-8b87-08c9977f71c2.png",
]
keywords: ["free", "player", "server", "client", "interface", "system", "item"]
url: "https://github.com/Booster1212/OpenSourceShop"
discord: "Der Lord!#6021"
---

# OpenSourceShop

<img src="https://user-images.githubusercontent.com/82890183/148142146-ba173e98-4c11-47d9-95da-6d83de2608af.png" width="650" />
Expand Down Expand Up @@ -36,71 +41,66 @@ So feel free to do whatever you want!
- Drop server/client files into athena-oss -> src/core/client-plugins, client stuff here -> src/core/server-plugins -> server stuff here.

```typescript
Imports (Client) ->
import './OSS/view';
import './OSS/src/client-events';
- Imports (Client) ->
- import './athena-oss/view';
- import './athena-oss/src/client-events';

Imports (Server) ->
import './OSS/index';

// src-webviews/pages/components.ts ->
import ShopUI from './shopUI/ShopUI.vue';
ShopUI: shallowRef(ShopUI)
```
# Setup (Buying Shop - 24/7)
```typescript
export const BUYERS: alt.Vector3[] = [
{ x: 25.980966567993164, y: -1345.6417236328125, z: 28.497024536132812 } as alt.Vector3, // Index 0
];

// Used to give all the shops are different blip, just copy the line as often as you need it.
export const buyerBlips = [
{ sprite: 59, color: 2, text: '24/7 Shop', scale: 1 }, // Index 0
];

// In OSS each Shop can hold individual items or you can add the same list to a few more stores over and over again.
// Default List for all 24/7 & LTD Stores.
const shopList = [
{ name: 'Bread', dbName: 'bread', price: 75, image: 'crate' },
{ name: 'Hotdog', dbName: 'Shophotdog', price: 375, image: 'crate' },
{ name: 'Waterbottle', dbName: 'Shopwater', price: 250, image: 'crate' },
{ name: 'Cola', dbName: 'Shopcola', price: 250, image: 'crate'},
{ name: 'Energy Drink', dbName: 'Shopenergy', price: 300, image: 'crate'}
];
- import './OSS/index';

export const buyLists = [
shopList,
]; // ADD YOUR LISTS HERE!
src-webviews/pages/components.ts ->
- import ShopUI from './shopUI/ShopUI.vue';
- ShopUI: shallowRef(ShopUI)
```

# Setup (Drugsellers)
# Setup (Shops / TYPE )
```typescript
import * as alt from 'alt-server';

// Shops are based on the index of arrays so -> First index -> First sellList
export const SELLERS: alt.Vector3[] = [
{ x: 1163.400634765625, y: -323.938232421875, z: 68.20509338378906 } as alt.Vector3 // SELLER (SHOP-POS) INDEX -> 0
// { Add stuff yourself } Just another seller, INDEX 1 -> The secoond list will get into this position.
];

// Used to give all the shops are different blip, just copy the line as often as you need it.
export const sellersBlips = [
{ sprite: 52, color: 1, text: 'Seller Example - Index 0', scale: 1 }, // Index 0
export const coreShopLocations: IShopLocation[] = [

Choose a reason for hiding this comment

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

Shouldn't we also define the types themselves?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Unsure what this exactly means? 🤔

{ x: 25.980966567993164, y: -1345.6417236328125, z: 28.497024536132812, isBlip: true } as IShopLocation,
{ x: 374.3475341796875, y: 328.112060546875, z: 102.56637573242188, isBlip: true } as IShopLocation,
{ x: -3041.32763671875, y: 585.155029296875, z: 6.908928871154785, isBlip: true } as IShopLocation,
{ x: -3243.743408203125, y: 1001.3903198242188, z: 11.830706596374512, isBlip: true } as IShopLocation,
{ x: 548.0447387695312, y: 2669.48876953125, z: 41.156490325927734, isBlip: true } as IShopLocation,
{ x: 1960.2322998046875, y: 3742.317138671875, z: 31.343746185302734, isBlip: true } as IShopLocation,
{ x: 1730.01171875, y: 6416.22021484375, z: 34.03722381591797, isBlip: true } as IShopLocation,
{ x: 2555.4609375, y: 382.1643371582031, z: 107.62295532226562, isBlip: true } as IShopLocation,

Choose a reason for hiding this comment

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

Is there a specific purpose why you used as IShopLocation for each item? Once you declare the type of the variable in question, its children will take over the type itself.

I don't see the point in overtyping.

Choose a reason for hiding this comment

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

See in playground

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Overtypes is resolved soon as well, thanks. 👍

];

const burgerBuyer = [
{ name: 'Burger', dbName: 'burger', price: 330, image: 'crate' }, // SellList INDEX -> 0
// { Add stuff yourself. } Second Items for SELLERS Index -> 0
];
const anotherExampleList = [
// { Fill me! } -> Index 1
export const ShopRegistry: Array<IShop> = [

Choose a reason for hiding this comment

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

Same here, where's the type IShop defined?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will be resolved soon. Thanks 👍

// BUY SHOP
{
name: '24/7 Shop',
dbName: '24-7-Shop',
blipSprite: 59,
blipColor: 2,
blipScale: 1,
data: {
items: [
{ dbName: 'bread', price: 75 },
{ dbName: 'Shophotdog', price: 375 },
{ dbName: 'Shopwater', price: 250 },
{ dbName: 'Shopcola', price: 250 },
{ dbName: 'Shopenergy', price: 300 },
],
},
locations: coreShopLocations,
},
// SELL SHOP
{
name: 'Seller Example',
dbName: 'SellerExample',
shopType: shopType.SELL,
blipSprite: 52,
blipColor: 1,
blipScale: 1,
data: {
items: [{ dbName: 'burger', price: 330 }],
},
locations: sellerExampleLocations,
},
];

export const sellLists = [burgerBuyer, /*anotherExampleList*/]; // Dont forget to add custom item lists here

```

<img src="https://user-images.githubusercontent.com/82890183/148910952-470985fe-5fed-41ed-8b87-08c9977f71c2.png" width="500"/>
<img src="https://user-images.githubusercontent.com/82890183/148910952-470985fe-5fed-41ed-8b87-08c9977f71c2.png" width="6500"/>
Copy link
Owner

Choose a reason for hiding this comment

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

Why is this 6500?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixd


![image](https://user-images.githubusercontent.com/82890183/148634183-00270cd2-ba69-4a46-94ba-58434967c890.png)

Expand Down