forked from Simnation/Main
ed
This commit is contained in:
parent
71882165f6
commit
8c00342c4f
273 changed files with 108 additions and 0 deletions
10
resources/[standalone]/cfx_prompt_sandy_mapdata/client.js
Normal file
10
resources/[standalone]/cfx_prompt_sandy_mapdata/client.js
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
const resourceName = GetCurrentResourceName();
|
||||||
|
|
||||||
|
emitNet('requestVertexHubResources/cfx_prompt_sandy_mapdata');
|
||||||
|
|
||||||
|
onNet('registerVertexHubResources/cfx_prompt_sandy_mapdata', (resourcesDto) => {
|
||||||
|
const resources = JSON.parse(resourcesDto);
|
||||||
|
for (const { fileName, cacheString } of resources) {
|
||||||
|
RegisterStreamingFileFromCache(resourceName, fileName, cacheString);
|
||||||
|
}
|
||||||
|
});
|
|
@ -0,0 +1,25 @@
|
||||||
|
fx_version "cerulean"
|
||||||
|
games { 'gta5' }
|
||||||
|
|
||||||
|
author 'Prompt Mods'
|
||||||
|
description 'Motel+Gas+Mechanic+Church+Dealer+Cityhall+Houses1+Trainstation+Marina+Boathouse+Sheriff+Hospital+Airfield+Firestation'
|
||||||
|
version '1.0.0'
|
||||||
|
|
||||||
|
this_is_a_map 'yes'
|
||||||
|
|
||||||
|
escrow_ignore {
|
||||||
|
'stream/**'
|
||||||
|
}
|
||||||
|
|
||||||
|
-- scripts --
|
||||||
|
lua54 'yes'
|
||||||
|
|
||||||
|
|
||||||
|
client_scripts {
|
||||||
|
'client.js'
|
||||||
|
}
|
||||||
|
|
||||||
|
server_scripts{
|
||||||
|
'sv_MapDataHandler.lua',
|
||||||
|
'server.js'
|
||||||
|
}
|
27
resources/[standalone]/cfx_prompt_sandy_mapdata/server.js
Normal file
27
resources/[standalone]/cfx_prompt_sandy_mapdata/server.js
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
const fs = require('fs');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
const resourceName = GetCurrentResourceName();
|
||||||
|
const resourcePath = GetResourcePath(resourceName);
|
||||||
|
const resourceStreamPath = path.join(resourcePath, 'stream');
|
||||||
|
|
||||||
|
const walk = (dir) => fs.readdirSync(dir, { withFileTypes: true }).flatMap((file) => file.isDirectory() ? walk(path.join(dir, file.name)) : path.join(dir, file.name));
|
||||||
|
|
||||||
|
const resources = [];
|
||||||
|
const streamFiles = walk(resourceStreamPath);
|
||||||
|
|
||||||
|
for (const streamFile of streamFiles) {
|
||||||
|
const relativePath = path.relative(resourcePath, streamFile);
|
||||||
|
const baseName = path.basename(streamFile);
|
||||||
|
const cacheString = RegisterResourceAsset(resourceName, relativePath);
|
||||||
|
|
||||||
|
resources.push({
|
||||||
|
fileName: baseName,
|
||||||
|
cacheString,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onNet('requestVertexHubResources/cfx_prompt_sandy_mapdata', () => {
|
||||||
|
const resourcesDto = JSON.stringify(resources);
|
||||||
|
emitNet('registerVertexHubResources/cfx_prompt_sandy_mapdata', source, resourcesDto);
|
||||||
|
});
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue