Skip to content
This repository has been archived by the owner on Nov 2, 2024. It is now read-only.

Commit

Permalink
Update client.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Bentix-cs committed Jan 23, 2024
1 parent eb50226 commit c70fa37
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions client.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ const playerId = PlayerId();
async function takeScreenshotForComponent(pedType, type, component, drawable, texture, cameraSettings) {
const cameraInfo = cameraSettings ? cameraSettings : config.cameraSettings[type][component];

setWeatherTime();

await Delay(500);

if (!camInfo || camInfo.zPos !== cameraInfo.zPos || camInfo.fov !== cameraInfo.fov) {
camInfo = cameraInfo;

Expand Down Expand Up @@ -46,9 +50,6 @@ async function takeScreenshotForComponent(pedType, type, component, drawable, te
await Delay(50);

SetEntityHeading(ped, camInfo.rotation.z);
setWeatherTime();

await Delay(500);

emitNet('takeScreenshot', `${pedType}_${type == 'PROPS' ? 'prop_' : ''}${component}_${drawable}${texture ? `_${texture}`: ''}`);
await Delay(2000);
Expand Down Expand Up @@ -309,7 +310,7 @@ RegisterCommand('customscreenshot', async (source, args) => {
for (drawable = 0; drawable < drawableVariationCount; drawable++) {
const textureVariationCount = GetNumberOfPedTextureVariations(ped, component, drawable);
SendNUIMessage({
type: cameraSettings[type][component].name,
type: config.cameraSettings[type][component].name,
value: drawable,
max: drawableVariationCount,
});
Expand All @@ -328,7 +329,7 @@ RegisterCommand('customscreenshot', async (source, args) => {
for (prop = 0; prop < propVariationCount; prop++) {
const textureVariationCount = GetNumberOfPedPropTextureVariations(ped, component, prop);
SendNUIMessage({
type: cameraSettings[type][component].name,
type: config.cameraSettings[type][component].name,
value: prop,
max: propVariationCount,
});
Expand Down

0 comments on commit c70fa37

Please sign in to comment.