Skip to content

Exports

Exports

يتم توفير محرك الجلوس كـ exports للعميل (client exports) لكي تتمكن الموارد الأخرى من تشغيله. جميع الـ exports هي client-side على bupa-chaircreator.

BupaSitOn

إجلاس اللاعب المحلي على تعريف مقعد عشوائي.

lua
exports['bupa-chaircreator']:BupaSitOn({
    entity = 0, -- 0 لإحداثيات في العالم، أو مقبض كيان بروب (prop entity handle)
    sit = {
        type = 'chair', -- مفتاح من Config.SitTypes
        seats = { vector4(x, y, z, heading) },
    },
    raycast = false,
})

BupaLayOn

متغير الاستلقاء، للأسرة / كراسي الاسترخاء. نفس الهيكل، باستخدام مفتاح Config.LayTypes.

lua
exports['bupa-chaircreator']:BupaLayOn({
    entity = 0,
    bed = {
        type = 'bed',
        seats = { vector4(x, y, z, heading) },
    },
    raycast = false,
})

BupaStop

النهوض / إيقاف إجراء الجلوس أو الاستلقاء الحالي.

lua
exports['bupa-chaircreator']:BupaStop()

IsSitting

يُرجع ما إذا كان اللاعب المحلي جالسًا حاليًا.

lua
if exports['bupa-chaircreator']:IsSitting() then
    -- اللاعب جالس
end

يتم أيضاً تصدير مساعدين آخرين: IsLaying, IsNearSeat, IsNearBed, GetClosestSeat, GetClosestBed, SitOnClosestSeat, LayOnClosestBed, StopCurrentAction و BupaLoadAnim(dict).