From 82e76f144c6b2d3a507faca3364a950c3092f9fc Mon Sep 17 00:00:00 2001 From: DreamXZE Date: Tue, 18 Apr 2023 02:26:13 +0200 Subject: [PATCH] =?UTF-8?q?[R=C3=A9pondeur=20entreprise]=20Ajout=20du=20no?= =?UTF-8?q?m=20de=20l'endroit=20dans=20lequel=20la=20sonette=20a=20=C3=A9t?= =?UTF-8?q?=C3=A9=20actionn=C3=A9=20pour=20les=20entreprises=20avec=20plus?= =?UTF-8?q?ieurs=20sonnettes.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../soz-core/src/client/job/job.bell.provider.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/resources/[soz]/soz-core/src/client/job/job.bell.provider.ts b/resources/[soz]/soz-core/src/client/job/job.bell.provider.ts index 3c7467deb4..a4bdecd381 100644 --- a/resources/[soz]/soz-core/src/client/job/job.bell.provider.ts +++ b/resources/[soz]/soz-core/src/client/job/job.bell.provider.ts @@ -10,6 +10,7 @@ import { TargetFactory } from '../target/target.factory'; type BellProps = { job: JobType; number: string; + location?: string; }; const BELL_ZONES: Zone[] = [ @@ -155,6 +156,7 @@ const BELL_ZONES: Zone[] = [ data: { job: JobType.Baun, number: '555-BAUN', + location: "Bahama", }, }, { @@ -167,6 +169,7 @@ const BELL_ZONES: Zone[] = [ data: { job: JobType.Baun, number: '555-BAUN', + location: "Unicorn", }, }, { @@ -267,14 +270,14 @@ export class JobBellProvider { return GetGameTimer() - this.lastCall > 15000; }, action: () => { - this.callSociety(zone.data.number); + this.callSociety(zone.data.number, zone.data?.location); }, }, ]); } } - private callSociety(number: string) { + private callSociety(number: string, location: string = undefined) { this.lastCall = GetGameTimer(); this.animationService.playAnimation({ base: { @@ -288,10 +291,15 @@ export class JobBellProvider { }, }); + let message = "Une personne vous demande à l'accueil" + if (!location) { + message += ` - ${location}` + } + TriggerServerEvent('phone:sendSocietyMessage', 'phone:sendSocietyMessage:' + uuidv4(), { anonymous: false, number, - message: "Une personne vous demande à l'accueil", + message: message, position: true, }); }