Skip to content

التثبيت ​

المتطلبات ​

الريسورسمطلوب
oxmysqlنعم
baseeventsنعم
qbx_core أو qb-coreنعم
ox_inventory أو qb-inventoryنعم
ox_target أو qb-targetنعم
ox_libمطلوب مع Qbox

لعبة الأسهم وأداة التحريك (gizmo) مدمجة في السكربت، فلا تحتاج ريسورسات منفصلة لها.

1. إضافة السكربت ​

انسخ مجلد MG-Family إلى مجلد resources.

2. استيراد قاعدة البيانات ​

استورد install/install.sql. سينشئ هذه الجداول:

الجدوليحفظ
mg_familiesالعائلات والمستوى و XP والعملات وصحة الخزنة والترقيات.
mg_family_membersالأعضاء ورتبهم.
mg_family_blacklistاللاعبون الممنوعون من العائلة.
mg_family_missionsمهام المافيا.
mg_family_mvpلوحة أفضل لاعب.

3. إضافة الأيتمات ​

lua
-- ox_inventory/data/items.lua
['flaptop'] = {
    label = 'Family Laptop', weight = 100, stack = false, close = true,
    description = 'Opens the family management laptop',
    client = { image = 'flaptop.png' },
},
['safescrap'] = {
    label = 'Safe Scrap', weight = 100, stack = true, close = true,
    description = 'Reinforced scrap used to repair family safes',
    client = { image = 'safescrap.png' },
},
['hacking_device'] = {
    label = 'Hacking Device', weight = 500, stack = false, close = true,
    description = 'Used to hack an enemy family safe',
    client = { image = 'hacking_device.png' },
},
['token_global'] = {
    label = 'S+ Token', weight = 100, stack = false, close = true,
    description = 'Awards family coins when used',
    client = { image = 'tokenS.png' },
},
['token_fleeca'] = {
    label = 'A Token', weight = 100, stack = false, close = true,
    description = 'Awards family coins when used',
    client = { image = 'tokenA.png' },
},
['token_cashexchange'] = {
    label = 'B Token', weight = 100, stack = false, close = true,
    description = 'Awards family coins when used',
    client = { image = 'tokenB.png' },
},
['token_laundry'] = {
    label = 'C Token', weight = 100, stack = false, close = true,
    description = 'Awards family coins when used',
    client = { image = 'tokenC.png' },
},
['token_truck'] = {
    label = 'D Token', weight = 100, stack = false, close = true,
    description = 'Awards family coins when used',
    client = { image = 'tokenD.png' },
},
['token_house'] = {
    label = 'E Token', weight = 100, stack = false, close = true,
    description = 'Awards family coins when used',
    client = { image = 'tokenE.png' },
},
['token_store'] = {
    label = 'F Token', weight = 100, stack = false, close = true,
    description = 'Awards family coins when used',
    client = { image = 'tokenF.png' },
},
lua
-- qb-core/shared/items.lua
['flaptop'] = { name = 'flaptop', label = 'Family Laptop', weight = 100, type = 'item', image = 'flaptop.png', unique = true, useable = true, shouldClose = true, description = 'Opens the family management laptop' },
['safescrap'] = { name = 'safescrap', label = 'Safe Scrap', weight = 100, type = 'item', image = 'safescrap.png', unique = false, useable = false, shouldClose = true, description = 'Reinforced scrap used to repair family safes' },
['hacking_device'] = { name = 'hacking_device', label = 'Hacking Device', weight = 500, type = 'item', image = 'hacking_device.png', unique = true, useable = false, shouldClose = true, description = 'Used to hack an enemy family safe' },
['token_global'] = { name = 'token_global', label = 'S+ Token', weight = 100, type = 'item', image = 'tokenS.png', unique = true, useable = true, shouldClose = true, description = 'Awards family coins when used' },
['token_fleeca'] = { name = 'token_fleeca', label = 'A Token', weight = 100, type = 'item', image = 'tokenA.png', unique = true, useable = true, shouldClose = true, description = 'Awards family coins when used' },
['token_cashexchange'] = { name = 'token_cashexchange', label = 'B Token', weight = 100, type = 'item', image = 'tokenB.png', unique = true, useable = true, shouldClose = true, description = 'Awards family coins when used' },
['token_laundry'] = { name = 'token_laundry', label = 'C Token', weight = 100, type = 'item', image = 'tokenC.png', unique = true, useable = true, shouldClose = true, description = 'Awards family coins when used' },
['token_truck'] = { name = 'token_truck', label = 'D Token', weight = 100, type = 'item', image = 'tokenD.png', unique = true, useable = true, shouldClose = true, description = 'Awards family coins when used' },
['token_house'] = { name = 'token_house', label = 'E Token', weight = 100, type = 'item', image = 'tokenE.png', unique = true, useable = true, shouldClose = true, description = 'Awards family coins when used' },
['token_store'] = { name = 'token_store', label = 'F Token', weight = 100, type = 'item', image = 'tokenF.png', unique = true, useable = true, shouldClose = true, description = 'Awards family coins when used' },

يستخدم MG-Family أيضًا أيتم repairkit. أغلب الإنفنتوريات فيها هذا الأيتم، أضفه فقط إذا لم يكن موجودًا عندك.

انسخ كل صور PNG من install/imgaes/ إلى مجلد صور الإنفنتوري:

  • ox_inventory: ox_inventory/web/images/
  • qb-inventory: qb-inventory/html/images/

INFO

اسم مجلد الصور فعلًا imgaes، وهذا مقصود.

4. ترتيب التشغيل ​

ini
ensure oxmysql
ensure ox_lib
ensure qbx_core
ensure ox_inventory
ensure baseevents

ensure MG-Family
ini
ensure oxmysql
ensure qb-core
ensure qb-inventory
ensure qb-target
ensure qb-menu
ensure qb-input
ensure progressbar
ensure baseevents

ensure MG-Family

أعد تشغيل السيرفر بالكامل بعد إضافة الأيتمات.

5. التأكد من العمل ​

عند التشغيل يجب أن يطبع الكونسول الأنظمة التي تم التعرف عليها، مثلًا:

framework=qbx inventory=ox target=ox menu=ox input=ox

بعدها أعطِ نفسك flaptop واستخدمه، يجب أن يفتح لابتوب العائلة.

السرقة من القائمة الدائرية (اختياري) ​

لإظهار خيار Steal في qbx_radialmenu أثناء حرب الخزائن، استخدم هذا التحقق في إعداداته:

lua
local canRob = exports['MG-Family']:CanRobInMatch()

عندما يرجع true، شغّل إيفنت الكلاينت family:client:RobPlayer. السيرفر يتحقق من كل شيء مرة أخرى قبل بدء السرقة.

جميع سكربتات MG Development محمية. يُمنع إعادة توزيعها.