Merge branch 'nightly' into ragemp
1
.gitignore
vendored
@@ -4,3 +4,4 @@
|
||||
config/database.json
|
||||
config/email.json
|
||||
config/discord.json
|
||||
locale/*
|
||||
|
||||
7
IDEAS.md
@@ -373,4 +373,9 @@ Obviously this would still be using slashes for commands still. The way this wor
|
||||
* Take item from vehicle trunk (grab crate from vehicle)
|
||||
* Place item on ground (crate)
|
||||
* Take second beer from crate
|
||||
* Store second beer in trunk
|
||||
* Store second beer in trunk
|
||||
---
|
||||
### Animation/emote, action, and message menu wheels
|
||||
So with new Steam Deck being available now, and all the other attempts to use mobile devices that either emulate or stream the older GTA PC games, I figure we'd need a way for players to interact with each other using them. Roleplay is usually a very chat-oriented gamemode, but I can probably make things easier with simple controls. Also customizable messages, animations, and actions for each menu/wheel slot
|
||||
The inventory system is already planned to use a hotbar/wheel but I don't have all the images for it yet
|
||||
---
|
||||
15
TODO.md
@@ -1,3 +1,4 @@
|
||||
== TODO
|
||||
* Finish auto-translator
|
||||
* Add ways to acquire drugs. Pot/coke plants, meth labs, etc
|
||||
* Finish setting up the persistent NPC system
|
||||
@@ -7,4 +8,16 @@
|
||||
* Deleting character
|
||||
* Make game messages (big message, small message) into array of types
|
||||
* Array of message types in shared
|
||||
* Font, text, duration, etc arrays in client, indexed by type
|
||||
* Font, text, duration, etc arrays in client, indexed by type
|
||||
* Fix the item take/put system for items in vehicle trunks, other items, etc
|
||||
---
|
||||
== Planned Features
|
||||
* Named and scripted NPCs
|
||||
* Racing
|
||||
* Fishing
|
||||
* Stock Market
|
||||
* Mapped interiors for GTA 3
|
||||
* Drug growing/manufacturing
|
||||
---
|
||||
== Bug Fixes
|
||||
* Check natives for if player is console (getPlayerPosition, etc)
|
||||
@@ -22,5 +22,6 @@
|
||||
"Estonian",
|
||||
"Sicilian",
|
||||
"Indian",
|
||||
"Rough"
|
||||
"Rough",
|
||||
"Swedish"
|
||||
]
|
||||
112
config/client/locale.json
Normal file
@@ -0,0 +1,112 @@
|
||||
[
|
||||
{
|
||||
"id": 0,
|
||||
"englishName": "English",
|
||||
"stringsFile": "english.json",
|
||||
"isoCode": "en",
|
||||
"flagImageFile": "uk.png",
|
||||
"countries": ["gb", "us", "au", "bz", "ca", "ie", "jm", "nz", "za", "tt"],
|
||||
"requiresUnicode": false,
|
||||
"contributor": "Vortrex"
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"englishName": "Russian",
|
||||
"stringsFile": "russian.json",
|
||||
"isoCode": "ru",
|
||||
"flagImageFile": "ru.png",
|
||||
"countries": ["ru", "ua"],
|
||||
"requiresUnicode": false,
|
||||
"contributor": "VNDTTS"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"englishName": "Polish",
|
||||
"stringsFile": "polish.json",
|
||||
"isoCode": "pl",
|
||||
"flagImageFile": "pl.png",
|
||||
"countries": ["pl"],
|
||||
"requiresUnicode": false,
|
||||
"contributor": "Suprise444"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"englishName": "Spanish",
|
||||
"stringsFile": "spanish.json",
|
||||
"isoCode": "es",
|
||||
"flagImageFile": "es.png",
|
||||
"countries": ["es", "ar", "bo", "cl", "co", "cr", "do", "ec", "sv", "gt", "hn", "mx", "ni", "pa", "py", "pe", "pr", "uy", "ve"],
|
||||
"requiresUnicode": false,
|
||||
"contributor": "PerikiyoXD"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"englishName": "Chinese",
|
||||
"stringsFile": "chinese.json",
|
||||
"isoCode": "zh",
|
||||
"flagImageFile": "cn.png",
|
||||
"countries": ["cn", "hk", "sg", "tw"],
|
||||
"requiresUnicode": true,
|
||||
"contributor": "Renzuko_Ctone"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"englishName": "Arabic",
|
||||
"stringsFile": "arabic.json",
|
||||
"isoCode": "ar",
|
||||
"flagImageFile": "sa.png",
|
||||
"countries": ["dz", "bh", "eg", "iq", "jo", "kw", "lb", "ly", "ma", "om", "qa", "sa", "sy", "tn", "ae", "ye"],
|
||||
"requiresUnicode": true,
|
||||
"contributor": "! KASIR"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"englishName": "Slovak",
|
||||
"stringsFile": "slovak.json",
|
||||
"isoCode": "sk",
|
||||
"flagImageFile": "sk.png",
|
||||
"countries": ["sk"],
|
||||
"requiresUnicode": false,
|
||||
"contributor": "UAKLAUS"
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"englishName": "German",
|
||||
"stringsFile": "german.json",
|
||||
"isoCode": "de",
|
||||
"flagImageFile": "de.png",
|
||||
"countries": ["de", "at", "be", "ch", "li", "lu"],
|
||||
"requiresUnicode": false,
|
||||
"contributor": "Sladernimo"
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"englishName": "French",
|
||||
"stringsFile": "french.json",
|
||||
"isoCode": "fr",
|
||||
"flagImageFile": "fr.png",
|
||||
"countries": ["fr", "cd", "bj", "bf", "cd", "cg", "ga", "gn", "ml", "mc", "ne", "sn"],
|
||||
"requiresUnicode": false,
|
||||
"contributor": "Cocam"
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"englishName": "Japanese",
|
||||
"stringsFile": "japanese.json",
|
||||
"isoCode": "jp",
|
||||
"flagImageFile": "jp.png",
|
||||
"countries": ["jp"],
|
||||
"requiresUnicode": true,
|
||||
"contributor": "Cocam"
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"englishName": "Finnish",
|
||||
"stringsFile": "finnish.json",
|
||||
"isoCode": "fi",
|
||||
"flagImageFile": "fi.png",
|
||||
"countries": ["fi"],
|
||||
"requiresUnicode": false,
|
||||
"contributor": "SIMBA_MEOW"
|
||||
}
|
||||
]
|
||||
@@ -1,71 +1,117 @@
|
||||
{
|
||||
"apiEmail": "example@example.com",
|
||||
"defaultLanguage": "en",
|
||||
"defaultLanguageId": 0,
|
||||
"translateURL": "http://api.mymemory.translated.net/get?de={3}&q={0}&langpair={1}|{2}",
|
||||
"locales": [
|
||||
{
|
||||
"id": 0,
|
||||
"englishName": "English",
|
||||
"stringsFile": "english.json",
|
||||
"isoCode": "en",
|
||||
"flagImageFile": "gb.png",
|
||||
"flagImageFile": "uk.png",
|
||||
"countries": ["gb", "us", "au", "bz", "ca", "ie", "jm", "nz", "za", "tt"],
|
||||
"requiresUnicode": false
|
||||
"requiresUnicode": false,
|
||||
"contributor": "Vortrex"
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"englishName": "Russian",
|
||||
"stringsFile": "russian.json",
|
||||
"isoCode": "ru",
|
||||
"flagImageFile": "ru",
|
||||
"flagImageFile": "ru.png",
|
||||
"countries": ["ru", "ua"],
|
||||
"requiresUnicode": false
|
||||
"requiresUnicode": false,
|
||||
"contributor": "VNDTTS"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"englishName": "Polish",
|
||||
"stringsFile": "polish.json",
|
||||
"isoCode": "pl",
|
||||
"flagImageFile": "pl",
|
||||
"flagImageFile": "pl.png",
|
||||
"countries": ["pl"],
|
||||
"requiresUnicode": false
|
||||
"requiresUnicode": false,
|
||||
"contributor": "Suprise444"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"englishName": "Spanish",
|
||||
"stringsFile": "spanish.json",
|
||||
"isoCode": "es",
|
||||
"flagImageFile": "es",
|
||||
"flagImageFile": "es.png",
|
||||
"countries": ["es", "ar", "bo", "cl", "co", "cr", "do", "ec", "sv", "gt", "hn", "mx", "ni", "pa", "py", "pe", "pr", "uy", "ve"],
|
||||
"requiresUnicode": false
|
||||
"requiresUnicode": false,
|
||||
"contributor": "PerikiyoXD"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"englishName": "Chinese",
|
||||
"stringsFile": "chinese.json",
|
||||
"isoCode": "zh",
|
||||
"flagImageFile": "cn",
|
||||
"flagImageFile": "cn.png",
|
||||
"countries": ["cn", "hk", "sg", "tw"],
|
||||
"requiresUnicode": true
|
||||
"requiresUnicode": true,
|
||||
"contributor": "Renzuko_Ctone"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"englishName": "Arabic",
|
||||
"stringsFile": "arabic.json",
|
||||
"isoCode": "ar",
|
||||
"flagImageFile": "sa",
|
||||
"flagImageFile": "sa.png",
|
||||
"countries": ["dz", "bh", "eg", "iq", "jo", "kw", "lb", "ly", "ma", "om", "qa", "sa", "sy", "tn", "ae", "ye"],
|
||||
"requiresUnicode": true
|
||||
"requiresUnicode": true,
|
||||
"contributor": "! KASIR"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"englishName": "Slovak",
|
||||
"stringsFile": "slovak.json",
|
||||
"isoCode": "sk",
|
||||
"flagImageFile": "sk.png",
|
||||
"countries": ["sk"],
|
||||
"requiresUnicode": false,
|
||||
"contributor": "UAKLAUS"
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"englishName": "German",
|
||||
"stringsFile": "german.json",
|
||||
"isoCode": "de",
|
||||
"flagImageFile": "de.png",
|
||||
"countries": ["de", "at", "be", "ch", "li", "lu"],
|
||||
"requiresUnicode": false,
|
||||
"contributor": "Sladernimo"
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"englishName": "French",
|
||||
"stringsFile": "french.json",
|
||||
"isoCode": "fr",
|
||||
"flagImageFile": "fr.png",
|
||||
"countries": ["fr", "cd", "bj", "bf", "cd", "cg", "ga", "gn", "ml", "mc", "ne", "sn"],
|
||||
"requiresUnicode": false,
|
||||
"contributor": "Cocam"
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"englishName": "Japanese",
|
||||
"stringsFile": "japanese.json",
|
||||
"isoCode": "jp",
|
||||
"flagImageFile": "jp.png",
|
||||
"countries": ["jp"],
|
||||
"requiresUnicode": true,
|
||||
"contributor": "Cocam"
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"englishName": "Finnish",
|
||||
"stringsFile": "finnish.json",
|
||||
"isoCode": "fi",
|
||||
"flagImageFile": "fi.png",
|
||||
"countries": ["fi"],
|
||||
"requiresUnicode": false,
|
||||
"contributor": "SIMBA_MEOW"
|
||||
}
|
||||
],
|
||||
"sendStringsToClient": [
|
||||
"PropertyEnterCommandLabel",
|
||||
"PropertyEnterKeyPressLabel",
|
||||
"BusinessBuyItemsLabel",
|
||||
"PropertyForSaleLabel",
|
||||
"PropertyForRentLabel",
|
||||
"VehicleDealershipLabel",
|
||||
"TakeJobLabel",
|
||||
"StartWorkLabel",
|
||||
"JobEquipAndUniformLabel",
|
||||
"NotYourJobLabel",
|
||||
"Locked",
|
||||
"Unlocked",
|
||||
"Closed",
|
||||
"Open",
|
||||
"JobLabel"
|
||||
]
|
||||
]
|
||||
}
|
||||
BIN
files/images/asshat-logo.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
files/images/flags/cn.png
Normal file
|
After Width: | Height: | Size: 109 KiB |
BIN
files/images/flags/de.png
Normal file
|
After Width: | Height: | Size: 76 KiB |
BIN
files/images/flags/es.png
Normal file
|
After Width: | Height: | Size: 289 KiB |
BIN
files/images/flags/fr.png
Normal file
|
After Width: | Height: | Size: 77 KiB |
BIN
files/images/flags/jp.png
Normal file
|
After Width: | Height: | Size: 101 KiB |
BIN
files/images/flags/pl.png
Normal file
|
After Width: | Height: | Size: 76 KiB |
BIN
files/images/flags/ru.png
Normal file
|
After Width: | Height: | Size: 75 KiB |
BIN
files/images/flags/sa.png
Normal file
|
After Width: | Height: | Size: 269 KiB |
BIN
files/images/flags/sk.png
Normal file
|
After Width: | Height: | Size: 117 KiB |
BIN
files/images/flags/uk.png
Normal file
|
After Width: | Height: | Size: 88 KiB |
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": "."
|
||||
}
|
||||
],
|
||||
"settings": {}
|
||||
}
|
||||
@@ -1,458 +0,0 @@
|
||||
{
|
||||
"TranslationProvidedBy": "Kasir",
|
||||
"LocaleEnglishName": "Arabic",
|
||||
|
||||
"LocaleNativeName": "عربى",
|
||||
"LocaleOffer": ".الخادم متاح باللغة الإنجليزية.استخدم {1} لاستخدامه",
|
||||
"LocaleChanged1": "لغتك الآن على {1}",
|
||||
"LocaleChanged2": "سيعرض الخادم الآن الرسائل في {1}",
|
||||
"LocaleChangedNote": "هذا لا يغير الرسائل من اللاعبين الآخرين",
|
||||
"AccentsListHeader": "لهجآت",
|
||||
"HeaderHelpMainList": "فئة الدعم",
|
||||
"AccentNotFound": "اللكنة الحالية غير متوفرة",
|
||||
"AccentSet": "قمت بتعيين لهجتك على {1}",
|
||||
"InvalidAnimation": "هذه الرسوم المتحركة غير متوفرة",
|
||||
"AnimationCommandTip": "استخدم {1} لمشاهدة قائمة الرسوم المتحركة المتاحة",
|
||||
"InvalidAnimationDistance": "يجب المسافة تكون بين 0 و 3",
|
||||
"AnimationStopCommandTip": "استخدم {1} لإيقاف الرسوم المتحركة",
|
||||
"CantBanClient": "لا يمكنك حظر هذا الإعب",
|
||||
"PlayerAccountBanned": "تم حظر حساب {1}",
|
||||
"ClanNotFound": "لم يتم العثور على المجموعة",
|
||||
"ClanNameTaken": "توجد مجموعة بهذا الاسم بالفعل",
|
||||
"PlayerNotFound": "الاعب غير موجود",
|
||||
"ClanCantRemoveRanks": "لا يمكنك إزالة رتب المجموعة",
|
||||
"ClanCantAddRanks": "لأ يمكنك إضافة رتب",
|
||||
"ClanRankNotFound": "رتبة غير موجودهـ",
|
||||
"ClanCantChangeMemberTag": "ليس لديك الصلاحيات لتعديل على علامات رتب الاعضاء",
|
||||
"ClanPlayerNotInSameClan": "الاعب غير موجود بمجموعتك",
|
||||
"ClanCantChangeRankLevel": "ليس لديك صلاحيات لتغيير مستوى رتبة المجموعة",
|
||||
"ClanCantChangeRankTag": "لا يمكنك تغيير علامات رتب المجموعة",
|
||||
"NameNotRegistered": "اسمك غير مسجل! استخدم {1} لإنشاء حساب.",
|
||||
"AutomaticLoginIPToggle": "IP تم تفعيل {1} تسجيل الدخول التلقائي عن طربق",
|
||||
"CouldNotRegisterAccount": "حدثت مشكلة في إنشاء حسابك, يرجى التواصل بـ إلاداره.",
|
||||
"RandomTipsToggle": "النصائح العشوائية{1}",
|
||||
"ActionTipsToggle": "نصائح العمل{1}",
|
||||
"AutoSpawnLastCharToggle": "النشر التلقائي كأخر حرف تم استخدامه هو {1}",
|
||||
"AccountGUISettingToggle": "واجهة المستخدم الرسومية هي الآن {1}",
|
||||
"On": "تشغيل",
|
||||
"Off": "إيقاف",
|
||||
"Yes": "موافق",
|
||||
"No": "لا",
|
||||
"True": "صحيح",
|
||||
"False": "خطأ",
|
||||
"Locked": "مغلق",
|
||||
"Unlocked": "مفتوح",
|
||||
"PasswordNotGoodEnough": "كلمة المرور الجديدة يجب أن تفي بالمتطلبات!",
|
||||
"PasswordNeedsBase": " {1} يجب أن تحتوي كلمات المرور على الأقل",
|
||||
"PasswordNeedsCapitals": "{1}من الأحرف الكبيرة",
|
||||
"PasswordNeedsNumbers": "{1} أرقام",
|
||||
"PasswordNeedsSymbols": "{1} حروف او رموز",
|
||||
"PasswordsDontMatch": "كلمة المرور الجديدة وتأكيد كلمة المرور الجديدة ليسا متطابقين!!",
|
||||
"PasswordChanged": "تم بنجاح تغيير كلمة المرور!",
|
||||
"AutoLoggedInIP": "IP تم تسجيل دخولك تلقائيًا بواسطة!",
|
||||
"WelcomeBack": "مرحبًا بك مرة أخرى في {1} ، {2}! من فضلك {3} للمتابعة.",
|
||||
"WelcomeNewPlayer": "مرحبًا بك في {1} ، {2}! من فضلك {3} للعب.",
|
||||
"InvalidPlayer": "اللاعب غير موجود!",
|
||||
"InvalidBusiness": "لم يتم العثور على الأعمال!",
|
||||
"InvalidHouse": "البيت غير موجود!",
|
||||
"InvalidVehicle": "لم يتم ايجاد السيارة!",
|
||||
"InvalidClan": "لم يتم العثور على المجموعة!",
|
||||
"InvalidClanRank": "رتبة غير موجوده!",
|
||||
"InvalidJob": "لم يتم العثور على الوظيفة!",
|
||||
"InvalidItem": "العنصر غير موجود!",
|
||||
"InvalidItemType": "نوع العنصر غير موجود!",
|
||||
"InvalidRadioStation": "لم يتم العثور على محطة راديو!",
|
||||
"InvalidGate": "البوابة غير موجودة!",
|
||||
"EntersProperty": "يفتح الباب ويدخل {1}",
|
||||
"ExitsProperty": "يفتح الباب ويخرج من {1}",
|
||||
"EnterExitPropertyDoorLocked": "يحاول فتح الباب {1} ولكنه يفشل لأنه مغلق",
|
||||
"PropertyNoInterior": "هذا ليس له جزء داخلي {1}، ولكن لا يزال بإمكانك استخدام الأوامر على أيقونة الباب.",
|
||||
"NoBusinessWithItemType": "لا يوجد عمل مع هذا الخيار متاح",
|
||||
"HeaderKeyBinds": "مفتاح الروابط",
|
||||
"HeaderAccountHelp": "مساعدة الحساب",
|
||||
"HeaderVehicleHelp": "تعليمات السيارة",
|
||||
"HeaderVehicleDealershipHelp": "مساعدة بيع سيارات",
|
||||
"HeaderJobHelp": "تعليمات الوظيفة",
|
||||
"HeaderChatHelp": "تعليمات الدردشة",
|
||||
"HeaderServerRules": "قوانين سيرفر",
|
||||
"HeaderWebsiteInfo": "الموقع الرسمي",
|
||||
"HeaderDiscordInfo": "ديسكورد",
|
||||
"HeaderAnimationsList": "قائمة الرسوم المتحركة",
|
||||
"HeaderPayAndSprayHelp": "الدفع ,ورشٌ المساعده",
|
||||
"HeaderAmmunationHelp": "مساعدة الذخيرة",
|
||||
"HeaderVehicleTuneupHelp": "مساعدة تعديل السيارة",
|
||||
"HeaderBindableKeysHelp": "مفاتيح قابلة للربط",
|
||||
"HeaderSkinHelp": "مساعدة الملابس / الجلد",
|
||||
"HeaderBusinessHelp": "تعليمات الأعمال",
|
||||
"HeaderClanHelp": "تعليمات المجموعة",
|
||||
"HeaderPlayerVehiclesList": "مركبات المشغل ({1})",
|
||||
"HeaderPlayerBusinessesList": "أعمال اللاعب ({1})",
|
||||
"HeaderClansList": "قائمة المجموعة",
|
||||
"HeaderAdminsList": "قائمة الادمن",
|
||||
"HeaderBadgeInfo": "معلومات الشاره",
|
||||
"HeaderAccentsList": "قائمة اللغة",
|
||||
"HeaderPlayerInfo": "معلومات الاعب",
|
||||
"HeaderWealthandTaxHelp": "معلومات المال",
|
||||
"HeaderCommandInfo": "معلومات الإوامر ({1})",
|
||||
"HeaderRadioHelp": "تعليمات راديو",
|
||||
"HeaderRadioStationsList": "محطات الردايو",
|
||||
"HeaderKeyBindsList": "قائمة روابط المفاتيح",
|
||||
"RadioVolumeChanged": "{1} لقد {2} غيرت مستوى صوت البث اللاسلكى إلى٪",
|
||||
"VolumeLevelNotNumber": "يجب أن يكون مستوى الصوت رقمًا",
|
||||
"RadioStationLocationInvalid": "يجب أن تكون في سيارة أو منزل أو عمل أو لديك جهاز شخصي لتغيير المحطة!",
|
||||
"ActionBusinessRadioStationChange": "تغيير محطة راديو الأعمال إلى {1} ({2})",
|
||||
"ActionHouseRadioStationChange": "تغيير محطة راديو المنزل إلى {1} ({2})",
|
||||
"ActionVehicleRadioStationChange": "يغير محطة راديو السيارة إلى {1} ({2})",
|
||||
"ActionItemRadioStationChange": "يغير محطة {1} إلى {2} ({3})",
|
||||
"RandomVehicleCommandsDisabled": "هذه مركبة مرور عشوائية ولا يمكن استخدام الأوامر لها.",
|
||||
"HouseDoorLock": "البيت {1} {2}!",
|
||||
"BusinessDoorLock": "الأعمال {1} {2}!",
|
||||
"ServerGameModeRestarting": "يتم إعادة تشغيل وضع لعبة الخادم!",
|
||||
"HeaderSelfItemList": "المخزون الخاص بك",
|
||||
"HeaderPlayerItemList": "مخزون الاعب ({1})",
|
||||
"HeaderHouseItemList": "بيت الاعب",
|
||||
"HeaderBusinessFloorItemList": "جرد الأعمال (للبيع)",
|
||||
"HeaderBusinessStorageItemList": "جرد الأعمال (التخزين)",
|
||||
"HeaderItemItemList": "مخزون {1}",
|
||||
"ItemSlotNotNumber": "يجب أن تكون خانة العنصر رقمًا",
|
||||
"ItemSlotMustBeBetween": "The item slot must be between {1} and {2}!",
|
||||
"UseItemBugged": "العنصر الذي تحاول استخدامه به التنصت. تم إرسال تقرير خطأ إلى مطوري الخادم.",
|
||||
"PickupItemBugged": "العنصر الذي تحاول استلامه به التنصت. تم إرسال تقرير خطأ إلى مطوري الخادم.",
|
||||
"DropItemBugged": "تم التنصت على العنصر الذي تحاول إسقاطه. تم إرسال تقرير خطأ إلى مطوري الخادم.",
|
||||
"HandsBusy": "يديك مشغولتان",
|
||||
"CantUseItemInSkinChange": "لا يمكنك استخدام عنصر أثناء تخصيص مظهرك",
|
||||
"CantDropItemInSkinChange": "لا يمكنك إسقاط عنصر أثناء تخصيص مظهرك",
|
||||
"CantPickupItemInSkinChange": "لا يمكنك التقاط عنصر أثناء تخصيص مظهرك",
|
||||
"CantSwitchItemInSkinChange": "لا يمكنك تبديل عنصر أثناء تخصيص مظهرك",
|
||||
"CantGiveItemInSkinChange": "لا يمكنك إعطاء عنصر أثناء تخصيص مظهرك",
|
||||
"CantTakeItemInSkinChange": "لا يمكنك أن تأخذ عنصرًا أثناء تخصيص مظهرك",
|
||||
"ItemUnequippableNoAmmo": "لا تحتوي الفتحة {1} الموجودة في الفتحة {2} على ذخيرة ، ولا يمكن تجهيزها!",
|
||||
"NoSpaceSelfInventory": "ليس لديك أي مساحة إضافية في مخزونك",
|
||||
"Business": "الاعمال",
|
||||
"House": "البيت",
|
||||
"Clan": "المجموعة",
|
||||
"Vehicle": "السيارة",
|
||||
"Item": "الاغراض",
|
||||
"ItemType": "نوع العنصر",
|
||||
"Gate": "بوابة",
|
||||
"Door": "باب",
|
||||
"ClanRank": "رتبة المجموعة",
|
||||
"JobRank": "رتبة الوظيفة",
|
||||
"RadioStation": "المحطة الإذاعية",
|
||||
"Months": [
|
||||
"يناير",
|
||||
"فبراير",
|
||||
"مارس",
|
||||
"أبريل",
|
||||
"مايو",
|
||||
"يونيو",
|
||||
"يوليو",
|
||||
"أغسطس",
|
||||
"سبتمبر",
|
||||
"أكتوبر",
|
||||
"نوفمبر",
|
||||
"ديسمبر"
|
||||
],
|
||||
"WeekDays": [
|
||||
"الأحد",
|
||||
"الإثنين",
|
||||
"الثلاثاء",
|
||||
"الاربعاء",
|
||||
"الخميس",
|
||||
"الجمعه",
|
||||
"السبت"
|
||||
],
|
||||
"CardinalDirections": [
|
||||
"شمال",
|
||||
"الشمال الشرقي",
|
||||
"شرق",
|
||||
"الجنوب الشرقي",
|
||||
"جنوب",
|
||||
"جنوب غرب",
|
||||
"غرب",
|
||||
"الشمال الغربي"
|
||||
],
|
||||
"NewPlayerReadyToPlay": [
|
||||
"لقد حصلت على بعض من المال. استخدم {1} للبحث عن أماكن لشراء العناصر.",
|
||||
"إذا كنت بحاجة إلى المال،الوظائف هي النقاط الصفراء على الخريطة.",
|
||||
"للحصول على سيارة ، قم بزيارة وكالة السيارات. يمكنك أيضًا استخدام سيارة مستأجرة بالقرب من السباون أو ركوب القطار",
|
||||
"تأكد من قراءة {1} واستخدم {2} للحصول على معلومات."
|
||||
],
|
||||
"YourCurrentVehicleDeleted": "تم حذف السيارة التي كنت بداخلها.",
|
||||
"Distance": "مسافة",
|
||||
"Meters": "أمتار",
|
||||
"Feet": "قدم",
|
||||
"Kilometers": "كيلومترات",
|
||||
"Miles": "اميال",
|
||||
"MustBeVehicleDriver": "يجب أن تكون سائق السيارة!",
|
||||
"PlayerJoinedServer": "انضم إلى اللعبة من {1}!",
|
||||
"PlayerLeftServer": "غادر {1} اللعبة! ({1})",
|
||||
"DisconnectReasons": [
|
||||
"انقطع الإتصال",
|
||||
"انقطع الاتصال",
|
||||
"عميل غير مدعوم",
|
||||
"تحذير للعبة",
|
||||
"كلمة سر غير صحيحه",
|
||||
"قابل للتنفيذ غير معتمد",
|
||||
"انقطع الاتصال",
|
||||
"حظر",
|
||||
"فشل",
|
||||
"اسم غير صالح",
|
||||
"خطأ"
|
||||
],
|
||||
"TakeItemFromHouse": "يأخذ {1} من المنزل",
|
||||
"TakeItemFromBusinessStorage": "يأخذ {1} من تخزين الشركة",
|
||||
"TakeItemFromBusiness": "يأخذ {1} من الأعمال",
|
||||
"TakeItemFromItem": "يأخذ {1} من {2}",
|
||||
"TakeItemFromVehicleTrunk": "يأخذ {1} من صندوق السيارة",
|
||||
"TakeItemFromVehicleDash": "يأخذ {1} من صندوق القفازات",
|
||||
"JobEquipmentInventoryKeyBindTip": "معدات العمل في مخزونك. اضغط على {1} لمشاهدتها.",
|
||||
"JobEquipmentInventoryCommandTip": "معدات العمل في مخزونك. استخدم {1} لمشاهدتها.",
|
||||
"AccountHelp": [
|
||||
"لا تشارك كلمة مرورك مع أي شخص آخر. لن يطالبك فريق عمل {1} بكلمة المرور مطلقًا",
|
||||
"استخدم {1} لتغيير كلمة المرور الخاصة بك ، و {2} إذا نسيتها",
|
||||
"بعض الإعدادات التي يمكنك استخدامها: {1}"
|
||||
],
|
||||
"VehicleHelp": [
|
||||
"ستوفر مركباتك الشخصية أينما تتركها أنت أو أي شخص آخر!",
|
||||
"قم بزيارة المعرض لشراء مركبات جديدة (استخدم {1} لمزيد من المعلومات)",
|
||||
"Some commands: {1}",
|
||||
"قم بزيارة مرآب ميكانيكي لإصلاح وتلوين وضبط سيارتك! {1} للحصول على معلومات"
|
||||
],
|
||||
"VehicleDealershipHelp": [
|
||||
"قم بزيارة تاجر سيارات لشراء مركبات جديدة. استخدم {1} للعثور على واحد.",
|
||||
"عند التاجر ، أدخل السيارة التي تريد شراءها ، وسيظهر لك السعر",
|
||||
"إذا كنت ترغب في شراء السيارة ، فاستخدم {1} وستحصل على مفاتيح لاختبار قيادتها حول ساحة الانتظار.",
|
||||
"ابتعد عن الوكالة مع السيارة الجديدة لتأكيد الشراء."
|
||||
],
|
||||
"JobHelp": [
|
||||
"قم بزيارة مواقع العمل للحصول على وظيفة وكسب المال. ابحث عن علامات الصفراء على الخريطة",
|
||||
"في موقع العمل ، استخدم {1} للحصول على الوظيفة. استخدم {2} لإنهاء عملك",
|
||||
"استخدم {1} لبدء العمل. يمكنك أيضًا الحصول على وظيفة {2} و {3}",
|
||||
"يتم تأمين معظم مركبات العمل. استخدم {1} بالقرب من واحد للدخول إليه.",
|
||||
"عند دخول مركبة عمل ، ستظهر لك معلومات حول كيفية القيام بالمهمة."
|
||||
],
|
||||
"ChatHelp": [
|
||||
"(IC)والشخصية(OOC)هناك نوعان رئيسيان من الدردشة: خارج الطابع الشخصي",
|
||||
"الخلط بين هذين النوعين ليس لعب الأدوار المناسب. راجع {1} للحصول على معلومات.",
|
||||
"بعض أوامر الدردشة: {1}",
|
||||
"يتوفر لبعضها أسماء أقصر ({1} للتحدث ، {2} للصراخ ، إلخ)"
|
||||
],
|
||||
"ServerRulesHelp": [
|
||||
".غير مسموح بها.انت لست سوبر مان(powergaming)الإجراءات غير الواقعية",
|
||||
"لا يسمح بأدوار إرهابية",
|
||||
"اتبع دائمًا التعليمات التي قدمها المشرفون والاداره",
|
||||
"لا تخلط الدردشات (metagaming). لا يمكنك استخدام المعلومات في IC التي تم استلامها OOC",
|
||||
"حافظ على اللغة الإنجليزية في الدردشات الرئيسية. إذا لم تكن جيدًا في اللغة الإنجليزية ، فاستخدم {1}"
|
||||
],
|
||||
"AnimationHelp": [
|
||||
"تتيح لك الرسوم المتحركة تحسين لعب الأدوار من خلال الإجراءات المرئية",
|
||||
"استخدم {1} أو {2} مع اسم لاستخدام الرسم المتحرك.",
|
||||
"لمشاهدة قائمة الرسوم المتحركة ، استخدم {1}"
|
||||
],
|
||||
"WeaponHelp": [
|
||||
"قم بزيارة متجر أسلحة لشراء أسلحة. استخدم {1} للعثور على واحد.",
|
||||
"شراء سلاح يتطلب رخصة سلاح.",
|
||||
"يتم إدارة تراخيص الأسلحة من قبل قسم الشرطة. قدم طلبًا للحصول على واحدة ",
|
||||
"يمكن أيضًا شراء الأسلحة بشكل غير قانوني من بعض الشركات وتجار الأسلحة والعصابات."
|
||||
],
|
||||
"SkinHelp": [
|
||||
"في متجر الملابس ، استخدم {1} لشراء الملابس",
|
||||
"عندما يكون لديك عنصر من الملابس ، قم بتجهيزه واستخدامه مثل أي عنصر آخر لإظهار اختيار الجلد (حدد {1} لمعرفة كيفية استخدام العناصر)",
|
||||
"Some skins are restricted to jobs, clans, or for other reasons."
|
||||
],
|
||||
"KeyBindHelp": [
|
||||
"يمكنك تعيين روابط المفاتيح الخاصة بك. استخدم {1} لرؤية المفاتيح التي تم ربطها.",
|
||||
"استخدم {1} لإضافة رابط مفتاح جديد و {2} لإزالة واحد.",
|
||||
"المفاتيح الافتراضية هي: {1} لمحرك السيارة و {2} للأضواء و {3} للقفل / فتح القفل",
|
||||
"اضغط على {1} لمشاهدة عناصرك و {2} لتجهيز عنصر أو {3} لإلغاء تجهيز الكل.",
|
||||
"اضغط على {1} لاستخدام العنصر الذي تمسكه ، أو اضغط على {2} لإسقاطه ، أو اضغط على {3} لالتقاط عنصر من الأرض."
|
||||
],
|
||||
"BusinessHelp": [
|
||||
"استخدم {1} لشراء العناصر أو {2} لمشاهدة قائمة بما هو معروض للبيع في أي شركة",
|
||||
"تظهر الشركات بأسماء زرقاء فوق الرمز عند مدخلها.",
|
||||
"أوامر صاحب العمل: {1}",
|
||||
"ستظهر سيارة جديدة معروضة للبيع عندما تبتعد عن الوكيل."
|
||||
],
|
||||
"ClanHelp": [
|
||||
"اطلب من الإدارة إنشاء تيم(القبيلة) (على غرار الفصائل / المجموعات / العائلات)",
|
||||
"يتمتع مالكو التيم(القبيلة) بالسيطرة الكاملة على افراد المجموعة بمجرد إنشائها",
|
||||
"أوامر القبيلة: {1}",
|
||||
"أوامر القبيلة: {1}"
|
||||
],
|
||||
"RadioStationHelp": [
|
||||
"استخدم {1} لتعيين المحطة لمركبتك أو منزلك أو عملك",
|
||||
"استخدم {2} لمشاهدة قائمة المحطات",
|
||||
"يمكنك تغيير حجم تدفق الراديو باستخدام {1} مع 0-100 كنسبة مئوية"
|
||||
],
|
||||
"WealthAndTaxHelp": [
|
||||
"ضرائبك في يوم الدفع هي {1} بالمائة من ثروتك المحسوبة.",
|
||||
"ثروتك المحسوبة هي مجموع إجمالي يعتمد على عدد المركبات والمنازل والشركات التي لديك.",
|
||||
"كل سيارة {1} ، كل منزل {2} ، وكل عمل {3}",
|
||||
"استخدم {1} لمعرفة ثروتك الحالية ، و {2} لمعرفة المبلغ الذي ستدفعه كضريبة في كل يوم دفع"
|
||||
],
|
||||
"MustBeInAVehicle": "يجب أن تكون في مركبة!",
|
||||
"MustBeInOrNearVehicle": "أنت بحاجة إلى أن تكون في السيارة أو بالقرب منها!",
|
||||
"MustBeInVehicleFrontSeat": "يجب أن تكون في المقاعد الأمامية للسيارة!",
|
||||
"MustBeInVehicleDriverSeat": "يجب أن تكون السائق!",
|
||||
"DontHaveVehicleKey": "ليس لديك مفتاح لهذه السيارة!",
|
||||
"NoGateAccess": "لا يمكنك الوصول إلى هذه البوابة!",
|
||||
"GateBroken": "هذه البوابة مكسورة!",
|
||||
"GateHacked": "البوابة لا تستجيب!",
|
||||
"RadioJammed": "تسمع صوتًا ثابتًا فقط من الراديو.",
|
||||
"VehicleNotForSale": "هذه السيارة ليست للبيع!",
|
||||
"VehicleNotForRent": "هذه السيارة ليست للإيجار!",
|
||||
"BusinessNotForSale": "هذا العمل ليس للبيع!",
|
||||
"BusinessNotForRent": "هذا العمل ليس للإيجار!",
|
||||
"HouseNotForSale": "هذا المنزل ليس للبيع!",
|
||||
"HouseNotForRent": "هذا المنزل ليس للإيجار!",
|
||||
"DealershipPurchaseTestDrive": "قم بقيادة السيارة بعيدًا عن الوكالة لشرائها ، أو اخرج للإلغاء.",
|
||||
"DealershipPurchaseExitedVehicle": "لقد ألغيت شراء السيارة بالخروج من السيارة!",
|
||||
"VehiclePurchaseComplete": "هذه السيارة الآن لك!",
|
||||
"VehiclePurchaseNotEnoughMoney": "ليس لديك ما يكفي من المال لشراء هذه السيارة!",
|
||||
"HousePurchaseNotEnoughMoney": "ليس لديك ما يكفي من المال لشراء هذا المنزل!",
|
||||
"BusinessPurchaseNotEnoughMoney": "ليس لديك ما يكفي من المال لشراء هذا العمل!",
|
||||
"Locales": {
|
||||
"English": "انجلزي",
|
||||
"Russian": "روسي",
|
||||
"Spanish": "الإسبانية",
|
||||
"German": "الإلمانية",
|
||||
"Dutch": "الهولندية",
|
||||
"Polish": "البولندية"
|
||||
},
|
||||
|
||||
"ADDED-21JAN2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
|
||||
"HeaderPlayerHousesList": "بيوت اللاعبين ({1})",
|
||||
"HeaderPlayerStaffFlagsList": "أعلام طاقم العمل ({1})",
|
||||
"HeaderStaffFlagsList": "أعلام الموظفين",
|
||||
"NonRPName": "اسم غير RP! اختر واحدة جديدة:",
|
||||
"InvalidStaffFlag": "لم يتم العثور على علم الموظفين!",
|
||||
"InvalidClanFlag": "علم القبيلة غير موجود!",
|
||||
"InvalidLocale": "اللغة غير موجودة!",
|
||||
"HeaderJobUniformList": "زي العمل ({1})",
|
||||
"HeaderJobEquipmentList": "معدات العمل ({1})",
|
||||
"InvalidJobUniform": "زي العمل غير موجود!",
|
||||
"InvalidJobEquipment": "لم يتم العثور على معدات العمل!",
|
||||
"HeaderVehiclesInRangeList": "مركبات داخل {1}",
|
||||
"NoVehiclesWithInRange": "لا توجد مركبات داخل {1}",
|
||||
"AmountNotNumber": "المبلغ يجب أن يكون رقما!",
|
||||
"NeedToBeWorking": "يجب أن تعمل! استخدم {1} في موقع العمل أو بالقرب من سيارات العمل.",
|
||||
"NeedToBeOnJobRoute": "عليك أن تفعل طريق عمل! استخدم {1} في مركبة عمل",
|
||||
"CurrentJobRouteDeleted": "تم حذف مسار العمل الذي كنت تعمل فيه بواسطة الإدمن",
|
||||
"CurrentJobRouteVehicleColoursChanged": "تم تغيير ألوان السيارة لمسار وظيفتك بواسطة الإدمن",
|
||||
"NotYourJob": "هذه ليست وظيفتك!",
|
||||
"JobPoints": "يمكنك الحصول على وظيفة من خلال الذهاب إلى النقاط الصفراء على الخريطة.",
|
||||
"QuitJobToTakeAnother": "إذا كنت تريد هذه الوظيفة ، فاستخدم {1} لإنهاء وظيفتك الحالية.",
|
||||
"NotAJobVehicle": "هذه ليست وسيلة عمل!",
|
||||
"NotYourJobVehicle": "هذه ليست مركبة عملك!",
|
||||
"JobRouteDisabled": "تم تعطيل مسار العمل الذي كنت تسلكه بواسطة أحد الإداريين",
|
||||
"HeaderPickupTypes": "أنواع الالتقاط",
|
||||
"HeaderBlipTypes": "أنواع أيقونات الخريطة",
|
||||
"InvalidGPSLocation": "لا توجد مواقع بهذا الاسم أو النوع",
|
||||
"HeaderBusinessList": "الأعمال",
|
||||
"VehicleForSale": "يمكن شراء {1} مقابل {2}! استخدم {3} إذا كنت ترغب في شرائه",
|
||||
"VehicleForRent": "هذا {1} قابل للتأجير لـ {2}! استخدم {3} إذا كنت تريد استئجاره",
|
||||
|
||||
"ADDED-31JAN2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
|
||||
"LoginFailedInvalidPassword": "رمز مرور خاطئ! عدد المحاولات المتبقية: {1}",
|
||||
"LoginFailedNoPassword": "يجب عليك إدخال كلمة المرور! ! عدد المحاولات المتبقية: {1}",
|
||||
"RegistrationFailedNoPassword": "يجب عليك إدخال كلمة المرور!",
|
||||
"RegistrationFailedNoPasswordConfirm": "يجب عليك تأكيد كلمة المرور!",
|
||||
"RegistrationFailedNoEmail": "يجب إدخال البريد الإلكتروني!",
|
||||
"AccountNameAlreadyRegistered": "تم تسجيل اسمك بالفعل!",
|
||||
"AlreadyLoggedIn": "انت بالفعل بداخل!",
|
||||
"RegistrationFailedInvalidEmail": "هذا البريد الإلكتروني غير صالح!",
|
||||
"RegistrationFailedPasswordMismatch": "كلمات المرور غير متطابقة!",
|
||||
"RegistrationFailedCreateError": "تعذر إنشاء حسابك!",
|
||||
"RegistrationSuccess": "لقد تم إنشاء حسابك!",
|
||||
"RegistrationEmailVerifyReminder": "لا تنس التحقق من بريدك الإلكتروني! تم إرسال رمز التحقق لك.",
|
||||
"RegistrationCreateCharReminder": "للعب على الخادم ، ستحتاج إلى تكوين شخصية.",
|
||||
"NoCharactersGUIMessage": "ليس لديك أحرف. هل ترغب في صنع واحدة؟",
|
||||
"NoCharactersGUIWindowTitle": "لا أحرف",
|
||||
"NoCharactersChatMessage": "ليس لديك أحرف. استخدم {1} لإنشاء واحدة.",
|
||||
"NeedEmailFor2FA": "تحتاج إلى إضافة بريدك الإلكتروني إلى حسابك لاستخدام المصادقة ذات العاملين.",
|
||||
"NeedEmailVerifiedFor2FA": "تحتاج إلى التحقق من بريدك الإلكتروني لاستخدام المصادقة ذات العاملين.",
|
||||
"SetEmailHelpTip": "استخدم {1} لتعيين بريدك الإلكتروني.",
|
||||
"VerifyEmailHelpTip": "استخدم {1} للتحقق من بريدك الإلكتروني.",
|
||||
|
||||
"ADDED-13FEB2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
|
||||
"NearbyRadio": "راديو قريب",
|
||||
"FromRadio": "من الراديو",
|
||||
"ToRadio": "في الراديو",
|
||||
"NeedToEnterPropertyCommand": "تحتاج إلى إدخال {1} أولاً! استخدم {2} للدخول والخروج",
|
||||
"NeedToEnterPropertyKeyPress": "تحتاج إلى إدخال {1} أولاً! اضغط على {2} للدخول والخروج",
|
||||
"InventoryFullCantCarry": "ليس لديك أي مساحة لحمل هذا (جرد كامل)!",
|
||||
"NotEnoughCashNeedAmountMore": "ليس لديك ما يكفي من المال! أنت بحاجة إلى {1} أكثر!",
|
||||
"AmountMustBeMoreThan": "يجب أن يكون المبلغ أكثر من {1}!",
|
||||
"WeaponBanned": "لا يسمح لك بشراء أو استخدام الأسلحة!",
|
||||
"TimeNotNumber": "يجب أن يكون الوقت رقمًا",
|
||||
"HeaderDefaultBusinessItemTypes": "قوالب عناصر الأعمال",
|
||||
"FixingStuck": "إصلاح موقعك والعالم الافتراضي ...",
|
||||
"CantUseCommandYet": "يجب أن تنتظر قبل أن تتمكن من استخدام هذا الأمر مرة أخرى!",
|
||||
"NotATester": "أنت لست مختبرا!",
|
||||
"AccessDenied": "تم الرفض",
|
||||
"InvalidSkin": "هذا الجلد غير صالح!",
|
||||
"HeaderInteriorTypes": "قائمة التصميمات الداخلية",
|
||||
"ViewInventoryKeyPressTip": "اضغط على {1} لرؤية العناصر الخاصة بك",
|
||||
"ViewInventoryCommandTip": "استخدم {1} لمشاهدة عناصرك",
|
||||
"GUIAccountSettingToggle": "لقد قمت بتحويل {1} GUI",
|
||||
|
||||
"ADDED-23MAR2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations",
|
||||
"CarCommandHelp": "You can buy a car by visiting a vehicle dealership. Use {1} for more information.",
|
||||
"SkinCommandHelp": "You can change your skin by visiting a clothes store. Use {1} for more info.",
|
||||
"BusinessVehiclesRespawned": "All business vehicles have been respawned by an admin!",
|
||||
"JobVehiclesRespawned": "All job vehicles have been respawned by an admin!",
|
||||
"PlayerVehiclesRespawned": "All player vehicles have been respawned by an admin!",
|
||||
"ClanVehiclesRespawned": "All clan vehicles have been respawned by an admin!",
|
||||
"PublicVehiclesRespawned": "All public have been respawned by an admin!",
|
||||
"EmptyVehiclesRespawned": "All empty vehicles have been respawned by an admin!",
|
||||
"AllVehiclesRespawned": "All vehicles have been respawned by an admin!",
|
||||
"AllVehiclesReloaded": "All vehicles have been reloaded by an admin!",
|
||||
"YourVehicleRespawned": "Your vehicle has been respawned",
|
||||
"PlayerIPBanned": "{1} has been IP banned!",
|
||||
"PlayerCharacterBanned": "{1} has been character banned!",
|
||||
"PlayerSubNetBanned": "{1} has been subnet banned!",
|
||||
"CantModifyBusiness": "You can't manage or modify this business",
|
||||
"CantModifyHouse": "You can't manage or modify this house",
|
||||
"ServerTimeSet": "{1} set the time to {2}",
|
||||
"ServerWeatherSet": "{1} set the weather to {2}",
|
||||
"ServerSnowSet": "{1} turned falling snow {2} and ground snow {3}",
|
||||
"AllJobsReloaded": "All server jobs have been reloaded by an admin",
|
||||
"ServerLogoSet": "{1} turned the server logo image {2}",
|
||||
"ServerGUISet": "{1} turned GUI for this server {2}",
|
||||
"ServerBusinessBlipsSet": "{1} turned all business blips {2}",
|
||||
"ServerHouseBlipsSet": "{1} turned all house blips {2}",
|
||||
"ServerJobBlipsSet": "{1} turned all job blips {2}",
|
||||
"ServerBusinessPickupsSet": "{1} turned all business pickups {2}",
|
||||
"ServerHousePickupsSet": "{1} turned all house pickups {2}",
|
||||
"ServerJobPickupsSet": "{1} turned on all job pickups {2}",
|
||||
"BusinessBuyItemsLabel": "Use {1} to purchase items",
|
||||
"PropertyEnterCommandLabel": "Use {1} to enter",
|
||||
"PropertyEnterKeyPressLabel": "Press {1} to enter",
|
||||
"PropertyForSaleLabel": "For sale: ${1}",
|
||||
"PropertyForRentLabel": "For rent: ${1} every payday",
|
||||
"RemainingTaxPaidInMoney": "You covered the remaining taxes with ${1} in cash.",
|
||||
"LostMoneyFromTaxes": "You lost money since your taxes are more than your paycheck!",
|
||||
"NextPaycheckRepossessionWarning": "If you don't have enough cash to cover taxes on next paycheck, you will lose stuff!",
|
||||
"NotEnoughMoneyForTax": "You don't have enough money to cover your taxes!",
|
||||
"AssetsRepossessedForTax": "You lost {1} vehicles, {2} houses, and {3} businesses because you couldn't pay taxes!",
|
||||
"Closed": "Closed",
|
||||
"Open": "Open",
|
||||
"VehicleDealershipLabel": "Enter a vehicle as driver to buy it",
|
||||
"TakeJobLabel": "Use {1} to work here",
|
||||
"StartWorkLabel": "Use {1} to start working",
|
||||
"JobEquipAndUniformLabel": "Use {1} and {2} for job stuff, or {3} to stop working",
|
||||
"NotYourJobLabel": "You already have a different job. Use {1} if you want this one",
|
||||
"JobLabel": "{1} Job",
|
||||
"PaydayBonusSet": "{1} set the payday bonus to ${2}",
|
||||
"AllHousesReloaded": "All houses have been reloaded by an admin",
|
||||
"AllRadioStationsReloaded": "All radio stations have been reloaded by an admin!",
|
||||
"PlayerKicked": "{1} has been kicked from the server",
|
||||
"AllBusinessesReloaded": "All businesses have been reloaded by an admin!",
|
||||
"UnableToDoThat": "You aren't able to do that",
|
||||
"SetVehicleClanConfirmMessage": "Are you sure you want to give this vehicle to your clan?",
|
||||
"SetVehicleClanConfirmTitle": "Warning!",
|
||||
"SetItemPriceBelowOrderPriceMessage": "Are you sure you want to set the item price below it's order price? You will lose ${1} every purchase!",
|
||||
"SetItemPriceBelowOrderPriceTitle": "Warning!",
|
||||
"MustOwnVehicle": "You don't own this vehicle!"
|
||||
}
|
||||
@@ -1,458 +0,0 @@
|
||||
{
|
||||
"TranslationProvidedBy": "Renzuka_Ctone",
|
||||
"LocaleEnglishName": "Simplified Chinese",
|
||||
"LocaleNativeName": "简体中文",
|
||||
"LocaleOffer": "本服务器有可用的中文翻译版本,使用 {1} 以启用。",
|
||||
"LocaleChanged1": "语言已设定为 {1}",
|
||||
"LocaleChanged2": "服务器现在将以 {1} 显示消息。",
|
||||
"LocaleChangedNote": "这将不会影响到来自其他玩家的消息",
|
||||
"AccentsListHeader": "口音",
|
||||
"HeaderHelpMainList": "帮助类别",
|
||||
"AccentNotFound": "口音不存在",
|
||||
"AccentSet": " 口音已设置为 {1}",
|
||||
"InvalidAnimation": "该动作不存在",
|
||||
"AnimationCommandTip": "使用 {1} 以查看可用动作列表",
|
||||
"InvalidAnimationDistance": "范围必须在 0 到 3 之间",
|
||||
"AnimationStopCommandTip": "使用 {1} 以停止当前动作",
|
||||
"CantBanClient": "你无法封禁该玩家",
|
||||
"PlayerAccountBanned": "{1} 的账号已被封禁",
|
||||
"ClanNotFound": "帮派不存在",
|
||||
"ClanNameTaken": "该帮派名称已被占用",
|
||||
"PlayerNotFound": "玩家不存在",
|
||||
"ClanCantRemoveRanks": "无法清除帮派等级",
|
||||
"ClanCantAddRanks": "无法增加帮派等级",
|
||||
"ClanRankNotFound": "帮派等级不存在",
|
||||
"ClanCantChangeMemberTag": "你无法更改帮派成员的标签",
|
||||
"ClanPlayerNotInSameClan": "该玩家并不属于你的帮派",
|
||||
"ClanCantChangeRankLevel": "你无法改变帮派等级",
|
||||
"ClanCantChangeRankTag": "你无法改变帮派标签",
|
||||
"NameNotRegistered": "你的游戏名尚未注册!使用 {1} 以创建一个新账户。",
|
||||
"AutomaticLoginIPToggle": "通过 IP 自动登录功能 现已 {1}",
|
||||
"CouldNotRegisterAccount": "在创建你的账户时遇到一些问题,请与管理员联系。",
|
||||
"RandomTipsToggle": "随机提示信息现已 {1}",
|
||||
"ActionTipsToggle": "操作帮助现已 {1}",
|
||||
"AutoSpawnLastCharToggle": "上次使用的角色 {1} 已自动复活。",
|
||||
"AccountGUISettingToggle": "GUI 现已 {1}",
|
||||
"On": "开启",
|
||||
"Off": "关闭",
|
||||
"Yes": "是",
|
||||
"No": "否",
|
||||
"True": "真",
|
||||
"False": "假",
|
||||
"Locked": "锁定",
|
||||
"Unlocked": "未锁定",
|
||||
"PasswordNotGoodEnough": "新密码必须符合要求!",
|
||||
"PasswordNeedsBase": "密码至少需要 {1}",
|
||||
"PasswordNeedsCapitals": "{1} 大写字母",
|
||||
"PasswordNeedsNumbers": "{1} 数字",
|
||||
"PasswordNeedsSymbols": "{1} 符号",
|
||||
"PasswordsDontMatch": "新密码和确认密码不一致!",
|
||||
"PasswordChanged": "已成功更改你的密码!",
|
||||
"AutoLoggedInIP": "已通过 IP 自动登录!",
|
||||
"WelcomeBack": "欢迎回到 {1}, {2}! 请 {3} 以继续。",
|
||||
"WelcomeNewPlayer": "欢迎来到 {1}, {2}! 请 {3} 以开始游戏。",
|
||||
"InvalidPlayer": "玩家不存在!",
|
||||
"InvalidBusiness": "企业不存在!",
|
||||
"InvalidHouse": "住宅不存在!",
|
||||
"InvalidVehicle": "载具不存在!",
|
||||
"InvalidClan": "帮派不存在!",
|
||||
"InvalidClanRank": "帮派等级不存在!",
|
||||
"InvalidJob": "职业不存在",
|
||||
"InvalidItem": "物品不存在!",
|
||||
"InvalidItemType": "物品种类不存在!",
|
||||
"InvalidRadioStation": "电台不存在!",
|
||||
"InvalidGate": "大门不存在!",
|
||||
"EntersProperty": "开门并进入 {1}",
|
||||
"ExitsProperty": "开门并退出 {1}",
|
||||
"EnterExitPropertyDoorLocked": "试图打开 {1} 之门,却发现已上锁。",
|
||||
"PropertyNoInterior": "{1} 暂无内部场景,但你仍可以在大门图标上使用相关指令。",
|
||||
"NoBusinessWithItemType": "暂无可用项目的企业",
|
||||
"HeaderKeyBinds": "快捷键设置",
|
||||
"HeaderAccountHelp": "账户帮助",
|
||||
"HeaderVehicleHelp": "载具帮助",
|
||||
"HeaderVehicleDealershipHelp": "汽车经销商帮助 ",
|
||||
"HeaderJobHelp": "职业帮助",
|
||||
"HeaderChatHelp": "聊天帮助",
|
||||
"HeaderServerRules": "服务器规则",
|
||||
"HeaderWebsiteInfo": "官网",
|
||||
"HeaderDiscordInfo": "Discord",
|
||||
"HeaderAnimationsList": "动作列表",
|
||||
"HeaderPayAndSprayHelp": "有偿喷漆帮助",
|
||||
"HeaderAmmunationHelp": "弹药帮助",
|
||||
"HeaderVehicleTuneupHelp": "载具改装帮助",
|
||||
"HeaderBindableKeysHelp": "可绑定的按键",
|
||||
"HeaderSkinHelp": "服装/皮肤帮助",
|
||||
"HeaderBusinessHelp": "企业帮助",
|
||||
"HeaderClanHelp": "帮派帮助",
|
||||
"HeaderPlayerVehiclesList": "玩家载具 ({1})",
|
||||
"HeaderPlayerBusinessesList": "玩家企业 ({1})",
|
||||
"HeaderClansList": "帮派列表",
|
||||
"HeaderAdminsList": "管理员列表",
|
||||
"HeaderBadgeInfo": "荣誉信息",
|
||||
"HeaderAccentsList": "口音列表",
|
||||
"HeaderPlayerInfo": "玩家信息 ({1})",
|
||||
"HeaderWealthandTaxHelp": "资产与税收帮助",
|
||||
"HeaderCommandInfo": "指令帮助 ({1})",
|
||||
"HeaderRadioHelp": "电台帮助",
|
||||
"HeaderRadioStationsList": "电台",
|
||||
"HeaderKeyBindsList": "按键绑定列表",
|
||||
"RadioVolumeChanged": "{1} 已将电台音量调整为 {2}%",
|
||||
"VolumeLevelNotNumber": "确保输入的音量大小为有效数值",
|
||||
"RadioStationLocationInvalid": "你必须在车辆、住宅或企业中,或拥有个人设备才能更改电台!",
|
||||
"ActionBusinessRadioStationChange": "企业电台已设置为 {1} ({2})",
|
||||
"ActionHouseRadioStationChange": "住宅电台已设置为 {1} ({2})",
|
||||
"ActionVehicleRadioStationChange": "载具电台已设置为 {1} ({2})",
|
||||
"ActionItemRadioStationChange": "{1} 的电台已设置为 {2} ({3})",
|
||||
"RandomVehicleCommandsDisabled": "这是一辆随机刷出的街车,无法对其使用指令。",
|
||||
"HouseDoorLock": "住宅 {1} {2}!",
|
||||
"BusinessDoorLock": "企业 {1} {2}!",
|
||||
"ServerGameModeRestarting": "游戏模式正在重启!",
|
||||
"HeaderSelfItemList": "你的库存",
|
||||
"HeaderPlayerItemList": "玩家库存 ({1})",
|
||||
"HeaderHouseItemList": "住宅库存",
|
||||
"HeaderBusinessFloorItemList": "企业库存 (供售)",
|
||||
"HeaderBusinessStorageItemList": "企业库存 (暂存)",
|
||||
"HeaderItemItemList": "{1} 的库存",
|
||||
"ItemSlotNotNumber": "物体槽位必须为整数",
|
||||
"ItemSlotMustBeBetween": "物体槽位应在 {1} 与 {2} 之间!",
|
||||
"UseItemBugged": "尝试操作的物品出现错误!错误报告已发送给服务器开发人员。",
|
||||
"PickupItemBugged": "尝试拾取的物品出现错误!错误报告已发送给服务器开发人员。",
|
||||
"DropItemBugged": "尝试丢弃的物品出现错误!错误报告已发送给服务器开发人员。",
|
||||
"HandsBusy": "操作繁忙",
|
||||
"CantUseItemInSkinChange": "自定义外观时无法使用该物品",
|
||||
"CantDropItemInSkinChange": "自定义外观时无法丢弃该物品",
|
||||
"CantPickupItemInSkinChange": "自定义外观时无法拾取物品",
|
||||
"CantSwitchItemInSkinChange": "自定义外观时无法切换物品",
|
||||
"CantGiveItemInSkinChange": "自定义外观时无法赠送物品",
|
||||
"CantTakeItemInSkinChange": "自定义外观时无法取出物品",
|
||||
"ItemUnequippableNoAmmo": "槽位 {2} 中 {1} 弹药耗尽,无法装备!",
|
||||
"NoSpaceSelfInventory": "库存已无更多空间",
|
||||
"Business": "企业",
|
||||
"House": "住宅",
|
||||
"Clan": "帮派",
|
||||
"Vehicle": "载具",
|
||||
"Item": "物品",
|
||||
"ItemType": "物品种类",
|
||||
"Gate": "大门",
|
||||
"Door": "门",
|
||||
"ClanRank": "帮派等级",
|
||||
"JobRank": "职业等级",
|
||||
"RadioStation": "电台",
|
||||
"Months": [
|
||||
"一月",
|
||||
"二月",
|
||||
"三月",
|
||||
"四月",
|
||||
"五月",
|
||||
"六月",
|
||||
"七月",
|
||||
"八月",
|
||||
"九月",
|
||||
"十月",
|
||||
"十一月",
|
||||
"十二月"
|
||||
],
|
||||
"WeekDays": [
|
||||
"周日",
|
||||
"周一",
|
||||
"周二",
|
||||
"周三",
|
||||
"周四",
|
||||
"周五",
|
||||
"周六"
|
||||
],
|
||||
"CardinalDirections": [
|
||||
"北",
|
||||
"东北",
|
||||
"东",
|
||||
"东南",
|
||||
"南",
|
||||
"西南",
|
||||
"西",
|
||||
"西北"
|
||||
],
|
||||
"NewPlayerReadyToPlay": [
|
||||
"你得到了一些现金,使用 {1} 以找到买东西的地方。",
|
||||
"赚钱靠劳动,求职请前往雷达上的小黄点。",
|
||||
"买车可以到汽车经销店,你也可以在出生点附近租车或者直接乘火车。",
|
||||
"确保已阅读 {1},使用 {2} 以获取相关信息。"
|
||||
],
|
||||
"YourCurrentVehicleDeleted": "你当前乘坐的车辆已被删除。",
|
||||
"Distance": "距离",
|
||||
"Meters": "米",
|
||||
"Feet": "英尺",
|
||||
"Kilometers": "公里",
|
||||
"Miles": "英里",
|
||||
"MustBeVehicleDriver": "你并不是主驾驶!",
|
||||
"PlayerJoinedServer": "{1} 加入游戏。来自:{1}",
|
||||
"PlayerLeftServer": "{1} 退出游戏! ({1})",
|
||||
"DisconnectReasons": [
|
||||
"失去连接",
|
||||
"断开连接",
|
||||
"不支持的客户端",
|
||||
"游戏错误",
|
||||
"密码错误",
|
||||
"不支持的游戏主程序",
|
||||
"断开连接",
|
||||
"已被封禁",
|
||||
"连接失败",
|
||||
"无效的游戏名",
|
||||
"客户端崩溃"
|
||||
],
|
||||
"TakeItemFromHouse": "从住宅处拿到 {1}",
|
||||
"TakeItemFromBusinessStorage": "从企业仓库拿到 {1}",
|
||||
"TakeItemFromBusiness": "从企业处拿到 {1}",
|
||||
"TakeItemFromItem": "从 {2} 处拿到 {1}",
|
||||
"TakeItemFromVehicleTrunk": "从后备箱中取出 {1}",
|
||||
"TakeItemFromVehicleDash": "从杂物箱中取出 {1}",
|
||||
"JobEquipmentInventoryKeyBindTip": "工作设备在你的仓库里,按下 {1} 以查看。",
|
||||
"JobEquipmentInventoryCommandTip": "工作设备在你的仓库里,使用 {1} 以查看。",
|
||||
"AccountHelp": [
|
||||
"请不要将密码分享给任何人,且{1} 工作人员不会询问你的密码。",
|
||||
"使用 {1} 以更改密码,若遗忘密码请使用 {2} 。",
|
||||
"可用设定:{1}"
|
||||
],
|
||||
"VehicleHelp": [
|
||||
"你的私人车辆将会在离开车辆时自动保存!",
|
||||
"前往汽车经销商购买新车 (使用 {1} 获取更多信息)",
|
||||
"相关指令:{1}",
|
||||
"去修理厂修理、喷漆和改装你的汽车! 使用 {1} 获取相关信息。"
|
||||
],
|
||||
"VehicleDealershipHelp": [
|
||||
"前往汽车经销商购买新车,使用 {1} 可以找一家。",
|
||||
"在经销商处进入你希望购买的车辆,对应价格将会自动显示。",
|
||||
"确定车辆后使用 {1},即可开始试驾。",
|
||||
"驾驶车辆离开经销商以确认购买。"
|
||||
],
|
||||
"JobHelp": [
|
||||
"地图上的黄点为求职处,你可以在那里找工作挣大钱。",
|
||||
"在求职处使用 {1} 以获得工作,不想干了就使用 {2} 跑路。",
|
||||
"使用 {1} 即开始工作,你也可以在 {2} 与 {3} 中获得工作。",
|
||||
"工作专用车一般都是锁着的,在其旁边使用 {1} 即可进入。",
|
||||
"进入专用车时,将向您显示有关如何执行工作的信息。"
|
||||
],
|
||||
"ChatHelp": [
|
||||
"聊天方式主要有两种:本我意识 (OOC 即 out-of-character) 和 角色意识 (IC 即 in-character)",
|
||||
"在玩角色扮演的时候最好不要混用两种聊天方式,查看 {1} 以获取更多信息。",
|
||||
"聊天指令:{1}",
|
||||
"某些玩家有可用的更简短的名称 ({1} 用以正常交流, {2} 用以喊话等)"
|
||||
],
|
||||
"ServerRulesHelp": [
|
||||
"不允许不切实际的行为 (powergaming),你拯救不了世界。",
|
||||
"不允许恐怖分子或恐怖主义式角色扮演。",
|
||||
"请始终遵循版主和管理员的指示。",
|
||||
"不建议混合式聊天 (metagaming), 你不能在IC中使用收到OOC的信息。",
|
||||
"请使用英语与其他玩家进行交流,不大擅长英语的话可以试试 {1}"
|
||||
],
|
||||
"AnimationHelp": [
|
||||
"做出虚拟动作可以提升你角色扮演的游戏体验。",
|
||||
"使用 {1} 或 {2} + 动作名称 以做出一个动作。",
|
||||
"要查看动作列表,使用 {1}"
|
||||
],
|
||||
"WeaponHelp": [
|
||||
"前往枪店购买武器,使用 {1} 可以找一家。",
|
||||
"购买武器是需要武器许可证的。",
|
||||
"而武器许可证由警察局管理,在那里申请就可以办到一张。",
|
||||
"武器也可以从一些企业、武器经销商和帮派那里非法购买。"
|
||||
],
|
||||
"SkinHelp": [
|
||||
"在服装店里使用 {1} 即可买到衣服",
|
||||
"当你拥有可穿戴式物品时,像其它物品一样直接装备即可。(查看 {1} 以了解如何使用物品)",
|
||||
"某些服装将因工作、帮派或其它原因而受到限制。"
|
||||
],
|
||||
"KeyBindHelp": [
|
||||
"你可以自定义快捷键,使用 {1} 以查看已绑定的按键。",
|
||||
"使用 {1} 以新增快捷键,{2} 以移除。",
|
||||
"默认按键如下: {1} 发动引擎,{2} 车灯开关,{3} 锁车/解锁",
|
||||
"按下 {1} 查看你的物品,{2} 装备选定物品,{3} 卸下所有物品",
|
||||
"按下 {1} 使用当前物品,{2} 丢弃当前物品,{3} 拾取地面物品"
|
||||
],
|
||||
"BusinessHelp": [
|
||||
"使用 {1} 以购买物品,或者使用 {2} 以查看任意企业的待售物品列表。",
|
||||
"企业名称以蓝色字体显示在图标上方。",
|
||||
"企业主可用的指令:{1}",
|
||||
"一辆待售的新车会在你开车离开经销商(即确认购买)后出现。"
|
||||
],
|
||||
"ClanHelp": [
|
||||
"请求管理员以创建一个属于你自己的帮派 (类似于派系/团体/家庭)",
|
||||
"帮派创建成功后,帮主将拥有其所有控制权。",
|
||||
"帮派指令:{1}",
|
||||
"更多帮派指令:{1}"
|
||||
],
|
||||
"RadioStationHelp": [
|
||||
"使用 {1} 为你的车辆/住宅/企业设置电台",
|
||||
"使用 {2} 以查看电台列表",
|
||||
"你可以使用 {1} 来改变电台音量大小。(0-100%)"
|
||||
],
|
||||
"WealthAndTaxHelp": [
|
||||
"发薪日那天需要缴税,而税款是你计算财富的 {1}%.",
|
||||
"计算财富是基于你所拥有的车辆、住宅和企业的总和。",
|
||||
"{1} 每辆车,{2} 每栋房,{3} 每个企业。",
|
||||
"使用 {1} 以查看你的当前财富,{2} 以查看发薪日当天你应当缴纳的税款。"
|
||||
],
|
||||
"MustBeInAVehicle": "你必须先坐在一辆车上!",
|
||||
"MustBeInOrNearVehicle": "必须要有辆车在你旁边,或者你坐上那辆车!",
|
||||
"MustBeInVehicleFrontSeat": "你必须坐在车辆前排座椅上!",
|
||||
"MustBeInVehicleDriverSeat": "你必须是车辆主驾驶!",
|
||||
"DontHaveVehicleKey": "你并没有这车的钥匙!",
|
||||
"NoGateAccess": "你无法进入这个大门。",
|
||||
"GateBroken": "这门已是破烂不堪。",
|
||||
"GateHacked": "大门没什么反应。",
|
||||
"RadioJammed": "电台似是被干扰了。",
|
||||
"VehicleNotForSale": "本车不出售!",
|
||||
"VehicleNotForRent": "本车不出租!",
|
||||
"BusinessNotForSale": "本企业不出售!",
|
||||
"BusinessNotForRent": "本企业不出租!",
|
||||
"HouseNotForSale": "这房子不给卖!",
|
||||
"HouseNotForRent": "这房子不给租!",
|
||||
"DealershipPurchaseTestDrive": "将车辆驶离经销商处以确认购买,下车取消。",
|
||||
"DealershipPurchaseExitedVehicle": "已取消车辆购买。",
|
||||
"VehiclePurchaseComplete": "这辆车现在是你的了!不管它在哪里都会自动保存。",
|
||||
"VehiclePurchaseNotEnoughMoney": "你没有足够的钱买这辆车!",
|
||||
"HousePurchaseNotEnoughMoney": "你没有足够的钱买这所房子!",
|
||||
"BusinessPurchaseNotEnoughMoney": "你没有足够的钱来买这家企业!",
|
||||
"Locales": {
|
||||
"English": "英文",
|
||||
"Russian": "俄文",
|
||||
"Spanish": "西班牙文",
|
||||
"German": "德文",
|
||||
"Dutch": "荷兰文",
|
||||
"Polish": "波兰文",
|
||||
"Chinese": "中文"
|
||||
},
|
||||
|
||||
"ADDED-21JAN2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
|
||||
"HeaderPlayerHousesList": "玩家住宅 ({1})",
|
||||
"HeaderPlayerStaffFlagsList": "玩家信号旗 ({1})",
|
||||
"HeaderStaffFlagsList": "信号旗",
|
||||
"NonRPName": "非角色扮演名称!请选择新的名称:",
|
||||
"InvalidStaffFlag": "信号旗帜不存在!",
|
||||
"InvalidClanFlag": "帮派旗帜不存在!",
|
||||
"InvalidLocale": "语言不存在!",
|
||||
"HeaderJobUniformList": "工作制服 ({1})",
|
||||
"HeaderJobEquipmentList": "工作设备 ({1})",
|
||||
"InvalidJobUniform": "工作制服不存在!",
|
||||
"InvalidJobEquipment": "工作设备不存在!",
|
||||
"HeaderVehiclesInRangeList": "{1} 内的车辆",
|
||||
"NoVehiclesWithInRange": "{1} 内无任何车辆。",
|
||||
"AmountNotNumber": "请输入有效数字!",
|
||||
"NeedToBeWorking": "你得去工作!在求职处或工作专用车旁使用 {1} 。",
|
||||
"NeedToBeOnJobRoute": "你需要进行一个工作路线!请在工作专用车内使用 {1} 。",
|
||||
"CurrentJobRouteDeleted": "管理员已删除你所在的工作路线",
|
||||
"CurrentJobRouteVehicleColoursChanged": "管理员已更改你的工作路线的车辆颜色",
|
||||
"NotYourJob": "这不是你的工作!",
|
||||
"JobPoints": "前往地图上的黄点找到工作。",
|
||||
"QuitJobToTakeAnother": "要是想干这行,先使用 {1} 离开当前工作。",
|
||||
"NotAJobVehicle": "这并不是辆工作专用车!",
|
||||
"NotYourJobVehicle": "这不是你工作用的车!",
|
||||
"JobRouteDisabled": "管理员已禁用你的工作路线",
|
||||
"HeaderPickupTypes": "拾取物类型",
|
||||
"HeaderBlipTypes": "地图图标类型",
|
||||
"InvalidGPSLocation": "没有具有该名称或类型的位置",
|
||||
"HeaderBusinessList": "企业",
|
||||
"VehicleForSale": "此 {1} 可被 {2} 购买到!购买请使用 {3}",
|
||||
"VehicleForRent": "此 {1} 可被 {2} 租用!租用请使用 {3}",
|
||||
|
||||
"ADDED-31JAN2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
|
||||
"LoginFailedInvalidPassword": "密码错误!还有 {1} 次尝试机会。",
|
||||
"LoginFailedNoPassword": "密码不能为空!还有 {1} 次尝试机会。",
|
||||
"RegistrationFailedNoPassword": "密码不能为空!",
|
||||
"RegistrationFailedNoPasswordConfirm": "确认密码不能为空!",
|
||||
"RegistrationFailedNoEmail": "电子邮件不能为空!",
|
||||
"AccountNameAlreadyRegistered": "该游戏名已被注册。",
|
||||
"AlreadyLoggedIn": "您已登录过账号!",
|
||||
"RegistrationFailedInvalidEmail": "该电子邮件无效!",
|
||||
"RegistrationFailedPasswordMismatch": "密码不匹配!",
|
||||
"RegistrationFailedCreateError": "无法创建您的帐户!",
|
||||
"RegistrationSuccess": "账号创建成功!",
|
||||
"RegistrationEmailVerifyReminder": "验证码已发送至您的电子邮件,请前往进行验证。",
|
||||
"RegistrationCreateCharReminder": "在正式游玩之前,您需要创建一个角色。",
|
||||
"NoCharactersGUIMessage": "暂无角色。要创建一个吗?",
|
||||
"NoCharactersGUIWindowTitle": "无角色",
|
||||
"NoCharactersChatMessage": "暂无角色。使用 {1} 新建一个角色。",
|
||||
"NeedEmailFor2FA": "开启双重验证前,请先添加您的电子邮件。",
|
||||
"NeedEmailVerifiedFor2FA": "开启双重验证前,请先验证您的电子邮件。",
|
||||
"SetEmailHelpTip": "使用 {1} 以设置您的电子邮件。",
|
||||
"VerifyEmailHelpTip": "使用 {1} 以验证您的电子邮件。",
|
||||
|
||||
"ADDED-13FEB2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
|
||||
"NearbyRadio": "附近电台",
|
||||
"FromRadio": "起始电台",
|
||||
"ToRadio": "终止电台",
|
||||
"NeedToEnterPropertyCommand": "你得先进入 {1} !使用 {2} 以进入或退出。",
|
||||
"NeedToEnterPropertyKeyPress": "你得先进入 {1} !使用 {2} 以进入或退出。",
|
||||
"InventoryFullCantCarry": "库存已满!",
|
||||
"NotEnoughCashNeedAmountMore": "没有足够现金!你需要多加 {1} !",
|
||||
"AmountMustBeMoreThan": "数额必须大于 {1}!",
|
||||
"WeaponBanned": "你已被禁止购买及使用武器!",
|
||||
"TimeNotNumber": "设定的时间非有效数值",
|
||||
"HeaderDefaultBusinessItemTypes": "企业项目模板",
|
||||
"FixingStuck": "修复你当前的位置和虚拟世界 ...",
|
||||
"CantUseCommandYet": "稍后才能再次使用该指令!",
|
||||
"NotATester": "非测试者",
|
||||
"AccessDenied": "拒绝访问",
|
||||
"InvalidSkin": "该皮肤无效!",
|
||||
"HeaderInteriorTypes": "内部场景列表",
|
||||
"ViewInventoryKeyPressTip": "按下 {1} 以查看你的全部物品",
|
||||
"ViewInventoryCommandTip": "使用 {1} 以查看你的全部物品",
|
||||
"GUIAccountSettingToggle": "已切换至 {1} GUI",
|
||||
|
||||
"ADDED-23MAR2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations",
|
||||
"CarCommandHelp": "前往汽车经销商购买新车,使用 {1} 以获取更多信息。",
|
||||
"SkinCommandHelp": "前往服装店购买新衣服,使用 {1} 以获取更多信息。",
|
||||
"BusinessVehiclesRespawned": "管理员已重置所有企业车辆!",
|
||||
"JobVehiclesRespawned": "管理员已重置所有工作车辆!",
|
||||
"PlayerVehiclesRespawned": "管理员已重置所有玩家车辆!",
|
||||
"ClanVehiclesRespawned": "管理员已重置所有帮派车辆!",
|
||||
"PublicVehiclesRespawned": "管理员已重置所有公众!",
|
||||
"EmptyVehiclesRespawned": "管理员已重置所有空闲车辆!",
|
||||
"AllVehiclesRespawned": "管理员已重置所有车辆!",
|
||||
"AllVehiclesReloaded": "管理员已重载所有车辆!",
|
||||
"YourVehicleRespawned": "你的车辆已重生!",
|
||||
"PlayerIPBanned": "{1} 被封禁 IP!",
|
||||
"PlayerCharacterBanned": "{1} 被封禁角色!",
|
||||
"PlayerSubNetBanned": "{1} 被封禁网段!",
|
||||
"CantModifyBusiness": "你无法操作或修改这个企业!",
|
||||
"CantModifyHouse": "你无法操作或修改此住宅!",
|
||||
"ServerTimeSet": "{1} 已将时间设定为 {2}",
|
||||
"ServerWeatherSet": "{1} 已将天气设定为 {2}",
|
||||
"ServerSnowSet": "{1} 已调整:落雪-{2},积雪-{3}",
|
||||
"AllJobsReloaded": "管理员已重置所有职业!",
|
||||
"ServerLogoSet": "{1} 已设定:服务器 LOGO 状态-{2}",
|
||||
"ServerGUISet": "{1} 已设定:服务器 GUI 状态-{2}",
|
||||
"ServerBusinessBlipsSet": "{1} 已设定:服务器企业图例显示状态-{2}",
|
||||
"ServerHouseBlipsSet": "{1} 已设定:服务器住宅图例显示状态-{2}",
|
||||
"ServerJobBlipsSet": "{1} 已设定:服务器职业图例显示状态-{2}",
|
||||
"ServerBusinessPickupsSet": "{1} 已设定:服务器企业拾取物状态-{2}",
|
||||
"ServerHousePickupsSet": "{1} 已设定:服务器住宅拾取物状态-{2}",
|
||||
"ServerJobPickupsSet": "{1} 已设定:服务器职业拾取物状态-{2}",
|
||||
"BusinessBuyItemsLabel": "使用 {1} 以购买物品",
|
||||
"PropertyEnterCommandLabel": "使用 {1} 以进入",
|
||||
"PropertyEnterKeyPressLabel": "按下 {1} 以进入",
|
||||
"PropertyForSaleLabel": "售价:${1}",
|
||||
"PropertyForRentLabel": "租价:每个发薪日需 ${1}",
|
||||
"RemainingTaxPaidInMoney": "你以 ${1} 现金支付了剩下的税款",
|
||||
"LostMoneyFromTaxes": "你应缴纳的税款超过了你的薪水!",
|
||||
"NextPaycheckRepossessionWarning": "若无足够的现金来支付下一份薪水的税款,你将失去一些资产!",
|
||||
"NotEnoughMoneyForTax": "没有足够的现金来支付税款",
|
||||
"AssetsRepossessedForTax": "因未缴纳税款,你已失去 {1} 辆车,{2} 处住宅,{3} 处企业!",
|
||||
"Closed": "Closed",
|
||||
"Open": "Open",
|
||||
"VehicleDealershipLabel": "Enter a vehicle as driver to buy it",
|
||||
"TakeJobLabel": "Use {1} to work here",
|
||||
"StartWorkLabel": "Use {1} to start working",
|
||||
"JobEquipAndUniformLabel": "Use {1} and {2} for job stuff, or {3} to stop working",
|
||||
"NotYourJobLabel": "You already have a different job. Use {1} if you want this one",
|
||||
"JobLabel": "{1} Job",
|
||||
"PaydayBonusSet": "{1} set the payday bonus to ${2}",
|
||||
"AllHousesReloaded": "All houses have been reloaded by an admin",
|
||||
"AllRadioStationsReloaded": "All radio stations have been reloaded by an admin!",
|
||||
"PlayerKicked": "{1} has been kicked from the server",
|
||||
"AllBusinessesReloaded": "All businesses have been reloaded by an admin!",
|
||||
"UnableToDoThat": "You aren't able to do that",
|
||||
"SetVehicleClanConfirmMessage": "Are you sure you want to give this vehicle to your clan?",
|
||||
"SetVehicleClanConfirmTitle": "Warning!",
|
||||
"SetItemPriceBelowOrderPriceMessage": "Are you sure you want to set the item price below it's order price? You will lose ${1} every purchase!",
|
||||
"SetItemPriceBelowOrderPriceTitle": "Warning!",
|
||||
"MustOwnVehicle": "You don't own this vehicle!"
|
||||
}
|
||||
@@ -1,458 +0,0 @@
|
||||
{
|
||||
"TranslationProvidedBy": "Vortrex",
|
||||
"LocaleEnglishName": "English",
|
||||
|
||||
"LocaleNativeName": "English",
|
||||
"LocaleOffer": "This server is available in English. Use {1} to use it.",
|
||||
"LocaleChanged1": "Your language is now set to {1}",
|
||||
"LocaleChanged2": "The server will now display messages in {1}",
|
||||
"LocaleChangedNote": "This does not change messages from other players",
|
||||
"AccentsListHeader": "Accents",
|
||||
"HeaderHelpMainList": "Help Categories",
|
||||
"AccentNotFound": "Accent not found",
|
||||
"AccentSet": "You set your accent to {1}",
|
||||
"InvalidAnimation": "That animation doesn't exist",
|
||||
"AnimationCommandTip": "Use {1} to see a list of valid animations",
|
||||
"InvalidAnimationDistance": "The distance must be between 0 and 3",
|
||||
"AnimationStopCommandTip": "Use {1} to stop your animation",
|
||||
"CantBanClient": "You cannot ban this person",
|
||||
"PlayerAccountBanned": "{1} has been account banned",
|
||||
"ClanNotFound": "Clan not found",
|
||||
"ClanNameTaken": "A clan with that name already exists",
|
||||
"PlayerNotFound": "Player not found",
|
||||
"ClanCantRemoveRanks": "You can't remove clan ranks",
|
||||
"ClanCantAddRanks": "You can't add clan ranks",
|
||||
"ClanRankNotFound": "Clan rank not found",
|
||||
"ClanCantChangeMemberTag": "You can not change clan member's tags",
|
||||
"ClanPlayerNotInSameClan": "That player is not in your clan",
|
||||
"ClanCantChangeRankLevel": "You can not change clan rank's level",
|
||||
"ClanCantChangeRankTag": "You can not change clan rank's tags",
|
||||
"NameNotRegistered": "Your name is not registered! Use {1} to make an account.",
|
||||
"AutomaticLoginIPToggle": "Automatic login by IP is now {1}",
|
||||
"CouldNotRegisterAccount": "There was a problem creating your account. Please contact an admin.",
|
||||
"RandomTipsToggle": "Random tips are now {1}",
|
||||
"ActionTipsToggle": "Action tips are now {1}",
|
||||
"AutoSpawnLastCharToggle": "Automatic spawn as last used character is {1}",
|
||||
"AccountGUISettingToggle": "GUI is now {1}",
|
||||
"On": "On",
|
||||
"Off": "Off",
|
||||
"Yes": "Yes",
|
||||
"No": "No",
|
||||
"True": "True",
|
||||
"False": "False",
|
||||
"Locked": "Locked",
|
||||
"Unlocked": "Unlocked",
|
||||
"PasswordNotGoodEnough": "The new password must meet the requirements!",
|
||||
"PasswordNeedsBase": "Passwords must have at least {1}",
|
||||
"PasswordNeedsCapitals": "{1} capital letters",
|
||||
"PasswordNeedsNumbers": "{1} numbers",
|
||||
"PasswordNeedsSymbols": "{1} symbols",
|
||||
"PasswordsDontMatch": "The new password and confirm new password aren't the same!",
|
||||
"PasswordChanged": "Your password has been changed!",
|
||||
"AutoLoggedInIP": "You have been automatically logged in by IP!",
|
||||
"WelcomeBack": "Welcome back to {1}, {2}! Please {3} to continue.",
|
||||
"WelcomeNewPlayer": "Welcome to {1}, {2}! Please {3} to play.",
|
||||
"InvalidPlayer": "Player not found!",
|
||||
"InvalidBusiness": "Business not found!",
|
||||
"InvalidHouse": "House not found!",
|
||||
"InvalidVehicle": "Vehicle not found!",
|
||||
"InvalidClan": "Clan not found!",
|
||||
"InvalidClanRank": "Clan rank not found!",
|
||||
"InvalidJob": "Job not found!",
|
||||
"InvalidItem": "Item not found!",
|
||||
"InvalidItemType": "Item type not found!",
|
||||
"InvalidRadioStation": "Radio station not found!",
|
||||
"InvalidGate": "Gate not found!",
|
||||
"EntersProperty": "opens the door and enters the {1}",
|
||||
"ExitsProperty": "opens the door and exits the {1}",
|
||||
"EnterExitPropertyDoorLocked": "tries to open the {1} door but fails because it's locked",
|
||||
"PropertyNoInterior": "This {1} does not have an interior, but you can still use commands at the door icon.",
|
||||
"NoBusinessWithItemType": "There is no business with that item available",
|
||||
"HeaderKeyBinds": "Key Binds",
|
||||
"HeaderAccountHelp": "Account Help",
|
||||
"HeaderVehicleHelp": "Vehicle Help",
|
||||
"HeaderVehicleDealershipHelp": "Vehicle Dealership Help",
|
||||
"HeaderJobHelp": "Job Help",
|
||||
"HeaderChatHelp": "Chat Help",
|
||||
"HeaderServerRules": "Server Rules",
|
||||
"HeaderWebsiteInfo": "Website",
|
||||
"HeaderDiscordInfo": "Discord",
|
||||
"HeaderAnimationsList": "Animation List",
|
||||
"HeaderPayAndSprayHelp": "Pay and Spray Help",
|
||||
"HeaderAmmunationHelp": "Ammunation Help",
|
||||
"HeaderVehicleTuneupHelp": "Vehicle Tune Help",
|
||||
"HeaderBindableKeysHelp": "Bindable Keys",
|
||||
"HeaderSkinHelp": "Clothes/Skin Help",
|
||||
"HeaderBusinessHelp": "Business Help",
|
||||
"HeaderClanHelp": "Clan Help",
|
||||
"HeaderPlayerVehiclesList": "Player Vehicles ({1})",
|
||||
"HeaderPlayerBusinessesList": "Player Businesses ({1})",
|
||||
"HeaderClansList": "Clan List",
|
||||
"HeaderAdminsList": "Admin List",
|
||||
"HeaderBadgeInfo": "Badge Information",
|
||||
"HeaderAccentsList": "Accent List",
|
||||
"HeaderPlayerInfo": "Player Information ({1})",
|
||||
"HeaderWealthandTaxHelp": "Wealth and Tax Information",
|
||||
"HeaderCommandInfo": "Command Information ({1})",
|
||||
"HeaderRadioHelp": "Radio Help",
|
||||
"HeaderRadioStationsList": "Radio Stations",
|
||||
"HeaderKeyBindsList": "Key Binds List",
|
||||
"RadioVolumeChanged": "{1} You changed your streaming radio volume to {2}%",
|
||||
"VolumeLevelNotNumber": "The volume level must be a number",
|
||||
"RadioStationLocationInvalid": "You must be in a vehicle, house, or business or have a personal device to change the station!",
|
||||
"ActionBusinessRadioStationChange": "changes the business radio station to {1} ({2})",
|
||||
"ActionHouseRadioStationChange": "changes the house radio station to {1} ({2})",
|
||||
"ActionVehicleRadioStationChange": "changes the vehicle radio station to {1} ({2})",
|
||||
"ActionItemRadioStationChange": "changes the {1}'s station to {2} ({3})",
|
||||
"RandomVehicleCommandsDisabled": "This is a random traffic vehicle and commands can't be used for it.",
|
||||
"HouseDoorLock": "House {1} {2}!",
|
||||
"BusinessDoorLock": "Business {1} {2}!",
|
||||
"ServerGameModeRestarting": "The server game mode is restarting!",
|
||||
"HeaderSelfItemList": "Your Inventory",
|
||||
"HeaderPlayerItemList": "Player Inventory ({1})",
|
||||
"HeaderHouseItemList": "House Inventory",
|
||||
"HeaderBusinessFloorItemList": "Business Inventory (For Sale)",
|
||||
"HeaderBusinessStorageItemList": "Business Inventory (Storage)",
|
||||
"HeaderItemItemList": "{1}'s Inventory",
|
||||
"ItemSlotNotNumber": "The item slot must be a number",
|
||||
"ItemSlotMustBeBetween": "The item slot must be between {1} and {2}!",
|
||||
"UseItemBugged": "The item you're trying to use is bugged. A bug report has been sent to the server developers.",
|
||||
"PickupItemBugged": "The item you're trying to pickup is bugged. A bug report has been sent to the server developers.",
|
||||
"DropItemBugged": "The item you're trying to drop is bugged. A bug report has been sent to the server developers.",
|
||||
"HandsBusy": "Your hands are busy",
|
||||
"CantUseItemInSkinChange": "You can't use an item while customizing your appearance",
|
||||
"CantDropItemInSkinChange": "You can't drop an item while customizing your appearance",
|
||||
"CantPickupItemInSkinChange": "You can't pickup an item while customizing your appearance",
|
||||
"CantSwitchItemInSkinChange": "You can't switch an item while customizing your appearance",
|
||||
"CantGiveItemInSkinChange": "You can't give an item while customizing your appearance",
|
||||
"CantTakeItemInSkinChange": "You can't take an item while customizing your appearance",
|
||||
"ItemUnequippableNoAmmo": "The {1} in slot {2} has no ammo, and can't be equipped!",
|
||||
"NoSpaceSelfInventory": "You don't have any more space in your inventory",
|
||||
"Business": "business",
|
||||
"House": "house",
|
||||
"Clan": "clan",
|
||||
"Vehicle": "vehicle",
|
||||
"Item": "item",
|
||||
"ItemType": "item type",
|
||||
"Gate": "gate",
|
||||
"Door": "door",
|
||||
"ClanRank": "clan rank",
|
||||
"JobRank": "job rank",
|
||||
"RadioStation": "radio station",
|
||||
"Months": [
|
||||
"January",
|
||||
"February",
|
||||
"March",
|
||||
"April",
|
||||
"May",
|
||||
"June",
|
||||
"July",
|
||||
"August",
|
||||
"September",
|
||||
"October",
|
||||
"November",
|
||||
"December"
|
||||
],
|
||||
"WeekDays": [
|
||||
"Sunday",
|
||||
"Monday",
|
||||
"Tuesday",
|
||||
"Wednesday",
|
||||
"Thursday",
|
||||
"Friday",
|
||||
"Saturday"
|
||||
],
|
||||
"CardinalDirections": [
|
||||
"North",
|
||||
"Northeast",
|
||||
"East",
|
||||
"Southeast",
|
||||
"South",
|
||||
"Southwest",
|
||||
"West",
|
||||
"Northwest"
|
||||
],
|
||||
"NewPlayerReadyToPlay": [
|
||||
"You have been given some cash. Use {1} to find places to buy items.",
|
||||
"If you need money, jobs are the yellow dots on the radar.",
|
||||
"For a car, visit the car dealership. You can also use a rental vehicle near spawn or take the train",
|
||||
"Be sure to read the {1} and use {2} for info."
|
||||
],
|
||||
"YourCurrentVehicleDeleted": "The vehicle you were in was deleted.",
|
||||
"Distance": "Distance",
|
||||
"Meters": "Meters",
|
||||
"Feet": "Feet",
|
||||
"Kilometers": "Kilometers",
|
||||
"Miles": "Miles",
|
||||
"MustBeVehicleDriver": "You must be the driver of the vehicle!",
|
||||
"PlayerJoinedServer": "{1} has joined the game from {1}!",
|
||||
"PlayerLeftServer": "{1} has left the game! ({1})",
|
||||
"DisconnectReasons": [
|
||||
"Lost Connection",
|
||||
"Disconnected",
|
||||
"Unsupported Client",
|
||||
"Wrong Game",
|
||||
"Incorrect Password",
|
||||
"Unsupported Executable",
|
||||
"Disconnected",
|
||||
"Banned",
|
||||
"Failed",
|
||||
"Invalid Name",
|
||||
"Crashed"
|
||||
],
|
||||
"TakeItemFromHouse": "takes a {1} from the house",
|
||||
"TakeItemFromBusinessStorage": "takes a {1} from the business storage",
|
||||
"TakeItemFromBusiness": "takes a {1} from the business",
|
||||
"TakeItemFromItem": "takes a {1} from the {2}",
|
||||
"TakeItemFromVehicleTrunk": "takes a {1} from the trunk",
|
||||
"TakeItemFromVehicleDash": "takes a {1} from the glove compartment",
|
||||
"JobEquipmentInventoryKeyBindTip": "The job equipment is in your inventory. Press {1} to see them.",
|
||||
"JobEquipmentInventoryCommandTip": "The job equipment is in your inventory. Use {1} to see them.",
|
||||
"AccountHelp": [
|
||||
"Do NOT share your password with anybody else. {1} staff will never ask you for your password",
|
||||
"Use {1} to change your password, and {2} if you forgot it",
|
||||
"Some settings you can use: {1}"
|
||||
],
|
||||
"VehicleHelp": [
|
||||
"Your personal vehicles will save wherever you or somebody else leaves them!",
|
||||
"Visit dealerships to buy new vehicles (Use {1} for more information)",
|
||||
"Some commands: {1}",
|
||||
"Visit a mechanic garage to repair, colour, and tune up your car! {1} for info"
|
||||
],
|
||||
"VehicleDealershipHelp": [
|
||||
"Visit a vehicle dealer to buy new vehicles. Use {1} to find one.",
|
||||
"At the dealer, enter a car you want to buy, and the price will be shown to you",
|
||||
"If you want to buy the vehicle, use {1} and you will be given keys to test drive it around the parking lot.",
|
||||
"Drive away from the dealership with the new vehicle to confirm the purchase."
|
||||
],
|
||||
"JobHelp": [
|
||||
"Visit job locations to get a job and earn money. Look for yellow spots on the map",
|
||||
"At a job location, use {1} to get the job. Use {2} to quit your job",
|
||||
"Use {1} to begin working. You can also get a job {2} and {3}",
|
||||
"Most job vehicles are locked. Use {1} near one to enter it.",
|
||||
"When entering a job vehicle, information on how to do the job will be shown to you."
|
||||
],
|
||||
"ChatHelp": [
|
||||
"There are two main types of chat: out-of-character (OOC) and in-character (IC)",
|
||||
"Mixing these two types is not proper roleplay. See {1} for info.",
|
||||
"Some chat commands: {1}",
|
||||
"Some have shorter names available ({1} to talk, {2} to shout, etc)"
|
||||
],
|
||||
"ServerRulesHelp": [
|
||||
"Unrealistic actions (powergaming) are not allowed. You aren't superman.",
|
||||
"No terrorist or terrorism roleplay is allowed.",
|
||||
"Always follow instructions given by moderators and admins.",
|
||||
"Do not mix the chats (metagaming). You can't use info in IC that was received OOC",
|
||||
"Keep English in main chats. If you aren't good at English, use {1}"
|
||||
],
|
||||
"AnimationHelp": [
|
||||
"Animations allow you to enhance roleplay with visual actions",
|
||||
"Use {1} or {2} with a name to use an animation.",
|
||||
"To see a list of animations, use {1}"
|
||||
],
|
||||
"WeaponHelp": [
|
||||
"Visit an gun store to buy weapons. Use {1} to find one.",
|
||||
"Buying a weapon requires a weapon license.",
|
||||
"Weapon licenses are managed by the police department. Apply there to get one.",
|
||||
"Weapons can also be purchased illegally from some businesses, weapon dealers, and clans."
|
||||
],
|
||||
"SkinHelp": [
|
||||
"At a clothing store, use {1} to purchase clothes",
|
||||
"When you have a clothing item, equip and use it like any other item to show the skin selection (check {1} to learn how to use items)",
|
||||
"Some skins are restricted to jobs, clans, or for other reasons."
|
||||
],
|
||||
"KeyBindHelp": [
|
||||
"You can set your own key binds. Use {1} to see your binded keys.",
|
||||
"Use {1} to add a new keybind and {2} to remove one.",
|
||||
"Default keys are: {1} for vehicle engine, {2} for lights, and {3} for lock/unlock",
|
||||
"Press {1} to see your items and {2} to equip an item or {3} to unequip all.",
|
||||
"Press {1} to use the item you're holding, press {2} to drop it, or press {3} to pickup an item from the ground."
|
||||
],
|
||||
"BusinessHelp": [
|
||||
"Use {1} to purchase items or {2} to see a list of what's for sale at any business",
|
||||
"Businesses are shown with blue names above the icon at their entrance.",
|
||||
"Business owner commands: {1}",
|
||||
"A new car for sale will appear when you drive away from the dealer."
|
||||
],
|
||||
"ClanHelp": [
|
||||
"Ask an administrator to create a clan (Similar to factions/groups/families)",
|
||||
"Clan owners have full control over their clan once it's created",
|
||||
"Clan commands: {1}",
|
||||
"More clan commands: {1}"
|
||||
],
|
||||
"RadioStationHelp": [
|
||||
"Use {1} to set the station for your vehicle, house, or business",
|
||||
"Use {2} to see a list of stations",
|
||||
"You can change your radio streaming volume using {1} with 0-100 as the percent"
|
||||
],
|
||||
"WealthAndTaxHelp": [
|
||||
"Your taxes on payday are {1} percent of your calculated wealth.",
|
||||
"Your calculated wealth is a total sum based on how many vehicles, houses, and businesses you have.",
|
||||
"Each vehicle is {1}, each house is {2}, and each business is {3}",
|
||||
"Use {1} to see your current wealth, and {2} to see how much you'll pay in tax each payday"
|
||||
],
|
||||
"MustBeInAVehicle": "You need to be in a vehicle!",
|
||||
"MustBeInOrNearVehicle": "You need to be in or near a vehicle!",
|
||||
"MustBeInVehicleFrontSeat": "You need to be in the vehicle front seats!",
|
||||
"MustBeInVehicleDriverSeat": "You need to be the driver!",
|
||||
"DontHaveVehicleKey": "You don't have a key for this vehicle!",
|
||||
"NoGateAccess": "You don't have access to this gate!",
|
||||
"GateBroken": "This gate is broken!",
|
||||
"GateHacked": "The gate does not respond!",
|
||||
"RadioJammed": "You hear only static from the radio.",
|
||||
"VehicleNotForSale": "This vehicle is not for sale!",
|
||||
"VehicleNotForRent": "This vehicle is not for rent!",
|
||||
"BusinessNotForSale": "This business is not for sale!",
|
||||
"BusinessNotForRent": "This business is not for rent!",
|
||||
"HouseNotForSale": "This house is not for sale!",
|
||||
"HouseNotForRent": "This house is not for rent!",
|
||||
"DealershipPurchaseTestDrive": "Drive the vehicle away from the dealership to buy it, or get out to cancel.",
|
||||
"DealershipPurchaseExitedVehicle": "You canceled the vehicle purchase by exiting the vehicle!",
|
||||
"VehiclePurchaseComplete": "This vehicle is now yours! It will save wherever you leave it.",
|
||||
"VehiclePurchaseNotEnoughMoney": "You don't have enough money to buy this vehicle!",
|
||||
"HousePurchaseNotEnoughMoney": "You don't have enough money to buy this house!",
|
||||
"BusinessPurchaseNotEnoughMoney": "You don't have enough money to buy this business!",
|
||||
"Locales": {
|
||||
"English": "English",
|
||||
"Russian": "Russian",
|
||||
"Spanish": "Spanish",
|
||||
"German": "German",
|
||||
"Dutch": "Dutch",
|
||||
"Polish": "Polish"
|
||||
},
|
||||
|
||||
"ADDED-21JAN2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
|
||||
"HeaderPlayerHousesList": "Player Houses ({1})",
|
||||
"HeaderPlayerStaffFlagsList": "Player Staff Flags ({1})",
|
||||
"HeaderStaffFlagsList": "Staff Flags",
|
||||
"NonRPName": "Non-RP name! Choose a new one:",
|
||||
"InvalidStaffFlag": "Staff flag not found!",
|
||||
"InvalidClanFlag": "Clan flag not found!",
|
||||
"InvalidLocale": "Language not found!",
|
||||
"HeaderJobUniformList": "Job Uniforms ({1})",
|
||||
"HeaderJobEquipmentList": "Job Equipment ({1})",
|
||||
"InvalidJobUniform": "Job uniform not found!",
|
||||
"InvalidJobEquipment": "Job equipment not found!",
|
||||
"HeaderVehiclesInRangeList": "Vehicles within {1}",
|
||||
"NoVehiclesWithInRange": "There are no vehicles within {1}",
|
||||
"AmountNotNumber": "The amount must be a number!",
|
||||
"NeedToBeWorking": "You need to be working! Use {1} at a job location or near a job vehicle.",
|
||||
"NeedToBeOnJobRoute": "You need to be doing a job route! Use {1} in a job vehicle",
|
||||
"CurrentJobRouteDeleted": "The job route you were on has been deleted by an admin",
|
||||
"CurrentJobRouteVehicleColoursChanged": "Your job route's vehicle colours were changed by an admin",
|
||||
"NotYourJob": "This is not your job!",
|
||||
"JobPoints": "You can get a job by going the yellow points on the map.",
|
||||
"QuitJobToTakeAnother": "If you want this job, use {1} to quit your current job.",
|
||||
"NotAJobVehicle": "This is not a job vehicle!",
|
||||
"NotYourJobVehicle": "This is not your job's vehicle!",
|
||||
"JobRouteDisabled": "The job route you were on has been disabled by an admin",
|
||||
"HeaderPickupTypes": "Pickup Types",
|
||||
"HeaderBlipTypes": "Map Icon Types",
|
||||
"InvalidGPSLocation": "There are no locations with that name or type",
|
||||
"HeaderBusinessList": "Businesses",
|
||||
"VehicleForSale": "This {1} is buyable for {2}! Use {3} if you want to buy it",
|
||||
"VehicleForRent": "This {1} is rentable for {2}! Use {3} if you want to rent it",
|
||||
|
||||
"ADDED-31JAN2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
|
||||
"LoginFailedInvalidPassword": "Invalid password! {1} attempts remaining",
|
||||
"LoginFailedNoPassword": "You must enter a password! ! {1} attempts remaining",
|
||||
"RegistrationFailedNoPassword": "You must enter a password!",
|
||||
"RegistrationFailedNoPasswordConfirm": "You must confirm the password!",
|
||||
"RegistrationFailedNoEmail": "You must enter an email!",
|
||||
"AccountNameAlreadyRegistered": "Your name is already registered!",
|
||||
"AlreadyLoggedIn": "You are already logged in!",
|
||||
"RegistrationFailedInvalidEmail": "That email is invalid!",
|
||||
"RegistrationFailedPasswordMismatch": "The passwords don't match!",
|
||||
"RegistrationFailedCreateError": "Your account couldn't be created!",
|
||||
"RegistrationSuccess": "Your account has been created!",
|
||||
"RegistrationEmailVerifyReminder": "Don't forget to verify your email! A verification code has been sent to you.",
|
||||
"RegistrationCreateCharReminder": "To play on the server, you will need to make a character.",
|
||||
"NoCharactersGUIMessage": "You have no characters. Would you like to make one?",
|
||||
"NoCharactersGUIWindowTitle": "No characters",
|
||||
"NoCharactersChatMessage": "You have no characters. Use {1} to make one.",
|
||||
"NeedEmailFor2FA": "You need to add your email to your account to use two-factor authentication.",
|
||||
"NeedEmailVerifiedFor2FA": "You need to verify your email to use two-factor authentication.",
|
||||
"SetEmailHelpTip": "Use {1} to set your email.",
|
||||
"VerifyEmailHelpTip": "Use {1} to verify your email.",
|
||||
|
||||
"ADDED-13FEB2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
|
||||
"NearbyRadio": "Nearby radio",
|
||||
"FromRadio": "From radio",
|
||||
"ToRadio": "To radio",
|
||||
"NeedToEnterPropertyCommand": "You need to enter the {1} first! Use {2} to enter and exit",
|
||||
"NeedToEnterPropertyKeyPress": "You need to enter the {1} first! Press {2} to enter and exit",
|
||||
"InventoryFullCantCarry": "You don't have any space to carry this (full inventory)!",
|
||||
"NotEnoughCashNeedAmountMore": "You don't have enough money! You need {1} more!",
|
||||
"AmountMustBeMoreThan": "The amount must be more than {1}!",
|
||||
"WeaponBanned": "You are not allowed to buy or use weapons!",
|
||||
"TimeNotNumber": "The time must be a number",
|
||||
"HeaderDefaultBusinessItemTypes": "Business Item Templates",
|
||||
"FixingStuck": "Fixing your position and virtual world ...",
|
||||
"CantUseCommandYet": "You must wait before you can use this command again!",
|
||||
"NotATester": "You are not a tester!",
|
||||
"AccessDenied": "AccessDenied",
|
||||
"InvalidSkin": "That skin is invalid!",
|
||||
"HeaderInteriorTypes": "Interiors List",
|
||||
"ViewInventoryKeyPressTip": "Press {1} to see your items",
|
||||
"ViewInventoryCommandTip": "Use {1} to see your items",
|
||||
"GUIAccountSettingToggle": "You have turned {1} GUI",
|
||||
|
||||
"ADDED-23MAR2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations",
|
||||
"CarCommandHelp": "You can buy a car by visiting a vehicle dealership. Use {1} for more information.",
|
||||
"SkinCommandHelp": "You can change your skin by visiting a clothes store. Use {1} for more info.",
|
||||
"BusinessVehiclesRespawned": "🚗 All business vehicles have been respawned by an admin!",
|
||||
"JobVehiclesRespawned": "🚗 All job vehicles have been respawned by an admin!",
|
||||
"PlayerVehiclesRespawned": "🚗 All player vehicles have been respawned by an admin!",
|
||||
"ClanVehiclesRespawned": "🚗 All clan vehicles have been respawned by an admin!",
|
||||
"PublicVehiclesRespawned": "🚗 All public have been respawned by an admin!",
|
||||
"EmptyVehiclesRespawned": "🚗 All empty vehicles have been respawned by an admin!",
|
||||
"AllVehiclesRespawned": "🚗 All vehicles have been respawned by an admin!",
|
||||
"AllVehiclesReloaded": "🚗 All vehicles have been reloaded by an admin!",
|
||||
"YourVehicleRespawned": "🚗 Your vehicle has been respawned!",
|
||||
"PlayerIPBanned": "💀 {1} has been IP banned!",
|
||||
"PlayerCharacterBanned": "💀 {1} has been character banned!",
|
||||
"PlayerSubNetBanned": "💀 {1} has been subnet banned!",
|
||||
"CantModifyBusiness": "You can't manage or modify this business!",
|
||||
"CantModifyHouse": "You can't manage or modify this house!",
|
||||
"ServerTimeSet": "⏰ {1} set the time to {2}",
|
||||
"ServerWeatherSet": "☁️ {1} set the weather to {2}",
|
||||
"ServerSnowSet": "❄️ {1} turned falling snow {2} and ground snow {3}",
|
||||
"AllJobsReloaded": "💼 All server jobs have been reloaded by an admin",
|
||||
"ServerLogoSet": "{1} turned the server logo image {2}",
|
||||
"ServerGUISet": "🗔 {1} turned GUI for this server {2}",
|
||||
"ServerBusinessBlipsSet": "🏢 {1} turned all business blips {2}",
|
||||
"ServerHouseBlipsSet": "🏘️ {1} turned all house blips {2}",
|
||||
"ServerJobBlipsSet": "💼 {1} turned all job blips {2}",
|
||||
"ServerBusinessPickupsSet": "🏢 {1} turned all business pickups {2}",
|
||||
"ServerHousePickupsSet": "🏘️ {1} turned all house pickups {2}",
|
||||
"ServerJobPickupsSet": "💼 {1} turned on all job pickups {2}",
|
||||
"BusinessBuyItemsLabel": "Use {1} to purchase items",
|
||||
"PropertyEnterCommandLabel": "Use {1} to enter",
|
||||
"PropertyEnterKeyPressLabel": "Press {1} to enter",
|
||||
"PropertyForSaleLabel": "For sale: ${1}",
|
||||
"PropertyForRentLabel": "For rent: ${1} every payday",
|
||||
"RemainingTaxPaidInMoney": "You covered the remaining taxes with ${1} in cash.",
|
||||
"LostMoneyFromTaxes": "You lost money since your taxes are more than your paycheck!",
|
||||
"NextPaycheckRepossessionWarning": "If you don't have enough cash to cover taxes on next paycheck, you will lose stuff!",
|
||||
"NotEnoughMoneyForTax": "You don't have enough money to cover your taxes!",
|
||||
"AssetsRepossessedForTax": "You lost {1} vehicles, {2} houses, and {3} businesses because you couldn't pay taxes!",
|
||||
"Closed": "Closed",
|
||||
"Open": "Open",
|
||||
"VehicleDealershipLabel": "Enter a vehicle as driver to buy it",
|
||||
"TakeJobLabel": "Use {1} to work here",
|
||||
"StartWorkLabel": "Use {1} to start working",
|
||||
"JobEquipAndUniformLabel": "Use {1} and {2} for job stuff, or {3} to stop working",
|
||||
"NotYourJobLabel": "You already have a different job. Use {1} if you want this one",
|
||||
"JobLabel": "{1} Job",
|
||||
"PaydayBonusSet": "🤑 {1} set the payday bonus to ${2}",
|
||||
"AllHousesReloaded": "🏘️ All houses have been reloaded by an admin",
|
||||
"AllRadioStationsReloaded": "📻 All radio stations have been reloaded by an admin!",
|
||||
"PlayerKicked": "🦶 {1} has been kicked from the server",
|
||||
"AllBusinessesReloaded": "🏢 All businesses have been reloaded by an admin!",
|
||||
"UnableToDoThat": "You aren't able to do that",
|
||||
"SetVehicleClanConfirmMessage": "Are you sure you want to give this vehicle to your clan?",
|
||||
"SetVehicleClanConfirmTitle": "Warning!",
|
||||
"SetItemPriceBelowOrderPriceMessage": "Are you sure you want to set the item price below it's order price? You will lose ${1} every purchase!",
|
||||
"SetItemPriceBelowOrderPriceTitle": "Warning!",
|
||||
"MustOwnVehicle": "You don't own this vehicle!"
|
||||
}
|
||||
@@ -1,458 +0,0 @@
|
||||
{
|
||||
"TranslationProvidedBy": "Suprise444",
|
||||
"LocaleEnglishName": "Polish",
|
||||
|
||||
"LocaleNativeName": "Polski",
|
||||
"LocaleOffer": "Ten serwer jest dostępny w języku Polskim. Użyj {1} aby go użyć.",
|
||||
"LocaleChanged1": "Twój język jest ustawiony na {1}",
|
||||
"LocaleChanged2": "Serwer będzie teraz pokazywał wiadomości w języku {1}",
|
||||
"LocaleChangedNote": "To nie zmienia wiadomości od innych graczy",
|
||||
"AccentsListHeader": "Akcenty",
|
||||
"HeaderHelpMainList": "Pomoc - Kategorie",
|
||||
"AccentNotFound": "Akcent nie znaleziony",
|
||||
"AccentSet": "Ustawiłeś swój akcent na {1}",
|
||||
"InvalidAnimation": "Ta animcja nie istnieje",
|
||||
"AnimationCommandTip": "Użyj {1} aby zobaczyć listę działających animacji",
|
||||
"InvalidAnimationDistance": "Dystans musi być między 0 i 3",
|
||||
"AnimationStopCommandTip": "Użyj {1} aby zatrzymać swoją animacje",
|
||||
"CantBanClient": "Nie możesz zbanować tej osoby",
|
||||
"PlayerAccountBanned": "{1} został zbanowany",
|
||||
"ClanNotFound": "Nie znaleziono klanu",
|
||||
"ClanNameTaken": "Klan z taką nazwą już istnieje",
|
||||
"PlayerNotFound": "Nie znaleziono gracza",
|
||||
"ClanCantRemoveRanks": "Nie możesz usuwać rang klanu",
|
||||
"ClanCantAddRanks": "Nie możesz dodawać rang klanu",
|
||||
"ClanRankNotFound": "Nie znaleziono rangi klanu",
|
||||
"ClanCantChangeMemberTag": "Nie możesz zmienić tagu członka klanu",
|
||||
"ClanPlayerNotInSameClan": "Ten gracz nie jest w twoim klanie",
|
||||
"ClanCantChangeRankLevel": "Nie możesz zmienić poziomu rangi klanu",
|
||||
"ClanCantChangeRankTag": "Nie możesz zmienić tagu rangi klanu",
|
||||
"NameNotRegistered": "Twoja nazwa nie jest zarejestrowana! Użyj {1} aby stworzyć konto.",
|
||||
"AutomaticLoginIPToggle": "Automatyczny login przez IP jest teraz {1}",
|
||||
"CouldNotRegisterAccount": "Napotkano problem podczas tworzenia twojego konta. Proszę skontaktuj się z administratorem.",
|
||||
"RandomTipsToggle": "Losowe wskazówki są teraz {1}",
|
||||
"ActionTipsToggle": "Wskazówki akcji są teraz {1}",
|
||||
"AutoSpawnLastCharToggle": "Automatyczny spawn jako ostatnia postać jest teraz {1}",
|
||||
"AccountGUISettingToggle": "GUI jest teraz {1}",
|
||||
"On": "Włączony",
|
||||
"Off": "Wyłączony",
|
||||
"Yes": "Tak",
|
||||
"No": "Nie",
|
||||
"True": "Prawda",
|
||||
"False": "Fałsz",
|
||||
"Locked": "Zamknięty",
|
||||
"Unlocked": "Otwarty",
|
||||
"PasswordNotGoodEnough": "Nowe hasło musi spełniać wymagania!",
|
||||
"PasswordNeedsBase": "Hasło musi mieć przynajmniej {1}",
|
||||
"PasswordNeedsCapitals": "{1} dużych liter",
|
||||
"PasswordNeedsNumbers": "{1} numerów",
|
||||
"PasswordNeedsSymbols": "{1} symboli",
|
||||
"PasswordsDontMatch": "Hasła nie są takie same!",
|
||||
"PasswordChanged": "Twoje hasło zostało zmienione!",
|
||||
"AutoLoggedInIP": "Zostałeś automatycznie zalogowany przez IP!",
|
||||
"WelcomeBack": "Witaj ponownie w {1}, {2}! Użyj {3} aby kontynuować.",
|
||||
"WelcomeNewPlayer": "Witaj w {1}, {2}! Użyj {3} aby zagrać.",
|
||||
"InvalidPlayer": "Praca nie znaleziona!",
|
||||
"InvalidBusiness": "Biznes nie znaleziony!",
|
||||
"InvalidHouse": "Mieszkanie nie znalezione!",
|
||||
"InvalidVehicle": "Pojazd nie znaleziony!",
|
||||
"InvalidClan": "Klan nie znaleziony!",
|
||||
"InvalidClanRank": "Ranga klanu nie znaleziona!",
|
||||
"InvalidJob": "Gracz nie znaleziony!",
|
||||
"InvalidItem": "Przedmiot nie znaleziony!",
|
||||
"InvalidItemType": "Rodzaj przedmiot nie znaleziony!",
|
||||
"InvalidRadioStation": "Stacja radiowa nie znaleziona!",
|
||||
"InvalidGate": "Brama nie znaleziona!",
|
||||
"EntersProperty": "otwiera drzwi i wchodzi do {1}",
|
||||
"ExitsProperty": "otwiera drzwi i wychodzi z {1}",
|
||||
"EnterExitPropertyDoorLocked": "próbuje otworzyć {1} drzwi, ale nie udaje się, ponieważ są zamknięte",
|
||||
"PropertyNoInterior": "Ten {1} nie ma wnętrza, ale dalej możesz używaj komend przy ikonie drzwi.",
|
||||
"NoBusinessWithItemType": "Nie ma biznesu, który posiada ten przedmiot",
|
||||
"HeaderKeyBinds": "Przypisania klawiszy",
|
||||
"HeaderAccountHelp": "Pomoc - Konto",
|
||||
"HeaderVehicleHelp": "Pomoc - Pojazd",
|
||||
"HeaderVehicleDealershipHelp": "Pomoc - Dealer Samochodów",
|
||||
"HeaderJobHelp": "Pomoc - Praca",
|
||||
"HeaderChatHelp": "Pomoc - Czat",
|
||||
"HeaderServerRules": "Zasady serwera",
|
||||
"HeaderWebsiteInfo": "Strona",
|
||||
"HeaderDiscordInfo": "Discord",
|
||||
"HeaderAnimationsList": "Lista Animacji",
|
||||
"HeaderPayAndSprayHelp": "Pomoc - Pay and Spray",
|
||||
"HeaderAmmunationHelp": "Pomoc - Ammunation",
|
||||
"HeaderVehicleTuneupHelp": "Pomoc - Ulepszanie Aut",
|
||||
"HeaderBindableKeysHelp": "Przypisywalne klawisze",
|
||||
"HeaderSkinHelp": "Pomoc - Ubrania/Skóra",
|
||||
"HeaderBusinessHelp": "Pomoc - Biznes",
|
||||
"HeaderClanHelp": "Pomoc - Klan",
|
||||
"HeaderPlayerVehiclesList": "Pojazdy Gracza ({1})",
|
||||
"HeaderPlayerBusinessesList": "Biznesy Gracza ({1})",
|
||||
"HeaderClansList": "Lista Klanów",
|
||||
"HeaderAdminsList": "Lista Administracji",
|
||||
"HeaderBadgeInfo": "Informacje o Odznace",
|
||||
"HeaderAccentsList": "Lista Akcentów",
|
||||
"HeaderPlayerInfo": "Informacje o Graczu ({1})",
|
||||
"HeaderWealthandTaxHelp": "Informacje o Bogactwach i Podatkach",
|
||||
"HeaderCommandInfo": "Informacje o Komendzie ({1})",
|
||||
"HeaderRadioHelp": "Pomoc - Radio",
|
||||
"HeaderRadioStationsList": "Stacje Radiowe",
|
||||
"HeaderKeyBindsList": "Lista przypisań klawiszy",
|
||||
"RadioVolumeChanged": "{1} Zmieniłeś głośność swojego radia na {2}%",
|
||||
"VolumeLevelNotNumber": "Poziom głośności musi być liczbą",
|
||||
"RadioStationLocationInvalid": "Musisz być w aucie, domu, biznesie lub mieć osobite urządzenie by zmienić stacje radiową!",
|
||||
"ActionBusinessRadioStationChange": "zmienia biznesową stacje radiową na {1} ({2})",
|
||||
"ActionHouseRadioStationChange": "zmienia domową stacje radiową na {1} ({2})",
|
||||
"ActionVehicleRadioStationChange": "zmienia samochodową stacje radiową na {1} ({2})",
|
||||
"ActionItemRadioStationChange": "zmienia stacje {1} na {2} ({3})",
|
||||
"RandomVehicleCommandsDisabled": "To losowy pojazd uliczny i komendy nie mogą być na nim użyte.",
|
||||
"HouseDoorLock": "Mieszkanie {1} {2}!",
|
||||
"BusinessDoorLock": "Biznes {1} {2}!",
|
||||
"ServerGameModeRestarting": "Tryb gry serwera się restartuje!",
|
||||
"HeaderSelfItemList": "Twój ekwipunek",
|
||||
"HeaderPlayerItemList": "Ekwipunek gracza ({1})",
|
||||
"HeaderHouseItemList": "Ekwipunek mieszkania",
|
||||
"HeaderBusinessFloorItemList": "Ekwipunek Bizneus (Na sprzedaż)",
|
||||
"HeaderBusinessStorageItemList": "Ekwipunek Bizenus (Magazyn)",
|
||||
"HeaderItemItemList": "Ekwipunek {1}",
|
||||
"ItemSlotNotNumber": "Slot przedmiotu musi być liczbą",
|
||||
"ItemSlotMustBeBetween": "Slot itemu musi być liczbą między {1} i {2}!",
|
||||
"UseItemBugged": "Przedmiot, który próbujesz użyć jest popsuty. Zgłoszenie zostało wysłane do deweloperów serwera.",
|
||||
"PickupItemBugged": "Przedmiot, który próbujesz podnieść jest popsuty. Zgłoszenie zostało wysłane do deweloperów serwera.",
|
||||
"DropItemBugged": "Przedmiot, który próbujesz upuścić jest popsuty. Zgłoszenie zostało wysłane do deweloperów serwera.",
|
||||
"HandsBusy": "Twoje ręce są zajęte",
|
||||
"CantUseItemInSkinChange": "Nie możesz użyć przedmiotu podczas zmieniania swojego wizerunku",
|
||||
"CantDropItemInSkinChange": "Nie możesz upuścić przedmiotu podczas zmieniania swojego wizerunku",
|
||||
"CantPickupItemInSkinChange": "Nie możesz podnieść przedmiotu podczas zmieniania swojego wizerunku",
|
||||
"CantSwitchItemInSkinChange": "Nie możesz zmienić przedmiotu podczas zmieniania swojego wizerunku",
|
||||
"CantGiveItemInSkinChange": "Nie możesz dać przedmiotu podczas zmieniania swojego wizerunku",
|
||||
"CantTakeItemInSkinChange": "Nie możesz wziąć przedmiotu podczas zmieniania swojego wizerunku",
|
||||
"ItemUnequippableNoAmmo": "{1} w slocie {2} nie ma amunicji i nie może zostać użyty!",
|
||||
"NoSpaceSelfInventory": "Nie masz już miesca w ekwipunku",
|
||||
"Business": "biznes",
|
||||
"House": "mieszkanie",
|
||||
"Clan": "klan",
|
||||
"Vehicle": "pojazd",
|
||||
"Item": "przedmiot",
|
||||
"ItemType": "rodzaj przedmiotu",
|
||||
"Gate": "brama",
|
||||
"Door": "drzwi",
|
||||
"ClanRank": "ranga klanu",
|
||||
"JobRank": "praca rangi",
|
||||
"RadioStation": "stacja radiowa",
|
||||
"Months": [
|
||||
"Styczeń",
|
||||
"Luty",
|
||||
"Marzec",
|
||||
"Kwiecień",
|
||||
"Maj",
|
||||
"Czerwiec",
|
||||
"Lipiec",
|
||||
"Sierpień",
|
||||
"Wrzesień",
|
||||
"Październik",
|
||||
"Listopad",
|
||||
"Grudzień"
|
||||
],
|
||||
"WeekDays": [
|
||||
"Niedziela",
|
||||
"Poniedziałek",
|
||||
"Wtorek",
|
||||
"Środa",
|
||||
"Czwartek",
|
||||
"Piątek",
|
||||
"Sobota"
|
||||
],
|
||||
"CardinalDirections": [
|
||||
"Północ",
|
||||
"Północny wschód",
|
||||
"Wschód",
|
||||
"Południowy zachód",
|
||||
"Południe",
|
||||
"Południowy wschód",
|
||||
"Zachód",
|
||||
"Północny zachód"
|
||||
],
|
||||
"NewPlayerReadyToPlay": [
|
||||
"Dostałeś trochę pieniędzy. Użyj {1} aby znaleść miejsca do kupowania przedmiotów.",
|
||||
"Jeżeli potrzebujesz pieniędzy, żółte kropki na mapie to miejsca pracy.",
|
||||
"Aby zdobyć auto musisz odwiedzić dealera samochodów. Możesz też wypożyczyć samochód przy spawnie lub użyć pociągu",
|
||||
"Pamiętaj aby przeczytać {1} i użyć {2} aby zdobyć więcej informacji."
|
||||
],
|
||||
"YourCurrentVehicleDeleted": "Samochód w którym przebywałeś został usunięty.",
|
||||
"Distance": "Odległość",
|
||||
"Meters": "Metry",
|
||||
"Feet": "Stopy",
|
||||
"Kilometers": "Kilometry",
|
||||
"Miles": "Mile",
|
||||
"MustBeVehicleDriver": "Musisz być kierowcą tego pojazdu!",
|
||||
"PlayerJoinedServer": "{1} dołączył do gry z {1}!",
|
||||
"PlayerLeftServer": "{1} wyszedł z gry! ({1})",
|
||||
"DisconnectReasons": [
|
||||
"Utracenie Połączenia",
|
||||
"Odłączenie",
|
||||
"Niewspierana Wersja",
|
||||
"Nieprawidłowa Gra",
|
||||
"Błędne Hasło",
|
||||
"Niewspierany Plik Wykonalny",
|
||||
"Odłączenie",
|
||||
"Zbanowany",
|
||||
"Nie udane",
|
||||
"Nieprawidłowa Nazwa",
|
||||
"Crashed"
|
||||
],
|
||||
"TakeItemFromHouse": "bierze {1} z mieszkania",
|
||||
"TakeItemFromBusinessStorage": "bierze {1} z magazynu biznesu",
|
||||
"TakeItemFromBusiness": "bierze {1} z biznesu",
|
||||
"TakeItemFromItem": "bierze {1} z {2}",
|
||||
"TakeItemFromVehicleTrunk": "bierze {1} z bagażnika",
|
||||
"TakeItemFromVehicleDash": "bierze {1} ze schowka",
|
||||
"JobEquipmentInventoryKeyBindTip": "Wyposażenie służbowe jest w twoim ekwipunku. Naciśnij {1} aby je zobaczyć.",
|
||||
"JobEquipmentInventoryCommandTip": "Wyposażenie służbowe jest w twoim ekwipunku. Użyj {1} aby je zobaczyć.",
|
||||
"AccountHelp": [
|
||||
"NIE PODAWAJ nikomu swojego hasła. {1} nigdy nie zapyta cię o twoje hasło",
|
||||
"Użyj {1} aby zmienić swoje hasło i {2} jeżeli je zapomniałeś",
|
||||
"Kilka ustawień które możesz użyć: {1}"
|
||||
],
|
||||
"VehicleHelp": [
|
||||
"Twoje osobiste auta zapisują się za każdym razem jak ktoś wyjdzie z gry!",
|
||||
"Odwiedź dealera samochodów, aby zakupić pojazd (Użyj {1} po więcej informacji)",
|
||||
"Kilka komend: {1}",
|
||||
"Odwiedź warsztat mechanika aby naprawić, pokolorować i/lub ulepszyć swój pojazd! {1} po więcej informacji"
|
||||
],
|
||||
"VehicleDealershipHelp": [
|
||||
"Odwiedź dealera samochodów, aby zakupić nowy pojazd. Użyj {1} aby jednego zlokalizować.",
|
||||
"Przy dealerze samochodów, wejdź do auta, które chcesz kupić i ukaże ci się jego cena.",
|
||||
"Jeśli chcesz kupić pojazd, użyj {1} i dostanie kluczyki by przetestować je na parkingu.",
|
||||
"Odjedź od dealera samochodów, aby potwierdzić zakup pojazdu."
|
||||
],
|
||||
"JobHelp": [
|
||||
"Odwiedzaj miejsca pracy aby zarabiać pieniądze. Szkuaj zółtych punktów na mapie",
|
||||
"Przy miejscu pracy, użyj {1} aby zdobyć prace. Użyj {2} by opuścić swoją pracę",
|
||||
"Użyj {1} aby zacząć pracę. Możesz też dostać pracę {2} i {3}",
|
||||
"Większość pojazdów służbowych jest zamknięta. Użyj {1} obok niego aby do niego wsiąść.",
|
||||
"Przy wsiadaniu do pojazdu służbowego, dostaniesz informacje jak wykonać podjętą pracę."
|
||||
],
|
||||
"ChatHelp": [
|
||||
"Są 2 główne rodzaje chatów: Poza postacią (OOC) i w postaci (IC)",
|
||||
"Mieszanie tych 2 rodzajów jest nieprawidłowym roleplay'em. Zobacz {1} po więcej informacji.",
|
||||
"Kilka komend na chacie: {1}",
|
||||
"Niektóre mają dostępne krótsze nazwy ({1} by rozmawiać, {2} by krzyczeć, itp.)"
|
||||
],
|
||||
"ServerRulesHelp": [
|
||||
"Nierealistyczne akcje (powergaming) są niedozwolone. Nie jesteś superman'em.",
|
||||
"Roleplay na tle terrorystycznym jest niedozowolony.",
|
||||
"Zawszę słuchaj się administracji.",
|
||||
"Nie mieszaj czatów (metagaming). Nie możesz używać informacji w postaci, jeżeli uzyskałeś je poza nią.",
|
||||
"Używaj języka angielskiego na głównych chatach. Jeżeli nie jestes dobry z angielskiego, użyj {1}"
|
||||
],
|
||||
"AnimationHelp": [
|
||||
"Animacje pozwalają ci bardziej wczuć się w swoją role.",
|
||||
"Używaj {1} lub {2} z nazwą by użyć animacji.",
|
||||
"By zobaczyć liste animacji, użyj {1}"
|
||||
],
|
||||
"WeaponHelp": [
|
||||
"Odwiedź sklep z bronią, aby kupić nową broń. Użyj {1} by znaleźć taki sklep.",
|
||||
"Musisz posiadać licenje na broń, aby takową kupić.",
|
||||
"Licencje broni są wydawanie przez policję. Zaaplikuj się tam, aby taką zdobyć.",
|
||||
"Bronie mogą być też kupowane nielegalnie od niektórych bizensów, dealerów broni i klanów."
|
||||
],
|
||||
"SkinHelp": [
|
||||
"W sklepie z ubraniami, użyj {1} aby kupić ubrania.",
|
||||
"Kiedy masz ubrania, wyposaż się w nie i użyj je jak każdy inny przedmiot by ukazać modyfikacje postaci (sprawdź {1} aby zobaczyć jak używać itemy)",
|
||||
"Niektóre skiny są dostępne tylko dla niektórych osób, klanów lub z innych powodów."
|
||||
],
|
||||
"KeyBindHelp": [
|
||||
"Możesz zmienić przypisania klawiszy. Użyj {1} aby zobaczyć twoje przypisane klawisze.",
|
||||
"Użyj {1} aby dodać nowe przypisanie i {2} aby je usunąć.",
|
||||
"Domyślnymi przyciskami są: {1} aby uruchomić pojazd, {2} aby użyć świateł, and {3} aby otworzyć/zamknąć pojazd",
|
||||
"Naciśnij {1} aby zobaczyć swoje itemy i {2} aby wyposażyć się w jakiś przedmiot lub {3} aby go schować.",
|
||||
"Naciśnij {1} aby użyć przedmiot, który trzymasz, naciśnij {2} aby go upuścić lub naciśnij {3} aby podnieść jakiś przedmiot z ziemi."
|
||||
],
|
||||
"BusinessHelp": [
|
||||
"Użyj {1} aby kupować przedmioty lub {2} aby zobaczyć listę co jest na sprzedaż w jakimkolwiek bizensie.",
|
||||
"Biznesy mają niebieskie nazwy nad ikoną przy ich wejściu.",
|
||||
"Komendy właściciela biznesu: {1}",
|
||||
"Nowe auto na sprzedaż pojawi się po odjechaniu od dealera samochodów."
|
||||
],
|
||||
"ClanHelp": [
|
||||
"Zapytaj administratora o stworzenie klanu (Podobne do fakcji/grup/rodzin)",
|
||||
"Właściciele klanu mają pełną kontrole over nad ich klanem od momentu gdy jest stworzony",
|
||||
"Komendy klanu: {1}",
|
||||
"Więcej komend klanu: {1}"
|
||||
],
|
||||
"RadioStationHelp": [
|
||||
"Użyj {1} by ustawić stację twojego auta, mieszkania lub biznesu",
|
||||
"Użyj {2} by zobaczyć listę stacji",
|
||||
"Możesz zmienić głośność swojego radia używając {1} i liczbą od 0 do 100 jako procenty"
|
||||
],
|
||||
"WealthAndTaxHelp": [
|
||||
"Twoje podatki przy wypłacie są {1} procentami twojego przeliczonego bogactwa.",
|
||||
"Twoja przeliczone bogactwo jest obliczone wliczając twoje pojazdy, mieszkania i biznesy, które posiadasz.",
|
||||
"Każdy pojazd jest {1}, każde mieszkanie jest {2} i każdy biznes jest {3}",
|
||||
"Użyj {1} aby zobaczyć swoje bogactow i {2} zobaczyć ile będziesz musiał zapłacić przy następnej wypłacie"
|
||||
],
|
||||
"MustBeInAVehicle": "Musisz być w pojeździe!",
|
||||
"MustBeInOrNearVehicle": "Musisz być w lub obok pojazdu!",
|
||||
"MustBeInVehicleFrontSeat": "Musisz być w przednim siedzeniu pojazdu!",
|
||||
"MustBeInVehicleDriverSeat": "Musisz być kierowcą pojazdu!",
|
||||
"DontHaveVehicleKey": "Nie masz klucza do tego pojazdu!",
|
||||
"NoGateAccess": "Nie masz dostępu do tej bramy!",
|
||||
"GateBroken": "Ta brama jest popsuta!",
|
||||
"GateHacked": "Ta brama nie odpowiada!",
|
||||
"RadioJammed": "Słysysz tylko szumy z radia.",
|
||||
"VehicleNotForSale": "To auto nie jest na sprzedaż!",
|
||||
"VehicleNotForRent": "Tego pojazdu nie można wypożyczyć!",
|
||||
"BusinessNotForSale": "Ten biznes nie jest na sprzedaż!",
|
||||
"BusinessNotForRent": "Tego biznesu nie można wypożyczyć!",
|
||||
"HouseNotForSale": "This house is not for sale!",
|
||||
"HouseNotForRent": "Tego biznesu nie można wypożyczyć!",
|
||||
"DealershipPurchaseTestDrive": "Odjedź pojazdem od dealera samochodów aby go kupić, lub wysiądź aby anulować zakup.",
|
||||
"DealershipPurchaseExitedVehicle": "Anulowałeś kupno pojazdu, ponieważ wysiadłeś z pojazdu!",
|
||||
"VehiclePurchaseComplete": "Ten pojazd jest teraz twój, zapiszę się nieważne gdzie jest.",
|
||||
"VehiclePurchaseNotEnoughMoney": "Nie masz wystarczająco dużo funduszy aby kupić to auto!",
|
||||
"HousePurchaseNotEnoughMoney": "Nie masz wystarczająco dużo funduszy aby kupić to mieszkanie!",
|
||||
"BusinessPurchaseNotEnoughMoney": "Nie masz wystarczająco dużo funduszy aby kupić ten biznes!",
|
||||
"Locales": {
|
||||
"English": "Angielski",
|
||||
"Russian": "Rosyjski",
|
||||
"Spanish": "Hiszpański",
|
||||
"German": "Niemiecki",
|
||||
"Dutch": "Holenderski",
|
||||
"Polish": "Polski"
|
||||
},
|
||||
|
||||
"ADDED-21JAN2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
|
||||
"HeaderPlayerHousesList": "Mieszkania Gracza ({1})",
|
||||
"HeaderPlayerStaffFlagsList": "Flagi Administracji ({1})",
|
||||
"HeaderStaffFlagsList": "Flagi Administracji",
|
||||
"NonRPName": "Nieprawidłowa nazwa roleplay! Wybierz nową:",
|
||||
"InvalidStaffFlag": "Flaga administracji nie znaleziona!",
|
||||
"InvalidClanFlag": "Flaga klanu nie znaleziona!",
|
||||
"InvalidLocale": "Język nie znaleziony!",
|
||||
"HeaderJobUniformList": "Mundury robocze ({1})",
|
||||
"HeaderJobEquipmentList": "Wyposażenie robocze ({1})",
|
||||
"InvalidJobUniform": "Mundur roboczy nie znaleziony!",
|
||||
"InvalidJobEquipment": "Wyposażenie robocze nie znalezione!",
|
||||
"HeaderVehiclesInRangeList": "Pojazdy w {1}",
|
||||
"NoVehiclesWithInRange": "Nie ma pojazdów w {1}",
|
||||
"AmountNotNumber": "Ilość musi być liczbą!",
|
||||
"NeedToBeWorking": "Musisz być w pracy! Użyj {1} w punkcie pracy lub obok pojazdu służbowego.",
|
||||
"NeedToBeOnJobRoute": "Musisz być w trasie! Użyj {1} w pojeździe służbowym",
|
||||
"CurrentJobRouteDeleted": "Trasa służbowa, którą jechałeś została usunięta przez Administratora",
|
||||
"CurrentJobRouteVehicleColoursChanged": "Kolory pojazdów na twojej trasie zostały zmienione przez Administratora.",
|
||||
"NotYourJob": "To nie twoja praca!",
|
||||
"JobPoints": "Możesz zdobyć pracę udając się do żółtych punktów na mapie.",
|
||||
"QuitJobToTakeAnother": "Jeżeli chcesz tą prace, użyj {1} aby opuścić swoją dotychczasową pracę.",
|
||||
"NotAJobVehicle": "To nie jest pojazd służbowy!",
|
||||
"NotYourJobVehicle": "To nie jest twój pojazd służbowy!",
|
||||
"JobRouteDisabled": "Trasa służbowa, którą jechałeś została usunięta przed Administratora",
|
||||
"HeaderPickupTypes": "Rodzaję Pickup'ów",
|
||||
"HeaderBlipTypes": "Rodzaje Ikon Mapy",
|
||||
"InvalidGPSLocation": "Nie ma lokalizacji z taką nazwą lub rodzajem",
|
||||
"HeaderBusinessList": "Biznesy",
|
||||
"VehicleForSale": "Ten {1} jest do kupienia za {2}! Użyj {3} jeżeli chcesz go kupić",
|
||||
"VehicleForRent": "Ten {1} jest do wynajęcia za {2}! Użyj {3} jeżeli chcesz go wynająć",
|
||||
|
||||
"ADDED-31JAN2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
|
||||
"LoginFailedInvalidPassword": "Invalid password! {1} attempts remaining",
|
||||
"LoginFailedNoPassword": "You must enter a password! ! {1} attempts remaining",
|
||||
"RegistrationFailedNoPassword": "You must enter a password!",
|
||||
"RegistrationFailedNoPasswordConfirm": "You must confirm the password!",
|
||||
"RegistrationFailedNoEmail": "You must enter an email!",
|
||||
"AccountNameAlreadyRegistered": "Your name is already registered!",
|
||||
"AlreadyLoggedIn": "You are already logged in!",
|
||||
"RegistrationFailedInvalidEmail": "That email is invalid!",
|
||||
"RegistrationFailedPasswordMismatch": "The passwords don't match!",
|
||||
"RegistrationFailedCreateError": "Your account couldn't be created!",
|
||||
"RegistrationSuccess": "Your account has been created!",
|
||||
"RegistrationEmailVerifyReminder": "Don't forget to verify your email! A verification code has been sent to you.",
|
||||
"RegistrationCreateCharReminder": "To play on the server, you will need to make a character.",
|
||||
"NoCharactersGUIMessage": "You have no characters. Would you like to make one?",
|
||||
"NoCharactersGUIWindowTitle": "No characters",
|
||||
"NoCharactersChatMessage": "You have no characters. Use {1} to make one.",
|
||||
"NeedEmailFor2FA": "You need to add your email to your account to use two-factor authentication.",
|
||||
"NeedEmailVerifiedFor2FA": "You need to verify your email to use two-factor authentication.",
|
||||
"SetEmailHelpTip": "Use {1} to set your email.",
|
||||
"VerifyEmailHelpTip": "Use {1} to verify your email.",
|
||||
|
||||
"ADDED-13FEB2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
|
||||
"NearbyRadio": "Nearby radio",
|
||||
"FromRadio": "From radio",
|
||||
"ToRadio": "To radio",
|
||||
"NeedToEnterPropertyCommand": "You need to enter the {1} first! Use {2} to enter and exit",
|
||||
"NeedToEnterPropertyKeyPress": "You need to enter the {1} first! Press {2} to enter and exit",
|
||||
"InventoryFullCantCarry": "You don't have any space to carry this (full inventory)!",
|
||||
"NotEnoughCashNeedAmountMore": "You don't have enough money! You need {1} more!",
|
||||
"AmountMustBeMoreThan": "The amount must be more than {1}!",
|
||||
"WeaponBanned": "You are not allowed to buy or use weapons!",
|
||||
"TimeNotNumber": "The time must be a number",
|
||||
"HeaderDefaultBusinessItemTypes": "Business Item Templates",
|
||||
"FixingStuck": "Fixing your position and virtual world ...",
|
||||
"CantUseCommandYet": "You must wait before you can use this command again!",
|
||||
"NotATester": "You are not a tester!",
|
||||
"AccessDenied": "AccessDenied",
|
||||
"InvalidSkin": "That skin is invalid!",
|
||||
"HeaderInteriorTypes": "Interiors List",
|
||||
"ViewInventoryKeyPressTip": "Press {1} to see your items",
|
||||
"ViewInventoryCommandTip": "Use {1} to see your items",
|
||||
"GUIAccountSettingToggle": "You have turned {1} GUI",
|
||||
|
||||
"ADDED-23MAR2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations",
|
||||
"CarCommandHelp": "You can buy a car by visiting a vehicle dealership. Use {1} for more information.",
|
||||
"SkinCommandHelp": "You can change your skin by visiting a clothes store. Use {1} for more info.",
|
||||
"BusinessVehiclesRespawned": "All business vehicles have been respawned by an admin!",
|
||||
"JobVehiclesRespawned": "All job vehicles have been respawned by an admin!",
|
||||
"PlayerVehiclesRespawned": "All player vehicles have been respawned by an admin!",
|
||||
"ClanVehiclesRespawned": "All clan vehicles have been respawned by an admin!",
|
||||
"PublicVehiclesRespawned": "All public have been respawned by an admin!",
|
||||
"EmptyVehiclesRespawned": "All empty vehicles have been respawned by an admin!",
|
||||
"AllVehiclesRespawned": "All vehicles have been respawned by an admin!",
|
||||
"AllVehiclesReloaded": "All vehicles have been reloaded by an admin!",
|
||||
"YourVehicleRespawned": "Your vehicle has been respawned",
|
||||
"PlayerIPBanned": "{1} has been IP banned!",
|
||||
"PlayerCharacterBanned": "{1} has been character banned!",
|
||||
"PlayerSubNetBanned": "{1} has been subnet banned!",
|
||||
"CantModifyBusiness": "You can't manage or modify this business",
|
||||
"CantModifyHouse": "You can't manage or modify this house",
|
||||
"ServerTimeSet": "{1} set the time to {2}",
|
||||
"ServerWeatherSet": "{1} set the weather to {2}",
|
||||
"ServerSnowSet": "{1} turned falling snow {2} and ground snow {3}",
|
||||
"AllJobsReloaded": "All server jobs have been reloaded by an admin",
|
||||
"ServerLogoSet": "{1} turned the server logo image {2}",
|
||||
"ServerGUISet": "{1} turned GUI for this server {2}",
|
||||
"ServerBusinessBlipsSet": "{1} turned all business blips {2}",
|
||||
"ServerHouseBlipsSet": "{1} turned all house blips {2}",
|
||||
"ServerJobBlipsSet": "{1} turned all job blips {2}",
|
||||
"ServerBusinessPickupsSet": "{1} turned all business pickups {2}",
|
||||
"ServerHousePickupsSet": "{1} turned all house pickups {2}",
|
||||
"ServerJobPickupsSet": "{1} turned on all job pickups {2}",
|
||||
"BusinessBuyItemsLabel": "Use {1} to purchase items",
|
||||
"PropertyEnterCommandLabel": "Use {1} to enter",
|
||||
"PropertyEnterKeyPressLabel": "Press {1} to enter",
|
||||
"PropertyForSaleLabel": "For sale: ${1}",
|
||||
"PropertyForRentLabel": "For rent: ${1} every payday",
|
||||
"RemainingTaxPaidInMoney": "You covered the remaining taxes with ${1} in cash.",
|
||||
"LostMoneyFromTaxes": "You lost money since your taxes are more than your paycheck!",
|
||||
"NextPaycheckRepossessionWarning": "If you don't have enough cash to cover taxes on next paycheck, you will lose stuff!",
|
||||
"NotEnoughMoneyForTax": "You don't have enough money to cover your taxes!",
|
||||
"AssetsRepossessedForTax": "You lost {1} vehicles, {2} houses, and {3} businesses because you couldn't pay taxes!",
|
||||
"Closed": "Closed",
|
||||
"Open": "Open",
|
||||
"VehicleDealershipLabel": "Enter a vehicle as driver to buy it",
|
||||
"TakeJobLabel": "Use /takejob to work here",
|
||||
"StartWorkLabel": "Use /startwork to start working",
|
||||
"JobEquipAndUniformLabel": "Use /uniform and /equip for job stuff, or /stopwork to stop working",
|
||||
"NotYourJobLabel": "You already have a different job. Use /quitjob if you want this one",
|
||||
"JobLabel": "{1} Job",
|
||||
"PaydayBonusSet": "{1} set the payday bonus to ${2}",
|
||||
"AllHousesReloaded": "All houses have been reloaded by an admin",
|
||||
"AllRadioStationsReloaded": "All radio stations have been reloaded by an admin!",
|
||||
"PlayerKicked": "{1} has been kicked from the server",
|
||||
"AllBusinessesReloaded": "All businesses have been reloaded by an admin!",
|
||||
"UnableToDoThat": "You aren't able to do that",
|
||||
"SetVehicleClanConfirmMessage": "Are you sure you want to give this vehicle to your clan?",
|
||||
"SetVehicleClanConfirmTitle": "Warning!",
|
||||
"SetItemPriceBelowOrderPriceMessage": "Are you sure you want to set the item price below it's order price? You will lose ${1} every purchase!",
|
||||
"SetItemPriceBelowOrderPriceTitle": "Warning!",
|
||||
"MustOwnVehicle": "You don't own this vehicle!"
|
||||
}
|
||||
@@ -1,457 +0,0 @@
|
||||
{
|
||||
"TranslationProvidedBy": "VNDTTS",
|
||||
"LocaleEnglishName": "Russian",
|
||||
|
||||
"LocaleNativeName": "Русский",
|
||||
"LocaleOffer": "Этот сервер доступен на русском. Используйте {1} чтобы его использовать.",
|
||||
"LocaleChanged1": "Ваш язык был установлен на {1}",
|
||||
"LocaleChanged2": "Этот сервер теперь будет показывать сообщения в {1}",
|
||||
"LocaleChangedNote": "Это не влияет на сообщения других игроков",
|
||||
"AccentsListHeader": "Акценты",
|
||||
"HeaderHelpMainList": "Помощь Категории",
|
||||
"AccentNotFound": "Не удалось найти акцент",
|
||||
"AccentSet": "Вы установили свой акцент на {1}",
|
||||
"InvalidAnimation": "Такой анимации не существует",
|
||||
"AnimationCommandTip": "Используйте {1} чтобы просмотреть список доступных анимаций",
|
||||
"InvalidAnimationDistance": "Дистанция должна быть между 0 и 3",
|
||||
"AnimationStopCommandTip": "Используйте {1} чтобы остановить анимацию",
|
||||
"CantBanClient": "Вы не можете забанить этого игрока",
|
||||
"PlayerAccountBanned": "Аккаунт {1} был заблокирован ",
|
||||
"ClanNotFound": "Не удалось найти клан",
|
||||
"ClanNameTaken": "Клан с таким именем уже существует",
|
||||
"PlayerNotFound": "Не удалось найти игрока",
|
||||
"ClanCantRemoveRanks": "Вы не можете убрать ранги клана",
|
||||
"ClanCantAddRanks": "Вы не можете добавить новые ранги клана",
|
||||
"ClanRankNotFound": "Не удалось найти ранг клана",
|
||||
"ClanCantChangeMemberTag": "Вы не можете изменить теги членов клана",
|
||||
"ClanPlayerNotInSameClan": "Игрок не в вашем клане",
|
||||
"ClanCantChangeRankLevel": "Вы не можете изменить уровень ранга клана",
|
||||
"ClanCantChangeRankTag": "Вы не можете изменить теги ранга клана",
|
||||
"NameNotRegistered": "Ваше имя не зарегестрировано! Используйте {1} чтобы создать аккаунт.",
|
||||
"AutomaticLoginIPToggle": "Автоматический вход по IP теперь {1}",
|
||||
"CouldNotRegisterAccount": "Возникла проблема при создании аккаунта. Пожалуйста свяжитесь с администратором.",
|
||||
"RandomTipsToggle": "Случайные подсказки теперь {1}",
|
||||
"ActionTipsToggle": "Местные подсказки теперь {1}",
|
||||
"AutoSpawnLastCharToggle": "Автоматическое возрождение как последний выбраный персонаж теперь {1}",
|
||||
"AccountGUISettingToggle": "GUI теперь {1}",
|
||||
"On": "Включен",
|
||||
"Off": "Выключен",
|
||||
"Yes": "Да",
|
||||
"No": "Нет",
|
||||
"True": "Верно",
|
||||
"False": "Неверно",
|
||||
"Locked": "Закрыто",
|
||||
"Unlocked": "Открыто",
|
||||
"PasswordNotGoodEnough": "Новый пароль должен соответсвовать требованиям !",
|
||||
"PasswordNeedsBase": "Пароль должен местить не меншьше {1}",
|
||||
"PasswordNeedsCapitals": "{1} Заглавные буквы",
|
||||
"PasswordNeedsNumbers": "{1} цифры",
|
||||
"PasswordNeedsSymbols": "{1} символы",
|
||||
"PasswordsDontMatch": "Новый пароль и его подтверджение не совпадают!",
|
||||
"PasswordChanged": "Ваш пароль был изменен!",
|
||||
"AutoLoggedInIP": "Вы автоматически войшли по IP!",
|
||||
"WelcomeBack": "Добро пожаловать {1}, {2}! Используйте {3} чтобы продолжить.",
|
||||
"WelcomeNewPlayer": "Добро пожаловать в {1}, {2}! Используйте {3} чтобы начать играть.",
|
||||
"InvalidPlayer": "Не удалось найти игрока!",
|
||||
"InvalidBusiness": "Не удалось найти бизнес!",
|
||||
"InvalidHouse": "Не удалось найти дом!",
|
||||
"InvalidVehicle": "Не удалось найти транспорт!",
|
||||
"InvalidClan": "Не удалось найти клан!",
|
||||
"InvalidClanRank": "Не удалось найти ранг клана!",
|
||||
"InvalidJob": "Не удалось найти работу!",
|
||||
"InvalidItem": "Не удалось найти предмет!",
|
||||
"InvalidItemType": "Не удалось найти предмет!",
|
||||
"InvalidRadioStation": "Не удалось найти радиостанцию!",
|
||||
"InvalidGate": "Не удалось найти ворота!",
|
||||
"EntersProperty": "открывает дверь и входит в {1}",
|
||||
"ExitsProperty": "открывает дверь и покидает {1}",
|
||||
"EnterExitPropertyDoorLocked": "пытаеться открыть двери {1} но у него не выходить потому-что двери закрыты",
|
||||
"PropertyNoInterior": "У {1} нет доступного интерьера, но вы все еще можете использовать комманды стоя на значке возле входа.",
|
||||
"NoBusinessWithItemType": "Нет бизнесов в которых этот предмет доступен",
|
||||
"HeaderKeyBinds": "Привязки",
|
||||
"HeaderAccountHelp": "Помощь Аккаунт",
|
||||
"HeaderVehicleHelp": "Помощь Транспорт",
|
||||
"HeaderVehicleDealershipHelp": "Помощь Автосалон",
|
||||
"HeaderJobHelp": "Помощь Работа",
|
||||
"HeaderChatHelp": "Помощь Чат",
|
||||
"HeaderServerRules": "Правила Сервера",
|
||||
"HeaderWebsiteInfo": "Сайт",
|
||||
"HeaderDiscordInfo": "Discord",
|
||||
"HeaderAnimationsList": "Список Анимаций",
|
||||
"HeaderPayAndSprayHelp": "Помощь Pay 'n' Spray",
|
||||
"HeaderAmmunationHelp": "Помощь Аммунация",
|
||||
"HeaderVehicleTuneupHelp": "Помощь Тюнинг Автомобиля",
|
||||
"HeaderBindableKeysHelp": "Кнопки которые можно привязать",
|
||||
"HeaderSkinHelp": "Помощь Одежда/Облик",
|
||||
"HeaderBusinessHelp": "Помощь Бизнес",
|
||||
"HeaderClanHelp": "Помощь Клан",
|
||||
"HeaderPlayerVehiclesList": "Транспорт Игрока ({1})",
|
||||
"HeaderPlayerBusinessesList": "Бизнесы Игрока ({1})",
|
||||
"HeaderClansList": "Список кланов",
|
||||
"HeaderAdminsList": "Список администраторов",
|
||||
"HeaderBadgeInfo": "Информация значка",
|
||||
"HeaderAccentsList": "Список акцентов",
|
||||
"HeaderPlayerInfo": "Информация об игроке ({1})",
|
||||
"HeaderWealthandTaxHelp": "Информация о достатке и налогах",
|
||||
"HeaderCommandInfo": "Информация о команде ({1})",
|
||||
"HeaderRadioHelp": "Помощь Радио",
|
||||
"HeaderRadioStationsList": "Радиостанции",
|
||||
"HeaderKeyBindsList": "Список привязок",
|
||||
"RadioVolumeChanged": "{1} Вы сменили громкость звука на {2}%",
|
||||
"VolumeLevelNotNumber": "Уровень звука должен быть в цифрах",
|
||||
"RadioStationLocationInvalid": "Вы должны находится в транспорте, доме, или бизнесе или иметь устройство чтобы сменить радиостанцию!",
|
||||
"ActionBusinessRadioStationChange": "меняет радиостанцию бизнеса на {1} ({2})",
|
||||
"ActionHouseRadioStationChange": "меняет радиостанцию дома на {1} ({2})",
|
||||
"ActionVehicleRadioStationChange": "меняет радиостанцию транспорта на {1} ({2})",
|
||||
"ActionItemRadioStationChange": "переключает станцию {1} на станцию {2} ({3})",
|
||||
"RandomVehicleCommandsDisabled": "Это случайная машина трафика, команды на нее не работают.",
|
||||
"HouseDoorLock": "Дом {1} {2}!",
|
||||
"BusinessDoorLock": "Бизнес {1} {2}!",
|
||||
"ServerGameModeRestarting": "Режим игры сервера перезапускается!",
|
||||
"HeaderSelfItemList": "Ваш инвентарь",
|
||||
"HeaderPlayerItemList": "Инвентарь игрока ({1})",
|
||||
"HeaderHouseItemList": "Инвентарь дома",
|
||||
"HeaderBusinessFloorItemList": "Инвентарь бизнеса (Продажа)",
|
||||
"HeaderBusinessStorageItemList": "Инвертарь бизнеса (Хранилище)",
|
||||
"HeaderItemItemList": "Инвентарь {1}",
|
||||
"ItemSlotNotNumber": "Слот предмета должен быть цифрой",
|
||||
"ItemSlotMustBeBetween": "Слот этого предмета должен находиться между {1} и {2}!",
|
||||
"UseItemBugged": "Предмет который вы пытаетесь использовать забагован. Баг репорт был послан разработчикам сервера.",
|
||||
"PickupItemBugged": "Предмет который вы пытаетесь поднять забагован. Баг репорт был послан разработчикам сервера.",
|
||||
"DropItemBugged": "Предмет который вы пытаетесь выкинуть забагован. Баг репорт был послан разработчикам сервера.",
|
||||
"HandsBusy": "Ваши руки заняты",
|
||||
"CantUseItemInSkinChange": "Вы не можете использовать предметы когда вы меняете свой облик",
|
||||
"CantDropItemInSkinChange": "Вы не можете кидать предметы когда вы меняете свой облик",
|
||||
"CantPickupItemInSkinChange": "Вы не можете подбирать предметы когда вы меняете свой облик",
|
||||
"CantSwitchItemInSkinChange": "Вы не можете переключать предметы когда вы меняете свой облик",
|
||||
"CantGiveItemInSkinChange": "Вы не можете давать предметы когда вы меняете свой облик",
|
||||
"CantTakeItemInSkinChange": "Вы не можете брать предметы когда вы меняете свой облик",
|
||||
"ItemUnequippableNoAmmo": "{1} на слоте {2} не имеет патронов и не может быть экипирован!",
|
||||
"NoSpaceSelfInventory": "У вас не осталось места в инвентаре",
|
||||
"Business": "бизнес",
|
||||
"House": "дом",
|
||||
"Clan": "клан",
|
||||
"Vehicle": "транспорт",
|
||||
"Item": "предмет",
|
||||
"ItemType": "тип предмета",
|
||||
"Gate": "ворота",
|
||||
"Door": "двери",
|
||||
"ClanRank": "Ранг клана",
|
||||
"JobRank": "Ранг работы",
|
||||
"RadioStation": "радиостанция",
|
||||
"Months": [
|
||||
"Январь",
|
||||
"Февраль",
|
||||
"Март",
|
||||
"Апрель",
|
||||
"Май",
|
||||
"Июнь",
|
||||
"Июль",
|
||||
"Август",
|
||||
"Сентябрь",
|
||||
"Октябрь",
|
||||
"Ноябрь",
|
||||
"Декабрь"
|
||||
],
|
||||
"WeekDays": [
|
||||
"Воскресенье",
|
||||
"Понедельник",
|
||||
"Вторник",
|
||||
"Среда",
|
||||
"Четверг",
|
||||
"Пятница",
|
||||
"Субота"
|
||||
],
|
||||
"CardinalDirections": [
|
||||
"Север",
|
||||
"Северо-восток",
|
||||
"Восток",
|
||||
"Юго-восток",
|
||||
"Юг",
|
||||
"Юго-запад",
|
||||
"Запад",
|
||||
"Северо-запад"
|
||||
],
|
||||
"NewPlayerReadyToPlay": [
|
||||
"Вам было надано немного денег. Используйте {1} чтобы найти места в которых можно купить предметы.",
|
||||
"Если вам нужны деньги, желтые точки это места работы на карте.",
|
||||
"Если вам нужен транспорт, посетите автосалон. Вы также можете использовать орендовочный транспорт возле начальной зоны или сесть на поезд",
|
||||
"Не забудьте ознакомиться с {1} и использовать {2} для информации."
|
||||
],
|
||||
"YourCurrentVehicleDeleted": "Транспорт в котором вы находились было удалено.",
|
||||
"Distance": "Дистанция",
|
||||
"Meters": "Метров",
|
||||
"Feet": "Футов",
|
||||
"Kilometers": "Километры",
|
||||
"Miles": "Мили",
|
||||
"MustBeVehicleDriver": "Вы можете быть только водителем!",
|
||||
"PlayerJoinedServer": "{1} присоеденился к игре из {1}!",
|
||||
"PlayerLeftServer": "{1} покинул игру! ({1})",
|
||||
"DisconnectReasons": [
|
||||
"Потеряно соединение",
|
||||
"Отключен",
|
||||
"Неподерживаемый клинт",
|
||||
"Неправильная игра",
|
||||
"Неправильный пароль",
|
||||
"Неподдерживаемый Exe",
|
||||
"Disconnected",
|
||||
"Забанен",
|
||||
"Не удалось",
|
||||
"Не правильное имя",
|
||||
"Вылетел"
|
||||
],
|
||||
"TakeItemFromHouse": "Берет {1} из дома",
|
||||
"TakeItemFromBusinessStorage": "Берет {1} из хранилища",
|
||||
"TakeItemFromBusiness": "Берет {1} из бизнеса",
|
||||
"TakeItemFromItem": "Достает {1} из {2}",
|
||||
"TakeItemFromVehicleTrunk": "Достает {1} из багажника",
|
||||
"TakeItemFromVehicleDash": "Достает {1} из бардачка",
|
||||
"JobEquipmentInventoryKeyBindTip": "Рабочее снаряжение у вас в инвентаре. Нажмите {1} чтобы его просмотреть.",
|
||||
"JobEquipmentInventoryCommandTip": "Рабочее снаряжение у вас в инвентаре. Используйте {1} чтобы его просмотреть.",
|
||||
"AccountHelp": [
|
||||
"Не предоставляйте свой пароль никому. {1} персонал никогда не будет спрашивать у вас пароль ",
|
||||
"Используйте {1} чтобы изменить ваш пароль, и {2} если вы его забыли",
|
||||
"Некоторые опции: {1}"
|
||||
],
|
||||
"VehicleHelp": [
|
||||
"Ваш личный транспорт будет сохранен в любом месте где вы, или кто-либо другой его оставит!",
|
||||
"Посетите автосалон чтобы приобрести новый транспорт (Используйте {1} чтобы увидеть больше информации)",
|
||||
"Некоторые комманды: {1}",
|
||||
"Посетите гараж механика чтобы починить, изменить цвет, и затюнинговать ваш автомобиль! {1} для информации"
|
||||
],
|
||||
"VehicleDealershipHelp": [
|
||||
"Посетите автосалон чтобы приобрести новый транспорт. Используйте {1} чтобы найти его.",
|
||||
"Ввойдите в транспорт который вы хотите приобрести, и цена на него будет вам показана",
|
||||
"Если хотите приобрести транспорт, используйте {1} и вам дадут ключи чтобы провести тест-драйв на парковке.",
|
||||
"Покиньте автосалон на вашем новом транспорте чтобы подвердить покупку."
|
||||
],
|
||||
"JobHelp": [
|
||||
"Посетите места работы, получите работу и зарабатывайте деньги. Ищите желтые точки на карте",
|
||||
"На месте работы, используйте {1} чтобы получить работу. Используйте {2} чтобы оставить работу",
|
||||
"Используйте {1} чтобы начать работать. Вы также можете получить работу {2} и {3}",
|
||||
"Большинство рабочего транспорта изначально закрыто. Используйте {1} находясь возле него чтобы войти.",
|
||||
"Во время входа в рабочий транспорт, информация о том, как работать будет вам предоставлена."
|
||||
],
|
||||
"ChatHelp": [
|
||||
"Существуют два основных типов чата: внутри персонажа и вне его",
|
||||
"Смешивать их не считается полноценной ролевой игрой. Просмотрите {1} для информации.",
|
||||
"Некоторые комманды чата: {1}",
|
||||
"Некоторые имеют укороченые версии ({1} чтобы говорить, {2} чтобы выкрикивать, и так далее)"
|
||||
],
|
||||
"ServerRulesHelp": [
|
||||
"Нереалистичные действия запрещены. Вы не супермен.",
|
||||
"Ролевая игра за террориста и терроризм запрещены.",
|
||||
"Всегда следуйте соблюдайте инструкии даные модератором или администратором.",
|
||||
"Вам не позволяется использовать информацию полученую вне персонажа, персонажем ",
|
||||
"Пожалуйста придерживаетесь английского в главном чате, если вы плохо знаете английский, используйте {1}"
|
||||
],
|
||||
"AnimationHelp": [
|
||||
"Анимации позволяют вам улучшить составляющую ролевой игры с помощью визуальных действий",
|
||||
"Используте {1} или {2} с названием тобы применить анимацию.",
|
||||
"Чтобы просмотреть список доступных анимаций, используйте {1}"
|
||||
],
|
||||
"WeaponHelp": [
|
||||
"Посетите магазин оружия что-бы приобрести оружие. Используйте {1} чтобы найти.",
|
||||
"Оружие невозможно купить без лицензии.",
|
||||
"Лицензиями на оружие занимается отделение полиции. Обратитесь туда чтобы заполучить лицензию.",
|
||||
"Оружие также может быть приобретено нелегально от некоторых бизнесов, торговцев оружием, и кланов."
|
||||
],
|
||||
"SkinHelp": [
|
||||
"В магазине одежды используйте {1} чтобы купить одежду",
|
||||
"Когда у вас есть предмет одежды, экипируйте его и используйте его как любой другой предмет чтобы просмотреть меню выбора облика персонажа (Просмотрите {1} чтобы научиться использовать предметы)",
|
||||
"Некоторые облики ограничены только для некоторых работ, кланов, или по каким-то другим причинам."
|
||||
],
|
||||
"KeyBindHelp": [
|
||||
"Вы можете сами создавать ваши привязки на кнопки. Используйте {1} чтобы просмотреть ваши привязки.",
|
||||
"Используйте {1} чтобы добавить новую приязку или {2} чтобы убрать ее.",
|
||||
"Стандартные привязки: {1} для мотора, {2} для фар, и {3} для открытия/закрытия",
|
||||
"Используйте {1} чтобы просмотреть ваши предметы {2} чтобы экипировать предмет или {3} чтобы убрать.",
|
||||
"Используйте {1} чтобы использвать предмет который вы держите в руках, используйте {2} чтобы его выбростить, или используйте {3} чтобы подобрать предмет."
|
||||
],
|
||||
"BusinessHelp": [
|
||||
"Используйте {1} чтобы покупать предметы или {2} чтобы просмотреть список того, что продаеться в любом бизнесе",
|
||||
"Бизнесы имеют их названия синим цветом над иконкой возле входа.",
|
||||
"Комманды владельца бизнеса: {1}",
|
||||
"Новый автомобиль появится после того как вы уедете из автосалона."
|
||||
],
|
||||
"ClanHelp": [
|
||||
"Попросите администратора чтобы основать клан",
|
||||
"Владельцы клана имеют полный контроль над ихним кланом после его основания",
|
||||
"Комманды клана: {1}",
|
||||
"Больше комманд клана: {1}"
|
||||
],
|
||||
"RadioStationHelp": [
|
||||
"Используйте {1} чтобы выбрать радиостанцию для вашего траспорта, дома, или бизнеса",
|
||||
"Используйте {2} чтобы просмотреть список радиостанций",
|
||||
"Вы можете изменить громкость радио используя {1} с 0-100 в качестве процентов"
|
||||
],
|
||||
"WealthAndTaxHelp": [
|
||||
"Вы платите {1} процентов от вашего расчетного уровня достатка.",
|
||||
"Ваш расчетный уровень достатка зависит от того, сколько вам принадлежит транспорта, домов и бизнесов.",
|
||||
"Каждый транспорт это {1}, каждый дом это {2}, И каждый бизнес это {3}",
|
||||
"Используйте {1} чтобы просмотреть ваш текущий достаток, и {2} чтобы просмотреть сколько вы платите налогов с каждой зарплаты"
|
||||
],
|
||||
"MustBeInAVehicle": "Вы должны быть внутри транспорта!",
|
||||
"MustBeInOrNearVehicle": "Вы должны быть возле транспорта!",
|
||||
"MustBeInVehicleFrontSeat": "Вы можете сидеть только спереди!",
|
||||
"MustBeInVehicleDriverSeat": "Вы можете быть только водителем!",
|
||||
"DontHaveVehicleKey": "У вас нет ключей к этому транспорту!",
|
||||
"NoGateAccess": "У вас нет доступа к воротам!",
|
||||
"GateBroken": "Эти ворота сломаны!",
|
||||
"GateHacked": "Ворота не отвечают!",
|
||||
"RadioJammed": "Из радио доносится лишь шум.",
|
||||
"VehicleNotForSale": "Этот транспорт не продается!",
|
||||
"VehicleNotForRent": "Этот транспорт не сдается в оренду! ",
|
||||
"BusinessNotForSale": "Этот бизнес не продается!",
|
||||
"BusinessNotForRent": "Этот бизнес не сдается в оренду!",
|
||||
"HouseNotForSale": "Этот дом не продаеться!",
|
||||
"HouseNotForRent": "Этот дом не сдаеться в оренду!",
|
||||
"DealershipPurchaseTestDrive": "Уедьте из автосалона чтобы подтвердить покупку транспорта, или выйдете из него чтобы отменить.",
|
||||
"DealershipPurchaseExitedVehicle": "Вы отменили покупку транспорта покинув его!",
|
||||
"VehiclePurchaseComplete": "Этот транспорт теперь принадлежит вам! Он останется там где вы его оставили.",
|
||||
"VehiclePurchaseNotEnoughMoney": "у вас недостаточно денег для покупки этого транспорта!",
|
||||
"HousePurchaseNotEnoughMoney": "У вас недостаточно денег для покупки этого дома!",
|
||||
"BusinessPurchaseNotEnoughMoney": "У вас недостаточно денег для покупки этого бизнеса!",
|
||||
"Locales": {
|
||||
"English": "Английский",
|
||||
"Russian": "Русский",
|
||||
"Spanish": "Испанский",
|
||||
"German": "Немецкий",
|
||||
"Dutch": "Нидерландский"
|
||||
},
|
||||
|
||||
"ADDED-21JAN2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
|
||||
"HeaderPlayerHousesList": "Дома Игрока ({1})",
|
||||
"HeaderPlayerStaffFlagsList": "Флаги игрока персонала ({1})",
|
||||
"HeaderStaffFlagsList": "Флаги персонала",
|
||||
"NonRPName": "Ваше имя не подходит для ролевой игры! Выберете другое:",
|
||||
"InvalidStaffFlag": "Не удалось найти флаг персонала!",
|
||||
"InvalidClanFlag": "Не удалось найти флаг клана!",
|
||||
"InvalidLocale": "Не удалось найти язык!",
|
||||
"HeaderJobUniformList": "Рабочие униформы ({1})",
|
||||
"HeaderJobEquipmentList": "Рабочие снаряжение ({1})",
|
||||
"InvalidJobUniform": "Не удалось найти рабочую униформу!",
|
||||
"InvalidJobEquipment": "Не удалось найти рабочее снаряжение!",
|
||||
"HeaderVehiclesInRangeList": "Транспорт в пределах {1}",
|
||||
"NoVehiclesWithInRange": "Нет транспорта в пределах {1}",
|
||||
"AmountNotNumber": "Количество должно быть введено цифрой!",
|
||||
"NeedToBeWorking": "Вы должны быть на работе! Используйте {1} на месте работы или возле рабочего транспорта.",
|
||||
"NeedToBeOnJobRoute": "Вы должны быть на рабочем маршруте! Используйте {1} в рабочем транспорте",
|
||||
"CurrentJobRouteDeleted": "Рабочий маршрут на котором вы находились был удален администратором",
|
||||
"CurrentJobRouteVehicleColoursChanged": "Цвет транспорта на маршруте был изменен администратором",
|
||||
"NotYourJob": "Это работа пренадлежит не вам!",
|
||||
"JobPoints": "Вы можете устроиться на работу ориентируясь по желтым значкам на карте.",
|
||||
"QuitJobToTakeAnother": "Если хотите покинуть работу, ипользуйте {1}.",
|
||||
"NotAJobVehicle": "Это не рабочий транспорт!",
|
||||
"NotYourJobVehicle": "Этот транспорт пренадлежит не вашей работе!",
|
||||
"JobRouteDisabled": "Рабочий маршрут на котором вы были был удален администратором",
|
||||
"HeaderPickupTypes": "Типы подбираемых предметов",
|
||||
"HeaderBlipTypes": "Типы иконок карты",
|
||||
"InvalidGPSLocation": "Не существует локаций с таки именем или такого типа",
|
||||
"HeaderBusinessList": "Бизнесы",
|
||||
"VehicleForSale": "Этот {1} можно купить за {2}! Используйте {3} если хотите его купить",
|
||||
"VehicleForRent": "Этот {1} может быть орендован за {2}! Используйте {3} если хотите его орендовать",
|
||||
|
||||
"ADDED-31JAN2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
|
||||
"LoginFailedInvalidPassword": "Неправельный пароль! Осталось {1} попыток",
|
||||
"LoginFailedNoPassword": "Вы должны ввести пароль! Осталось {1} попыток",
|
||||
"RegistrationFailedNoPassword": "Вы должны ввести пароль!",
|
||||
"RegistrationFailedNoPasswordConfirm": "Вы должны подтвердить пароль!",
|
||||
"RegistrationFailedNoEmail": "Вы должны ввести адрес электронной почты!",
|
||||
"AccountNameAlreadyRegistered": "Ваше имя уже зарегистрировано!",
|
||||
"AlreadyLoggedIn": "Вы уже вошли!",
|
||||
"RegistrationFailedInvalidEmail": "Такого адреса не существует!",
|
||||
"RegistrationFailedPasswordMismatch": "Пароли не совпадают!",
|
||||
"RegistrationFailedCreateError": "Не удалось создать аккаунт!",
|
||||
"RegistrationSuccess": "Ваш аккаунт был успешно создан!",
|
||||
"RegistrationEmailVerifyReminder": "Не забудьте подтвердить ваш электронный адрес, код подверждения был послан вам на электронную почту.",
|
||||
"RegistrationCreateCharReminder": "Чтобы играть на сервере, вам нужно будет создать персонажа.",
|
||||
"NoCharactersGUIMessage": "У вас нет персонажей. Не хотите создать?",
|
||||
"NoCharactersGUIWindowTitle": "Нет персонажей",
|
||||
"NoCharactersChatMessage": "У вас нет персонажей. Используйте {1} чтобы создать.",
|
||||
"NeedEmailFor2FA": "Вам нужно добавить ваш адрес электронной почты чтобы использовать двухфакторную аунтентификацию.",
|
||||
"NeedEmailVerifiedFor2FA": "Вам нужно подтвердить вашу электронную почту чтобы использовать двухфакторную аунтентификацию.",
|
||||
"SetEmailHelpTip": "Используйте {1} чтобы установить ваш адрес электронной почты.",
|
||||
"VerifyEmailHelpTip": "Используйте {1} чтобы подтвердить ваш адрес электронной почты.",
|
||||
|
||||
"ADDED-13FEB2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
|
||||
"NearbyRadio": "Ближайшее радио",
|
||||
"FromRadio": "Из радио",
|
||||
"ToRadio": "В радио",
|
||||
"NeedToEnterPropertyCommand": "Вам нужно сначало ввести {1}! Используйте {2} чтобы выйти",
|
||||
"NeedToEnterPropertyKeyPress": "Вам нужно сначало ввести {1}! Используйте {2} чтобы выйти",
|
||||
"InventoryFullCantCarry": "У вас недостаточно места в инвентаре(Инвентарь заполнен)!",
|
||||
"NotEnoughCashNeedAmountMore": "У вас недостаточно денег! У вас не хватает {1}!",
|
||||
"AmountMustBeMoreThan": "Количество должно быть больше {1}!",
|
||||
"WeaponBanned": "Вам нельзя покупать оружие!",
|
||||
"TimeNotNumber": "Время должно быть назначено цифрой",
|
||||
"HeaderDefaultBusinessItemTypes": "Шаблоны предметов бизнеса",
|
||||
"FixingStuck": "Исправляет вашу текущую позицию и виртуальный мир ...",
|
||||
"CantUseCommandYet": "Подождите некоторое время перед тем как использовать комманду снова!",
|
||||
"NotATester": "Вы не тестировщик!",
|
||||
"AccessDenied": "Доступ запрещен",
|
||||
"InvalidSkin": "That skin is invalid!",
|
||||
"HeaderInteriorTypes": "Interiors List",
|
||||
"ViewInventoryKeyPressTip": "Press {1} to see your items",
|
||||
"ViewInventoryCommandTip": "Use {1} to see your items",
|
||||
"GUIAccountSettingToggle": "You have turned {1} GUI",
|
||||
|
||||
"ADDED-23MAR2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations",
|
||||
"CarCommandHelp": "You can buy a car by visiting a vehicle dealership. Use {1} for more information.",
|
||||
"SkinCommandHelp": "You can change your skin by visiting a clothes store. Use {1} for more info.",
|
||||
"BusinessVehiclesRespawned": "All business vehicles have been respawned by an admin!",
|
||||
"JobVehiclesRespawned": "All job vehicles have been respawned by an admin!",
|
||||
"PlayerVehiclesRespawned": "All player vehicles have been respawned by an admin!",
|
||||
"ClanVehiclesRespawned": "All clan vehicles have been respawned by an admin!",
|
||||
"PublicVehiclesRespawned": "All public have been respawned by an admin!",
|
||||
"EmptyVehiclesRespawned": "All empty vehicles have been respawned by an admin!",
|
||||
"AllVehiclesRespawned": "All vehicles have been respawned by an admin!",
|
||||
"AllVehiclesReloaded": "All vehicles have been reloaded by an admin!",
|
||||
"YourVehicleRespawned": "Your vehicle has been respawned",
|
||||
"PlayerIPBanned": "{1} has been IP banned!",
|
||||
"PlayerCharacterBanned": "{1} has been character banned!",
|
||||
"PlayerSubNetBanned": "{1} has been subnet banned!",
|
||||
"CantModifyBusiness": "You can't manage or modify this business",
|
||||
"CantModifyHouse": "You can't manage or modify this house",
|
||||
"ServerTimeSet": "{1} set the time to {2}",
|
||||
"ServerWeatherSet": "{1} set the weather to {2}",
|
||||
"ServerSnowSet": "{1} turned falling snow {2} and ground snow {3}",
|
||||
"AllJobsReloaded": "All server jobs have been reloaded by an admin",
|
||||
"ServerLogoSet": "{1} turned the server logo image {2}",
|
||||
"ServerGUISet": "{1} turned GUI for this server {2}",
|
||||
"ServerBusinessBlipsSet": "{1} turned all business blips {2}",
|
||||
"ServerHouseBlipsSet": "{1} turned all house blips {2}",
|
||||
"ServerJobBlipsSet": "{1} turned all job blips {2}",
|
||||
"ServerBusinessPickupsSet": "{1} turned all business pickups {2}",
|
||||
"ServerHousePickupsSet": "{1} turned all house pickups {2}",
|
||||
"ServerJobPickupsSet": "{1} turned on all job pickups {2}",
|
||||
"BusinessBuyItemsLabel": "Use {1} to purchase items",
|
||||
"PropertyEnterCommandLabel": "Use {1} to enter",
|
||||
"PropertyEnterKeyPressLabel": "Press {1} to enter",
|
||||
"PropertyForSaleLabel": "For sale: ${1}",
|
||||
"PropertyForRentLabel": "For rent: ${1} every payday",
|
||||
"RemainingTaxPaidInMoney": "You covered the remaining taxes with ${1} in cash.",
|
||||
"LostMoneyFromTaxes": "You lost money since your taxes are more than your paycheck!",
|
||||
"NextPaycheckRepossessionWarning": "If you don't have enough cash to cover taxes on next paycheck, you will lose stuff!",
|
||||
"NotEnoughMoneyForTax": "You don't have enough money to cover your taxes!",
|
||||
"AssetsRepossessedForTax": "You lost {1} vehicles, {2} houses, and {3} businesses because you couldn't pay taxes!",
|
||||
"Closed": "Closed",
|
||||
"Open": "Open",
|
||||
"VehicleDealershipLabel": "Enter a vehicle as driver to buy it",
|
||||
"TakeJobLabel": "Use {1} to work here",
|
||||
"StartWorkLabel": "Use {1} to start working",
|
||||
"JobEquipAndUniformLabel": "Use {1} and {2} for job stuff, or {3} to stop working",
|
||||
"NotYourJobLabel": "You already have a different job. Use {1} if you want this one",
|
||||
"JobLabel": "{1} Job",
|
||||
"PaydayBonusSet": "{1} set the payday bonus to ${2}",
|
||||
"AllHousesReloaded": "All houses have been reloaded by an admin",
|
||||
"AllRadioStationsReloaded": "All radio stations have been reloaded by an admin!",
|
||||
"PlayerKicked": "{1} has been kicked from the server",
|
||||
"AllBusinessesReloaded": "All businesses have been reloaded by an admin!",
|
||||
"UnableToDoThat": "You aren't able to do that",
|
||||
"SetVehicleClanConfirmMessage": "Are you sure you want to give this vehicle to your clan?",
|
||||
"SetVehicleClanConfirmTitle": "Warning!",
|
||||
"SetItemPriceBelowOrderPriceMessage": "Are you sure you want to set the item price below it's order price? You will lose ${1} every purchase!",
|
||||
"SetItemPriceBelowOrderPriceTitle": "Warning!",
|
||||
"MustOwnVehicle": "You don't own this vehicle!"
|
||||
}
|
||||
@@ -1,458 +0,0 @@
|
||||
{
|
||||
"TranslationProvidedBy": "ZaKlaus",
|
||||
"LocaleEnglishName": "Slovak",
|
||||
|
||||
"LocaleNativeName": "Slovak",
|
||||
"LocaleOffer": "This server is available in Slovak. Use {1} to use it.",
|
||||
"LocaleChanged1": "Your language is now set to {1}",
|
||||
"LocaleChanged2": "The server will now display messages in {1}",
|
||||
"LocaleChangedNote": "This does not change messages from other players",
|
||||
"AccentsListHeader": "Accents",
|
||||
"HeaderHelpMainList": "Help Categories",
|
||||
"AccentNotFound": "Accent not found",
|
||||
"AccentSet": "You set your accent to {1}",
|
||||
"InvalidAnimation": "That animation doesn't exist",
|
||||
"AnimationCommandTip": "Use {1} to see a list of valid animations",
|
||||
"InvalidAnimationDistance": "The distance must be between 0 and 3",
|
||||
"AnimationStopCommandTip": "Use {1} to stop your animation",
|
||||
"CantBanClient": "You cannot ban this person",
|
||||
"PlayerAccountBanned": "{1} has been account banned",
|
||||
"ClanNotFound": "Clan not found",
|
||||
"ClanNameTaken": "A clan with that name already exists",
|
||||
"PlayerNotFound": "Player not found",
|
||||
"ClanCantRemoveRanks": "You can't remove clan ranks",
|
||||
"ClanCantAddRanks": "You can't add clan ranks",
|
||||
"ClanRankNotFound": "Clan rank not found",
|
||||
"ClanCantChangeMemberTag": "You can not change clan member's tags",
|
||||
"ClanPlayerNotInSameClan": "That player is not in your clan",
|
||||
"ClanCantChangeRankLevel": "You can not change clan rank's level",
|
||||
"ClanCantChangeRankTag": "You can not change clan rank's tags",
|
||||
"NameNotRegistered": "Your name is not registered! Use {1} to make an account.",
|
||||
"AutomaticLoginIPToggle": "Automatic login by IP is now {1}",
|
||||
"CouldNotRegisterAccount": "There was a problem creating your account. Please contact an admin.",
|
||||
"RandomTipsToggle": "Random tips are now {1}",
|
||||
"ActionTipsToggle": "Action tips are now {1}",
|
||||
"AutoSpawnLastCharToggle": "Automatic spawn as last used character is {1}",
|
||||
"AccountGUISettingToggle": "GUI is now {1}",
|
||||
"On": "On",
|
||||
"Off": "Off",
|
||||
"Yes": "Yes",
|
||||
"No": "No",
|
||||
"True": "True",
|
||||
"False": "False",
|
||||
"Locked": "Locked",
|
||||
"Unlocked": "Unlocked",
|
||||
"PasswordNotGoodEnough": "The new password must meet the requirements!",
|
||||
"PasswordNeedsBase": "Passwords must have at least {1}",
|
||||
"PasswordNeedsCapitals": "{1} capital letters",
|
||||
"PasswordNeedsNumbers": "{1} numbers",
|
||||
"PasswordNeedsSymbols": "{1} symbols",
|
||||
"PasswordsDontMatch": "The new password and confirm new password aren't the same!",
|
||||
"PasswordChanged": "Your password has been changed!",
|
||||
"AutoLoggedInIP": "You have been automatically logged in by IP!",
|
||||
"WelcomeBack": "Welcome back to {1}, {2}! Please {3} to continue.",
|
||||
"WelcomeNewPlayer": "Welcome to {1}, {2}! Please {3} to play.",
|
||||
"InvalidPlayer": "Player not found!",
|
||||
"InvalidBusiness": "Business not found!",
|
||||
"InvalidHouse": "House not found!",
|
||||
"InvalidVehicle": "Vehicle not found!",
|
||||
"InvalidClan": "Clan not found!",
|
||||
"InvalidClanRank": "Clan rank not found!",
|
||||
"InvalidJob": "Job not found!",
|
||||
"InvalidItem": "Item not found!",
|
||||
"InvalidItemType": "Item type not found!",
|
||||
"InvalidRadioStation": "Radio station not found!",
|
||||
"InvalidGate": "Gate not found!",
|
||||
"EntersProperty": "opens the door and enters the {1}",
|
||||
"ExitsProperty": "opens the door and exits the {1}",
|
||||
"EnterExitPropertyDoorLocked": "tries to open the {1} door but fails because it's locked",
|
||||
"PropertyNoInterior": "This {1} does not have an interior, but you can still use commands at the door icon.",
|
||||
"NoBusinessWithItemType": "There is no business with that item available",
|
||||
"HeaderKeyBinds": "Key Binds",
|
||||
"HeaderAccountHelp": "Account Help",
|
||||
"HeaderVehicleHelp": "Vehicle Help",
|
||||
"HeaderVehicleDealershipHelp": "Vehicle Dealership Help",
|
||||
"HeaderJobHelp": "Job Help",
|
||||
"HeaderChatHelp": "Chat Help",
|
||||
"HeaderServerRules": "Server Rules",
|
||||
"HeaderWebsiteInfo": "Website",
|
||||
"HeaderDiscordInfo": "Discord",
|
||||
"HeaderAnimationsList": "Animation List",
|
||||
"HeaderPayAndSprayHelp": "Pay and Spray Help",
|
||||
"HeaderAmmunationHelp": "Ammunation Help",
|
||||
"HeaderVehicleTuneupHelp": "Vehicle Tune Help",
|
||||
"HeaderBindableKeysHelp": "Bindable Keys",
|
||||
"HeaderSkinHelp": "Clothes/Skin Help",
|
||||
"HeaderBusinessHelp": "Business Help",
|
||||
"HeaderClanHelp": "Clan Help",
|
||||
"HeaderPlayerVehiclesList": "Player Vehicles ({1})",
|
||||
"HeaderPlayerBusinessesList": "Player Businesses ({1})",
|
||||
"HeaderClansList": "Clan List",
|
||||
"HeaderAdminsList": "Admin List",
|
||||
"HeaderBadgeInfo": "Badge Information",
|
||||
"HeaderAccentsList": "Accent List",
|
||||
"HeaderPlayerInfo": "Player Information ({1})",
|
||||
"HeaderWealthandTaxHelp": "Wealth and Tax Information",
|
||||
"HeaderCommandInfo": "Command Information ({1})",
|
||||
"HeaderRadioHelp": "Radio Help",
|
||||
"HeaderRadioStationsList": "Radio Stations",
|
||||
"HeaderKeyBindsList": "Key Binds List",
|
||||
"RadioVolumeChanged": "{1} You changed your streaming radio volume to {2}%",
|
||||
"VolumeLevelNotNumber": "The volume level must be a number",
|
||||
"RadioStationLocationInvalid": "You must be in a vehicle, house, or business or have a personal device to change the station!",
|
||||
"ActionBusinessRadioStationChange": "changes the business radio station to {1} ({2})",
|
||||
"ActionHouseRadioStationChange": "changes the house radio station to {1} ({2})",
|
||||
"ActionVehicleRadioStationChange": "changes the vehicle radio station to {1} ({2})",
|
||||
"ActionItemRadioStationChange": "changes the {1}'s station to {2} ({3})",
|
||||
"RandomVehicleCommandsDisabled": "This is a random traffic vehicle and commands can't be used for it.",
|
||||
"HouseDoorLock": "House {1} {2}!",
|
||||
"BusinessDoorLock": "Business {1} {2}!",
|
||||
"ServerGameModeRestarting": "The server game mode is restarting!",
|
||||
"HeaderSelfItemList": "Your Inventory",
|
||||
"HeaderPlayerItemList": "Player Inventory ({1})",
|
||||
"HeaderHouseItemList": "House Inventory",
|
||||
"HeaderBusinessFloorItemList": "Business Inventory (For Sale)",
|
||||
"HeaderBusinessStorageItemList": "Business Inventory (Storage)",
|
||||
"HeaderItemItemList": "{1}'s Inventory",
|
||||
"ItemSlotNotNumber": "The item slot must be a number",
|
||||
"ItemSlotMustBeBetween": "The item slot must be between {1} and {2}!",
|
||||
"UseItemBugged": "The item you're trying to use is bugged. A bug report has been sent to the server developers.",
|
||||
"PickupItemBugged": "The item you're trying to pickup is bugged. A bug report has been sent to the server developers.",
|
||||
"DropItemBugged": "The item you're trying to drop is bugged. A bug report has been sent to the server developers.",
|
||||
"HandsBusy": "Your hands are busy",
|
||||
"CantUseItemInSkinChange": "You can't use an item while customizing your appearance",
|
||||
"CantDropItemInSkinChange": "You can't drop an item while customizing your appearance",
|
||||
"CantPickupItemInSkinChange": "You can't pickup an item while customizing your appearance",
|
||||
"CantSwitchItemInSkinChange": "You can't switch an item while customizing your appearance",
|
||||
"CantGiveItemInSkinChange": "You can't give an item while customizing your appearance",
|
||||
"CantTakeItemInSkinChange": "You can't take an item while customizing your appearance",
|
||||
"ItemUnequippableNoAmmo": "The {1} in slot {2} has no ammo, and can't be equipped!",
|
||||
"NoSpaceSelfInventory": "You don't have any more space in your inventory",
|
||||
"Business": "business",
|
||||
"House": "house",
|
||||
"Clan": "clan",
|
||||
"Vehicle": "vehicle",
|
||||
"Item": "item",
|
||||
"ItemType": "item type",
|
||||
"Gate": "gate",
|
||||
"Door": "door",
|
||||
"ClanRank": "clan rank",
|
||||
"JobRank": "job rank",
|
||||
"RadioStation": "radio station",
|
||||
"Months": [
|
||||
"January",
|
||||
"February",
|
||||
"March",
|
||||
"April",
|
||||
"May",
|
||||
"June",
|
||||
"July",
|
||||
"August",
|
||||
"September",
|
||||
"October",
|
||||
"November",
|
||||
"December"
|
||||
],
|
||||
"WeekDays": [
|
||||
"Sunday",
|
||||
"Monday",
|
||||
"Tuesday",
|
||||
"Wednesday",
|
||||
"Thursday",
|
||||
"Friday",
|
||||
"Saturday"
|
||||
],
|
||||
"CardinalDirections": [
|
||||
"North",
|
||||
"Northeast",
|
||||
"East",
|
||||
"Southeast",
|
||||
"South",
|
||||
"Southwest",
|
||||
"West",
|
||||
"Northwest"
|
||||
],
|
||||
"NewPlayerReadyToPlay": [
|
||||
"You have been given some cash. Use {1} to find places to buy items.",
|
||||
"If you need money, jobs are the yellow dots on the radar.",
|
||||
"For a car, visit the car dealership. You can also use a rental vehicle near spawn or take the train",
|
||||
"Be sure to read the {1} and use {2} for info."
|
||||
],
|
||||
"YourCurrentVehicleDeleted": "The vehicle you were in was deleted.",
|
||||
"Distance": "Distance",
|
||||
"Meters": "Meters",
|
||||
"Feet": "Feet",
|
||||
"Kilometers": "Kilometers",
|
||||
"Miles": "Miles",
|
||||
"MustBeVehicleDriver": "You must be the driver of the vehicle!",
|
||||
"PlayerJoinedServer": "{1} has joined the game from {1}!",
|
||||
"PlayerLeftServer": "{1} has left the game! ({1})",
|
||||
"DisconnectReasons": [
|
||||
"Lost Connection",
|
||||
"Disconnected",
|
||||
"Unsupported Client",
|
||||
"Wrong Game",
|
||||
"Incorrect Password",
|
||||
"Unsupported Executable",
|
||||
"Disconnected",
|
||||
"Banned",
|
||||
"Failed",
|
||||
"Invalid Name",
|
||||
"Crashed"
|
||||
],
|
||||
"TakeItemFromHouse": "takes a {1} from the house",
|
||||
"TakeItemFromBusinessStorage": "takes a {1} from the business storage",
|
||||
"TakeItemFromBusiness": "takes a {1} from the business",
|
||||
"TakeItemFromItem": "takes a {1} from the {2}",
|
||||
"TakeItemFromVehicleTrunk": "takes a {1} from the trunk",
|
||||
"TakeItemFromVehicleDash": "takes a {1} from the glove compartment",
|
||||
"JobEquipmentInventoryKeyBindTip": "The job equipment is in your inventory. Press {1} to see them.",
|
||||
"JobEquipmentInventoryCommandTip": "The job equipment is in your inventory. Use {1} to see them.",
|
||||
"AccountHelp": [
|
||||
"Do NOT share your password with anybody else. {1} staff will never ask you for your password",
|
||||
"Use {1} to change your password, and {2} if you forgot it",
|
||||
"Some settings you can use: {1}"
|
||||
],
|
||||
"VehicleHelp": [
|
||||
"Your personal vehicles will save wherever you or somebody else leaves them!",
|
||||
"Visit dealerships to buy new vehicles (Use {1} for more information)",
|
||||
"Some commands: {1}",
|
||||
"Visit a mechanic garage to repair, colour, and tune up your car! {1} for info"
|
||||
],
|
||||
"VehicleDealershipHelp": [
|
||||
"Visit a vehicle dealer to buy new vehicles. Use {1} to find one.",
|
||||
"At the dealer, enter a car you want to buy, and the price will be shown to you",
|
||||
"If you want to buy the vehicle, use {1} and you will be given keys to test drive it around the parking lot.",
|
||||
"Drive away from the dealership with the new vehicle to confirm the purchase."
|
||||
],
|
||||
"JobHelp": [
|
||||
"Visit job locations to get a job and earn money. Look for yellow spots on the map",
|
||||
"At a job location, use {1} to get the job. Use {2} to quit your job",
|
||||
"Use {1} to begin working. You can also get a job {2} and {3}",
|
||||
"Most job vehicles are locked. Use {1} near one to enter it.",
|
||||
"When entering a job vehicle, information on how to do the job will be shown to you."
|
||||
],
|
||||
"ChatHelp": [
|
||||
"There are two main types of chat: out-of-character (OOC) and in-character (IC)",
|
||||
"Mixing these two types is not proper roleplay. See {1} for info.",
|
||||
"Some chat commands: {1}",
|
||||
"Some have shorter names available ({1} to talk, {2} to shout, etc)"
|
||||
],
|
||||
"ServerRulesHelp": [
|
||||
"Unrealistic actions (powergaming) are not allowed. You aren't superman.",
|
||||
"No terrorist or terrorism roleplay is allowed.",
|
||||
"Always follow instructions given by moderators and admins.",
|
||||
"Do not mix the chats (metagaming). You can't use info in IC that was received OOC",
|
||||
"Keep English in main chats. If you aren't good at English, use {1}"
|
||||
],
|
||||
"AnimationHelp": [
|
||||
"Animations allow you to enhance roleplay with visual actions",
|
||||
"Use {1} or {2} with a name to use an animation.",
|
||||
"To see a list of animations, use {1}"
|
||||
],
|
||||
"WeaponHelp": [
|
||||
"Visit an gun store to buy weapons. Use {1} to find one.",
|
||||
"Buying a weapon requires a weapon license.",
|
||||
"Weapon licenses are managed by the police department. Apply there to get one.",
|
||||
"Weapons can also be purchased illegally from some businesses, weapon dealers, and clans."
|
||||
],
|
||||
"SkinHelp": [
|
||||
"At a clothing store, use {1} to purchase clothes",
|
||||
"When you have a clothing item, equip and use it like any other item to show the skin selection (check {1} to learn how to use items)",
|
||||
"Some skins are restricted to jobs, clans, or for other reasons."
|
||||
],
|
||||
"KeyBindHelp": [
|
||||
"You can set your own key binds. Use {1} to see your binded keys.",
|
||||
"Use {1} to add a new keybind and {2} to remove one.",
|
||||
"Default keys are: {1} for vehicle engine, {2} for lights, and {3} for lock/unlock",
|
||||
"Press {1} to see your items and {2} to equip an item or {3} to unequip all.",
|
||||
"Press {1} to use the item you're holding, press {2} to drop it, or press {3} to pickup an item from the ground."
|
||||
],
|
||||
"BusinessHelp": [
|
||||
"Use {1} to purchase items or {2} to see a list of what's for sale at any business",
|
||||
"Businesses are shown with blue names above the icon at their entrance.",
|
||||
"Business owner commands: {1}",
|
||||
"A new car for sale will appear when you drive away from the dealer."
|
||||
],
|
||||
"ClanHelp": [
|
||||
"Ask an administrator to create a clan (Similar to factions/groups/families)",
|
||||
"Clan owners have full control over their clan once it's created",
|
||||
"Clan commands: {1}",
|
||||
"More clan commands: {1}"
|
||||
],
|
||||
"RadioStationHelp": [
|
||||
"Use {1} to set the station for your vehicle, house, or business",
|
||||
"Use {2} to see a list of stations",
|
||||
"You can change your radio streaming volume using {1} with 0-100 as the percent"
|
||||
],
|
||||
"WealthAndTaxHelp": [
|
||||
"Your taxes on payday are {1} percent of your calculated wealth.",
|
||||
"Your calculated wealth is a total sum based on how many vehicles, houses, and businesses you have.",
|
||||
"Each vehicle is {1}, each house is {2}, and each business is {3}",
|
||||
"Use {1} to see your current wealth, and {2} to see how much you'll pay in tax each payday"
|
||||
],
|
||||
"MustBeInAVehicle": "You need to be in a vehicle!",
|
||||
"MustBeInOrNearVehicle": "You need to be in or near a vehicle!",
|
||||
"MustBeInVehicleFrontSeat": "You need to be in the vehicle front seats!",
|
||||
"MustBeInVehicleDriverSeat": "You need to be the driver!",
|
||||
"DontHaveVehicleKey": "You don't have a key for this vehicle!",
|
||||
"NoGateAccess": "You don't have access to this gate!",
|
||||
"GateBroken": "This gate is broken!",
|
||||
"GateHacked": "The gate does not respond!",
|
||||
"RadioJammed": "You hear only static from the radio.",
|
||||
"VehicleNotForSale": "This vehicle is not for sale!",
|
||||
"VehicleNotForRent": "This vehicle is not for rent!",
|
||||
"BusinessNotForSale": "This business is not for sale!",
|
||||
"BusinessNotForRent": "This business is not for rent!",
|
||||
"HouseNotForSale": "This house is not for sale!",
|
||||
"HouseNotForRent": "This house is not for rent!",
|
||||
"DealershipPurchaseTestDrive": "Drive the vehicle away from the dealership to buy it, or get out to cancel.",
|
||||
"DealershipPurchaseExitedVehicle": "You canceled the vehicle purchase by exiting the vehicle!",
|
||||
"VehiclePurchaseComplete": "This vehicle is now yours! It will save wherever you leave it.",
|
||||
"VehiclePurchaseNotEnoughMoney": "You don't have enough money to buy this vehicle!",
|
||||
"HousePurchaseNotEnoughMoney": "You don't have enough money to buy this house!",
|
||||
"BusinessPurchaseNotEnoughMoney": "You don't have enough money to buy this business!",
|
||||
"Locales": {
|
||||
"English": "English",
|
||||
"Russian": "Russian",
|
||||
"Spanish": "Spanish",
|
||||
"German": "German",
|
||||
"Dutch": "Dutch",
|
||||
"Polish": "Polish"
|
||||
},
|
||||
|
||||
"ADDED-21JAN2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
|
||||
"HeaderPlayerHousesList": "Player Houses ({1})",
|
||||
"HeaderPlayerStaffFlagsList": "Player Staff Flags ({1})",
|
||||
"HeaderStaffFlagsList": "Staff Flags",
|
||||
"NonRPName": "Non-RP name! Choose a new one:",
|
||||
"InvalidStaffFlag": "Staff flag not found!",
|
||||
"InvalidClanFlag": "Clan flag not found!",
|
||||
"InvalidLocale": "Language not found!",
|
||||
"HeaderJobUniformList": "Job Uniforms ({1})",
|
||||
"HeaderJobEquipmentList": "Job Equipment ({1})",
|
||||
"InvalidJobUniform": "Job uniform not found!",
|
||||
"InvalidJobEquipment": "Job equipment not found!",
|
||||
"HeaderVehiclesInRangeList": "Vehicles within {1}",
|
||||
"NoVehiclesWithInRange": "There are no vehicles within {1}",
|
||||
"AmountNotNumber": "The amount must be a number!",
|
||||
"NeedToBeWorking": "You need to be working! Use {1} at a job location or near a job vehicle.",
|
||||
"NeedToBeOnJobRoute": "You need to be doing a job route! Use {1} in a job vehicle",
|
||||
"CurrentJobRouteDeleted": "The job route you were on has been deleted by an admin",
|
||||
"CurrentJobRouteVehicleColoursChanged": "Your job route's vehicle colours were changed by an admin",
|
||||
"NotYourJob": "This is not your job!",
|
||||
"JobPoints": "You can get a job by going the yellow points on the map.",
|
||||
"QuitJobToTakeAnother": "If you want this job, use {1} to quit your current job.",
|
||||
"NotAJobVehicle": "This is not a job vehicle!",
|
||||
"NotYourJobVehicle": "This is not your job's vehicle!",
|
||||
"JobRouteDisabled": "The job route you were on has been disabled by an admin",
|
||||
"HeaderPickupTypes": "Pickup Types",
|
||||
"HeaderBlipTypes": "Map Icon Types",
|
||||
"InvalidGPSLocation": "There are no locations with that name or type",
|
||||
"HeaderBusinessList": "Businesses",
|
||||
"VehicleForSale": "This {1} is buyable for {2}! Use {3} if you want to buy it",
|
||||
"VehicleForRent": "This {1} is rentable for {2}! Use {3} if you want to rent it",
|
||||
|
||||
"ADDED-31JAN2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
|
||||
"LoginFailedInvalidPassword": "Invalid password! {1} attempts remaining",
|
||||
"LoginFailedNoPassword": "You must enter a password! ! {1} attempts remaining",
|
||||
"RegistrationFailedNoPassword": "You must enter a password!",
|
||||
"RegistrationFailedNoPasswordConfirm": "You must confirm the password!",
|
||||
"RegistrationFailedNoEmail": "You must enter an email!",
|
||||
"AccountNameAlreadyRegistered": "Your name is already registered!",
|
||||
"AlreadyLoggedIn": "You are already logged in!",
|
||||
"RegistrationFailedInvalidEmail": "That email is invalid!",
|
||||
"RegistrationFailedPasswordMismatch": "The passwords don't match!",
|
||||
"RegistrationFailedCreateError": "Your account couldn't be created!",
|
||||
"RegistrationSuccess": "Your account has been created!",
|
||||
"RegistrationEmailVerifyReminder": "Don't forget to verify your email! A verification code has been sent to you.",
|
||||
"RegistrationCreateCharReminder": "To play on the server, you will need to make a character.",
|
||||
"NoCharactersGUIMessage": "You have no characters. Would you like to make one?",
|
||||
"NoCharactersGUIWindowTitle": "No characters",
|
||||
"NoCharactersChatMessage": "You have no characters. Use {1} to make one.",
|
||||
"NeedEmailFor2FA": "You need to add your email to your account to use two-factor authentication.",
|
||||
"NeedEmailVerifiedFor2FA": "You need to verify your email to use two-factor authentication.",
|
||||
"SetEmailHelpTip": "Use {1} to set your email.",
|
||||
"VerifyEmailHelpTip": "Use {1} to verify your email.",
|
||||
|
||||
"ADDED-13FEB2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
|
||||
"NearbyRadio": "Nearby radio",
|
||||
"FromRadio": "From radio",
|
||||
"ToRadio": "To radio",
|
||||
"NeedToEnterPropertyCommand": "You need to enter the {1} first! Use {2} to enter and exit",
|
||||
"NeedToEnterPropertyKeyPress": "You need to enter the {1} first! Press {2} to enter and exit",
|
||||
"InventoryFullCantCarry": "You don't have any space to carry this (full inventory)!",
|
||||
"NotEnoughCashNeedAmountMore": "You don't have enough money! You need {1} more!",
|
||||
"AmountMustBeMoreThan": "The amount must be more than {1}!",
|
||||
"WeaponBanned": "You are not allowed to buy or use weapons!",
|
||||
"TimeNotNumber": "The time must be a number",
|
||||
"HeaderDefaultBusinessItemTypes": "Business Item Templates",
|
||||
"FixingStuck": "Fixing your position and virtual world ...",
|
||||
"CantUseCommandYet": "You must wait before you can use this command again!",
|
||||
"NotATester": "You are not a tester!",
|
||||
"AccessDenied": "AccessDenied",
|
||||
"InvalidSkin": "That skin is invalid!",
|
||||
"HeaderInteriorTypes": "Interiors List",
|
||||
"ViewInventoryKeyPressTip": "Press {1} to see your items",
|
||||
"ViewInventoryCommandTip": "Use {1} to see your items",
|
||||
"GUIAccountSettingToggle": "You have turned {1} GUI",
|
||||
|
||||
"ADDED-23MAR2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations",
|
||||
"CarCommandHelp": "You can buy a car by visiting a vehicle dealership. Use {1} for more information.",
|
||||
"SkinCommandHelp": "You can change your skin by visiting a clothes store. Use {1} for more info.",
|
||||
"BusinessVehiclesRespawned": "All business vehicles have been respawned by an admin!",
|
||||
"JobVehiclesRespawned": "All job vehicles have been respawned by an admin!",
|
||||
"PlayerVehiclesRespawned": "All player vehicles have been respawned by an admin!",
|
||||
"ClanVehiclesRespawned": "All clan vehicles have been respawned by an admin!",
|
||||
"PublicVehiclesRespawned": "All public have been respawned by an admin!",
|
||||
"EmptyVehiclesRespawned": "All empty vehicles have been respawned by an admin!",
|
||||
"AllVehiclesRespawned": "All vehicles have been respawned by an admin!",
|
||||
"AllVehiclesReloaded": "All vehicles have been reloaded by an admin!",
|
||||
"YourVehicleRespawned": "Your vehicle has been respawned!",
|
||||
"PlayerIPBanned": "{1} has been IP banned!",
|
||||
"PlayerCharacterBanned": "{1} has been character banned!",
|
||||
"PlayerSubNetBanned": "{1} has been subnet banned!",
|
||||
"CantModifyBusiness": "You can't manage or modify this business!",
|
||||
"CantModifyHouse": "You can't manage or modify this house!",
|
||||
"ServerTimeSet": "{1} set the time to {2}",
|
||||
"ServerWeatherSet": "{1} set the weather to {2}",
|
||||
"ServerSnowSet": "{1} turned falling snow {2} and ground snow {3}",
|
||||
"AllJobsReloaded": "All server jobs have been reloaded by an admin",
|
||||
"ServerLogoSet": "{1} turned the server logo image {2}",
|
||||
"ServerGUISet": "{1} turned GUI for this server {2}",
|
||||
"ServerBusinessBlipsSet": "{1} turned all business blips {2}",
|
||||
"ServerHouseBlipsSet": "{1} turned all house blips {2}",
|
||||
"ServerJobBlipsSet": "{1} turned all job blips {2}",
|
||||
"ServerBusinessPickupsSet": "{1} turned all business pickups {2}",
|
||||
"ServerHousePickupsSet": "{1} turned all house pickups {2}",
|
||||
"ServerJobPickupsSet": "{1} turned on all job pickups {2}",
|
||||
"BusinessBuyItemsLabel": "Use {1} to purchase items",
|
||||
"PropertyEnterCommandLabel": "Use {1} to enter",
|
||||
"PropertyEnterKeyPressLabel": "Press {1} to enter",
|
||||
"PropertyForSaleLabel": "For sale: ${1}",
|
||||
"PropertyForRentLabel": "For rent: ${1} every payday",
|
||||
"RemainingTaxPaidInMoney": "You covered the remaining taxes with ${1} in cash.",
|
||||
"LostMoneyFromTaxes": "You lost money since your taxes are more than your paycheck!",
|
||||
"NextPaycheckRepossessionWarning": "If you don't have enough cash to cover taxes on next paycheck, you will lose stuff!",
|
||||
"NotEnoughMoneyForTax": "You don't have enough money to cover your taxes!",
|
||||
"AssetsRepossessedForTax": "You lost {1} vehicles, {2} houses, and {3} businesses because you couldn't pay taxes!",
|
||||
"Closed": "Closed",
|
||||
"Open": "Open",
|
||||
"VehicleDealershipLabel": "Enter a vehicle as driver to buy it",
|
||||
"TakeJobLabel": "Use {1} to work here",
|
||||
"StartWorkLabel": "Use {1} to start working",
|
||||
"JobEquipAndUniformLabel": "Use {1} and {2} for job stuff, or {3} to stop working",
|
||||
"NotYourJobLabel": "You already have a different job. Use {1} if you want this one",
|
||||
"JobLabel": "{1} Job",
|
||||
"PaydayBonusSet": "{1} set the payday bonus to ${2}",
|
||||
"AllHousesReloaded": "All houses have been reloaded by an admin",
|
||||
"AllRadioStationsReloaded": "All radio stations have been reloaded by an admin!",
|
||||
"PlayerKicked": "{1} has been kicked from the server",
|
||||
"AllBusinessesReloaded": "All businesses have been reloaded by an admin!",
|
||||
"UnableToDoThat": "You aren't able to do that",
|
||||
"SetVehicleClanConfirmMessage": "Are you sure you want to give this vehicle to your clan?",
|
||||
"SetVehicleClanConfirmTitle": "Warning!",
|
||||
"SetItemPriceBelowOrderPriceMessage": "Are you sure you want to set the item price below it's order price? You will lose ${1} every purchase!",
|
||||
"SetItemPriceBelowOrderPriceTitle": "Warning!",
|
||||
"MustOwnVehicle": "You don't own this vehicle!"
|
||||
}
|
||||
@@ -1,462 +0,0 @@
|
||||
{
|
||||
"TranslationProvidedBy": "PerikiyoXD",
|
||||
"LocaleEnglishName": "Spanish",
|
||||
|
||||
"LocaleNativeName": "Español",
|
||||
"LocaleOffer": "Este servidor se encuentra disponible en Español. Utilice {1} para usarlo",
|
||||
"LocaleChanged1": "El idioma se ha configurado a {1}",
|
||||
"LocaleChanged2": "El servidor mostrará los mensajes en {1}",
|
||||
"LocaleChangedNote": "Esto no cambia los mensajes de otros jugadores",
|
||||
"AccentsListHeader": "Acentos",
|
||||
"HelpListHeader": "Categorías de ayuda",
|
||||
"HelpSkinHeader": "Ayuda de personajes",
|
||||
"HelpVehicleHeader": "Ayuda de vehículos",
|
||||
"HelpBusinessHeader": "Ayuda de negocios",
|
||||
"HelpHouseHeader": "Ayuda de casas",
|
||||
"HelpRadioHeader": "Ayuda de radio",
|
||||
"HelpAnimationHeader": "Ayuda de animaciones",
|
||||
"AccentNotFound": "Acento no encontrado",
|
||||
"AccentSet": "Acento establecido como {1}",
|
||||
"InvalidAnimation": "Esa animación no existe",
|
||||
"AnimationCommandTip": "Usa {1} para ver la lista de animaciones",
|
||||
"InvalidAnimationDistance": "La distancia debe ser un numero entre el 0 y el 3",
|
||||
"AnimationStopCommandTip": "Usa {1} para detener la animación actual",
|
||||
"CantBanClient": "No se puede vetar a esta persona",
|
||||
"PlayerAccountBanned": "La cuenta de {1} ha sido vetada",
|
||||
"ClanNotFound": "Clan no encontrado",
|
||||
"ClanNameTaken": "Ya existe un clan con ese nombre",
|
||||
"PlayerNotFound": "Jugador no encontrado",
|
||||
"ClanCantRemoveRanks": "No puedes eliminar rangos del clan",
|
||||
"ClanCantAddRanks": "No puedes añadir rangos del clan",
|
||||
"ClanRankNotFound": "No se encontró el rango del clan indicado",
|
||||
"ClanCantChangeMemberTag": "No puedes cambiar las etiquetas del miembro del clan",
|
||||
"ClanPlayerNotInSameClan": "El jugador indicado no está en tu clan",
|
||||
"ClanCantChangeRankLevel": "No puedes cambiar el nivel del rango del clan",
|
||||
"ClanCantChangeRankTag": "No puedes cambiar la etiqueta del rango del clan",
|
||||
"NameNotRegistered": "¡Tu nombre no está registrado! Usa {1} para crear una cuenta",
|
||||
"AutomaticLoginIPToggle": "Se ha {1} el inicio de sesión automático por IP",
|
||||
"CouldNotRegisterAccount": "Hubo un problema al crear su cuenta. Por favor, póngase en contacto con un administrador",
|
||||
"RandomTipsToggle": "Se han {1} los Consejos aleatorios",
|
||||
"ActionTipsToggle": "Se han {1} los Consejos de acción",
|
||||
"AutoSpawnLastCharToggle": "Se ha {1} reaparecer con el ultimo personaje usado",
|
||||
"AccountGUISettingToggle": "Se ha {1} la Interfaz de Usuario",
|
||||
"On": "Encendido",
|
||||
"Off": "Apagado",
|
||||
"Yes": "Si",
|
||||
"No": "No",
|
||||
"True": "True",
|
||||
"False": "False",
|
||||
"Locked": "Locked",
|
||||
"Unlocked": "Unlocked",
|
||||
"PasswordNotGoodEnough": "La nueva contraseña debe cumplir los requisitos",
|
||||
"PasswordNeedsBase": "Las contraseñas deben tener al menos {1}",
|
||||
"PasswordNeedsCapitals": "{1} letras mayúsculas",
|
||||
"PasswordNeedsNumbers": "{1} números",
|
||||
"PasswordNeedsSymbols": "{1} símbolos",
|
||||
"PasswordsDontMatch": "La nueva contraseña y la confirmación de la nueva contraseña no son iguales.",
|
||||
"PasswordChanged": "Su contraseña ha sido cambiada",
|
||||
"AutoLoggedInIP": "Ha iniciado la sesion automáticamente por su IP",
|
||||
"WelcomeBack": "¡Bienvenidos de nuevo a {1}, {2}! Por favor, {3} para continuar",
|
||||
"WelcomeNewPlayer": "¡Bienvenido a {1}, {2}! Por favor, {3} para jugar",
|
||||
"InvalidPlayer": "Jugador no encontrado",
|
||||
"InvalidBusiness": "Negocio no encontrada",
|
||||
"InvalidHouse": "Casa no encontrada",
|
||||
"InvalidVehicle": "Vehículo no encontrado",
|
||||
"InvalidClan": "Clan no encontrado",
|
||||
"InvalidClanRank": "Rango del clan no encontrado",
|
||||
"InvalidJob": "Trabajo no encontrado",
|
||||
"InvalidItem": "Objeto no encontrado",
|
||||
"InvalidItemType": "Tipo de objeto no encontrado",
|
||||
"InvalidRadioStation": "Estación de radio no encontrada",
|
||||
"InvalidGate": "Puerta no encontrada",
|
||||
"EntersProperty": "abre la puerta y entra en el {1}",
|
||||
"ExitsProperty": "abre la puerta y sale del {1}",
|
||||
"EnterExitPropertyDoorLocked": "intenta abrir la puerta {1} pero no lo consigue porque está cerrada",
|
||||
"PropertyNoInterior": "Este {1} no tiene un interior, pero todavía puede utilizar los comandos en el icono de la puerta",
|
||||
"NoBusinessWithItemType": "No hay ningun negocio con ese objeto disponible",
|
||||
"HeaderKeyBinds": "Atajos de teclado",
|
||||
"HeaderAccountHelp": "Account Help",
|
||||
"HeaderVehicleHelp": "Vehicle Help",
|
||||
"HeaderVehicleDealerships": "Ayuda del Concesionario de Vehiculos",
|
||||
"HeaderJobHelp": "Ayuda del Trabajo",
|
||||
"HeaderChatHelp": "Ayuda del Chat",
|
||||
"HeaderServerRules": "Reglas del Servidor",
|
||||
"HeaderWebsiteInfo": "Sitio Web",
|
||||
"HeaderDiscordInfo": "Discord",
|
||||
"HeaderAnimationsList": "Lista de animaciones",
|
||||
"HeaderPayAndSprayHelp": "Ayuda de 'Pay and Spray'",
|
||||
"HeaderAmmunationHelp": "Ayuda de 'Ammunation'",
|
||||
"HeaderVehicleTuneupHelp": "Ayuda de Puesta a punto del vehículo",
|
||||
"HeaderBindableKeysHelp": "Atajos de teclado",
|
||||
"HeaderSkinHelp": "Ayuda de Ropa/Personaje",
|
||||
"HeaderBusinessHelp": "Ayuda del negocio",
|
||||
"HeaderClanHelp": "Ayuda del clan",
|
||||
"HeaderPlayerVehiclesList": "Vehiculos del jugador ({1})",
|
||||
"HeaderPlayerBusinessesList": "Negocios del jugador ({1})",
|
||||
"HeaderClansList": "Lista de clanes",
|
||||
"HeaderAdminsList": "Lista de administradores",
|
||||
"HeaderBadgeInfo": "Información de la placa",
|
||||
"HeaderAccentsList": "Lista de acentos",
|
||||
"HeaderPlayerInfo": "Información del jugador ({1})",
|
||||
"HeaderWealthandTaxHelp": "Información sobre el patrimonio y los impuestos",
|
||||
"HeaderCommandInfo": "Información de comando ({1})",
|
||||
"HeaderRadioHelp": "Ayuda para la radio",
|
||||
"HeaderRadioStationsList": "Emisoras de radio",
|
||||
"HeaderKeyBindsList": "Lista de atajos de teclado",
|
||||
"RadioVolumeChanged": "{1} Has cambiado el volumen de tu radio en directo a {2}%",
|
||||
"VolumeLevelNotNumber": "El volumen debe ser un número",
|
||||
"RadioStationLocationInvalid": "Debe estar en un vehículo, casa o negocio o tener un dispositivo personal para cambiar la emisora",
|
||||
"ActionBusinessRadioStationChange": "cambia la emisora de la radio del negocio a {1} ({2})",
|
||||
"ActionHouseRadioStationChange": "cambia la emisora de la radio de la casa a {1} ({2})",
|
||||
"ActionVehicleRadioStationChange": "cambia la emisora de la radio del vehículo a {1} ({2})",
|
||||
"ActionItemRadioStationChange": "cambia la estación de {1} a {2} ({3})",
|
||||
"RandomVehicleCommandsDisabled": "Este es un vehículo de tráfico aleatorio y los comandos no se pueden utilizar en él",
|
||||
"HouseDoorLock": "Casa {1} {2}!",
|
||||
"BusinessDoorLock": "Negocio {1} {2}!",
|
||||
"ServerGameModeRestarting": "El modo de juego del servidor se reinicia",
|
||||
"HeaderSelfItemList": "Su inventario",
|
||||
"HeaderPlayerItemList": "Inventario del jugador ({1})",
|
||||
"HeaderHouseItemList": "Inventario de la casa",
|
||||
"HeaderBusinessFloorItemList": "Inventario del negocio (En venta)",
|
||||
"HeaderBusinessStorageItemList": "Inventario del negocio (Almacén)",
|
||||
"HeaderItemItemList": "Inventario de {1}",
|
||||
"ItemSlotNotNumber": "La ranura del objeto debe ser un número",
|
||||
"ItemSlotMustBeBetween": "La ranura del objeto debe ser un número entre {1} y {2}!",
|
||||
"UseItemBugged": "El objeto que intentas utilizar tiene un error. Se ha enviado un informe de error a los desarrolladores del servidor",
|
||||
"PickupItemBugged": "El objeto que intentas recoger tiene un error. Se ha enviado un informe de error a los desarrolladores del servidor",
|
||||
"DropItemBugged": "El objeto que intentas soltar tiene un error. Se ha enviado un informe de error a los desarrolladores del servidor",
|
||||
"HandsBusy": "Tus manos están ocupadas",
|
||||
"CantUseItemInSkinChange": "No puedes usar un objeto mientras personalizas tu apariencia",
|
||||
"CantDropItemInSkinChange": "No puedes soltar un objeto mientras personalizas tu apariencia",
|
||||
"CantPickupItemInSkinChange": "No puedes recoger un objeto mientras personalizas tu apariencia",
|
||||
"CantSwitchItemInSkinChange": "No puedes cambiar de objeto mientras se personaliza la apariencia",
|
||||
"CantGiveItemInSkinChange": "No puedes dar un objeto mientras personalizas tu apariencia",
|
||||
"CantTakeItemInSkinChange": "No puedes coger un objeto mientras personalizas tu apariencia",
|
||||
"ItemUnequippableNoAmmo": "{1} (ranura {2}) no tiene munición y no puede equiparse",
|
||||
"NoSpaceSelfInventory": "No tienes más espacio en tu inventario",
|
||||
"Business": "negocio",
|
||||
"House": "casa",
|
||||
"Clan": "clan",
|
||||
"Vehicle": "vehiculo",
|
||||
"Item": "objeto",
|
||||
"ItemType": "tipo de objeto",
|
||||
"Gate": "portón",
|
||||
"Door": "puerta",
|
||||
"ClanRank": "rango del clan",
|
||||
"JobRank": "rango del trabajo",
|
||||
"RadioStation": "estación de radio",
|
||||
"Months": [
|
||||
"Enero",
|
||||
"Febrero",
|
||||
"Marzo",
|
||||
"Abril",
|
||||
"Mayo",
|
||||
"Junio",
|
||||
"Julio",
|
||||
"Agosto",
|
||||
"Septiembre",
|
||||
"Octubre",
|
||||
"Noviembre",
|
||||
"Diciembre"
|
||||
],
|
||||
"WeekDays": [
|
||||
"Domingo",
|
||||
"Lunes",
|
||||
"Martes",
|
||||
"Miércoles",
|
||||
"Jueves",
|
||||
"Viernes",
|
||||
"Sábado"
|
||||
],
|
||||
"CardinalDirections": [
|
||||
"Norte",
|
||||
"Noreste",
|
||||
"Este",
|
||||
"Sureste",
|
||||
"Sur",
|
||||
"Suroeste",
|
||||
"Oeste",
|
||||
"Noroeste"
|
||||
],
|
||||
"NewPlayerReadyToPlay": [
|
||||
"Te han dado algo de dinero. Usa {1} para encontrar lugares donde comprar artículos",
|
||||
"Si necesitas dinero, los trabajos son los puntos amarillos del radar",
|
||||
"Para conseguir un coche, visita el concesionario de coches. También puedes utilizar un vehículo de alquiler cerca del punto de aparición o tomar el tren",
|
||||
"Asegúrese de leer el {1} y utilizar el {2} para obtener información"
|
||||
],
|
||||
"YourCurrentVehicleDeleted": "El vehículo en el que estabas fue eliminado",
|
||||
"Distance": "Distancia",
|
||||
"Meters": "Metros",
|
||||
"Feet": "Pies",
|
||||
"Kilometers": "Kilómetros",
|
||||
"Miles": "Millas",
|
||||
"MustBeVehicleDriver": "¡Debes ser el conductor del vehículo!",
|
||||
"PlayerJoinedServer": "¡{1} se unió al juego desde {1}!",
|
||||
"PlayerLeftServer": "¡{1} ha abandonado el juego! ({1})",
|
||||
"DisconnectReasons": [
|
||||
"Conexión perdida",
|
||||
"Desconectado",
|
||||
"Cliente no admitido",
|
||||
"Juego incorrecto",
|
||||
"Contraseña incorrecta",
|
||||
"Ejecutable no admitidos",
|
||||
"Desconectado",
|
||||
"Vetado",
|
||||
"Fallido",
|
||||
"Nombre inválido",
|
||||
"Fallo del programa"
|
||||
],
|
||||
"TakeItemFromHouse": "saca {1} de la casa",
|
||||
"TakeItemFromBusinessStorage": "saca {1} del almacén del negocio",
|
||||
"TakeItemFromBusiness": "saca {1} del negocio",
|
||||
"TakeItemFromItem": "saca {1} del {2}",
|
||||
"TakeItemFromVehicleTrunk": "saca {1} del maletero",
|
||||
"TakeItemFromVehicleDash": "saca {1} de la guantera",
|
||||
"JobEquipmentInventoryKeyBindTip": "El equipo de trabajo está en su inventario. Pulse {1} para verlas",
|
||||
"JobEquipmentInventoryCommandTip": "El equipo de trabajo está en su inventario. Utilice {1} para verlos",
|
||||
"AccountHelp": [
|
||||
"NO comparta su contraseña con nadie más. El personal de {1} nunca le pedirá su contraseña",
|
||||
"Utilice {1} para cambiar su contraseña, y {2} si la ha olvidado",
|
||||
"Algunos comandos: {1}"
|
||||
],
|
||||
"VehicleHelp": [
|
||||
"Sus vehículos personales se guardarán donde usted u otra persona los deje",
|
||||
"Visite un concesionario para comprar vehículos nuevos. {1} para más información)",
|
||||
"Algunos comandos: {1}",
|
||||
"Visita un taller mecánico para reparar, colorear y poner a punto tu coche. {1} para más información"
|
||||
],
|
||||
"VehicleDealershipHelp": [
|
||||
"Visite un concesionario para comprar vehículos nuevos. {1} para encontrar uno",
|
||||
"En el concesionario, introduce el coche que quieres comprar, y se te mostrará el precio",
|
||||
"Si quieres comprar el vehículo, utiliza {1} y te darán las llaves para que lo pruebes en el aparcamiento",
|
||||
"Salga del concesionario con el vehículo nuevo para confirmar la compra"
|
||||
],
|
||||
"JobHelp": [
|
||||
"Visita los lugares de trabajo para conseguir un empleo y ganar dinero. Busca puntos amarillos en el mapa",
|
||||
"En un lugar de trabajo, usa {1} para conseguir el trabajo. Utiliza {2} para dejar el trabajo",
|
||||
"Usa {1} para empezar a trabajar. También puedes conseguir un trabajo {2} y {3}",
|
||||
"La mayoría de los vehículos de trabajo están cerrados. Usa {1} cerca de uno para entrar en él",
|
||||
"Al entrar en un vehículo de trabajo, se le mostrará información sobre cómo hacer el trabajo"
|
||||
],
|
||||
"ChatHelp": [
|
||||
"Hay dos tipos principales de chat: fuera del personaje (OOC) y dentro del personaje (IC)",
|
||||
"Mezclar estos dos tipos no resulta en un juego de rol apropiado. Vea {1} para más información",
|
||||
"Algunos comandos del chat: {1}",
|
||||
"Algunos tienen nombres más cortos disponibles ({1} para hablar, {2} para gritar, etc)"
|
||||
],
|
||||
"ServerRulesHelp": [
|
||||
"Las acciones irreales (powergaming) no están permitidas. No eres Superman",
|
||||
"No se permite ningún juego de rol terrorista o de terrorismo",
|
||||
"Siga siempre las instrucciones de los moderadores y administradores",
|
||||
"No mezcles los chats (metagaming). No puedes usar información en IC que fue recibida OOC",
|
||||
"Mantén el inglés en los chats principales. Si no se te da bien el inglés, utiliza {1}"
|
||||
],
|
||||
"AnimationHelp": [
|
||||
"Las animaciones permiten mejorar el juego de rol con acciones visuales",
|
||||
"Utilice {1} o {2} con un nombre para utilizar una animación",
|
||||
"Para ver una lista de animaciones, utilice {1}"
|
||||
],
|
||||
"WeaponHelp": [
|
||||
"Visita una armería para comprar armas. Usa {1} para encontrar una",
|
||||
"La compra de un arma requiere una licencia de armas",
|
||||
"Las licencias de armas son gestionadas por el departamento de policía. Solicítela allí para obtenerla",
|
||||
"Las armas también pueden comprarse ilegalmente en algunos negocios, vendedores de armas y clanes"
|
||||
],
|
||||
"SkinHelp": [
|
||||
"En una tienda de ropa, usa {1} para comprar ropa",
|
||||
"Cuando tengas un objeto de ropa, equípalo y úsalo como cualquier otro objeto para mostrar la selección de personajes (revisa {1} para aprender a usar objetos)",
|
||||
"Algunas pieles están restringidas a trabajos, clanes o por otras razones"
|
||||
],
|
||||
"KeyBindHelp": [
|
||||
"Puedes establecer tus propias combinaciones de teclas. Utilice {1} para ver sus teclas vinculadas",
|
||||
"Utilice {1} para añadir una nueva combinación de teclas y {2} para eliminar una",
|
||||
"Las teclas por defecto son: {1} para el motor del vehículo, {2} para las luces y {3} para el bloqueo/desbloqueo",
|
||||
"Pulsa {1} para ver tus objetos y {2} para equipar un objeto o {3} para desequipar todos",
|
||||
"Pulsa {1} para usar el objeto que tienes en la mano, pulsa {2} para dejarlo caer o pulsa {3} para recoger un objeto del suelo"
|
||||
],
|
||||
"BusinessHelp": [
|
||||
"Utilice {1} para comprar artículos o {2} para ver una lista de lo que está a la venta en cualquier negocio",
|
||||
"Las empresas aparecen con nombres azules sobre el icono de su entrada",
|
||||
"Comandos del dueño del negocio: {1}",
|
||||
"Un coche nuevo en venta aparecerá cuando salgas del concesionario"
|
||||
],
|
||||
"ClanHelp": [
|
||||
"Pedir a un administrador que cree un clan (similar a las facciones/grupos/familias)",
|
||||
"Los propietarios de clanes tienen pleno control sobre su clan una vez creado",
|
||||
"Comandos de clan: {1}",
|
||||
"Más comandos del clan: {1}"
|
||||
],
|
||||
"RadioStationHelp": [
|
||||
"Utilice {1} para fijar la estación de su vehículo, casa o negocio",
|
||||
"Utilice {2} para ver una lista de estaciones",
|
||||
"Puedes cambiar el volumen de tu radio usando {1} con 0-100 como porcentaje"
|
||||
],
|
||||
"WealthAndTaxHelp": [
|
||||
"Sus impuestos en el día de pago son el {1} por ciento de su riqueza calculada",
|
||||
"Su riqueza calculada es una suma total basada en cuántos vehículos, casas y negocios tiene",
|
||||
"Cada vehículo es {1}, cada casa es {2}, y cada negocio es {3}",
|
||||
"Utilice {1} para ver su patrimonio actual, y {2} para ver cuánto pagará de impuestos cada día de pago"
|
||||
],
|
||||
"MustBeInAVehicle": "Necesitas estar en un vehículo",
|
||||
"MustBeInOrNearVehicle": "Tienes que estar dentro o cerca de un vehículo",
|
||||
"MustBeInVehicleFrontSeat": "Tienes que estar en los asientos delanteros del vehículo",
|
||||
"MustBeInVehicleDriverSeat": "Tienes que ser el conductor",
|
||||
"DontHaveVehicleKey": "No tiene una llave para este vehículo",
|
||||
"NoGateAccess": "No tienes acceso a esta puerta",
|
||||
"GateBroken": "Esta puerta está rota",
|
||||
"GateHacked": "La puerta no funciona",
|
||||
"RadioJammed": "Sólo se oye la estática de la radio",
|
||||
"VehicleNotForSale": "Este vehículo no está en venta",
|
||||
"VehicleNotForRent": "Este vehículo no se alquila",
|
||||
"BusinessNotForSale": "Este negocio no está en venta",
|
||||
"BusinessNotForRent": "Este negocio no se alquila",
|
||||
"HouseNotForSale": "Esta casa no está en venta",
|
||||
"HouseNotForRent": "Esta casa no está en alquiler",
|
||||
"DealershipPurchaseTestDrive": "Conduzca fuera del concesionario para comprar el vehículo, o salga del vehículo para cancelar",
|
||||
"DealershipPurchaseExitedVehicle": "Has cancelado la compra del vehículo al salir de él",
|
||||
"VehiclePurchaseComplete": "¡Este vehículo es ahora tuyo! Se guardará donde quiera que lo dejes",
|
||||
"VehiclePurchaseNotEnoughMoney": "No tienes suficiente dinero para comprar este vehículo",
|
||||
"HousePurchaseNotEnoughMoney": "No tienes suficiente dinero para comprar esta casa",
|
||||
"BusinessPurchaseNotEnoughMoney": "No tienes suficiente dinero para comprar este negocio",
|
||||
"Locales": {
|
||||
"English": "Inglés",
|
||||
"Russian": "Ruso",
|
||||
"Spanish": "Español",
|
||||
"German": "Alemán",
|
||||
"Dutch": "Holandés",
|
||||
"Polish": "Polaco"
|
||||
},
|
||||
"HeaderPlayerHousesList": "Casas del jugador ({1})",
|
||||
"HeaderPlayerStaffFlagsList": "Banderas administrativas del jugador ({1})",
|
||||
"HeaderStaffFlagsList": "Banderas administrativas",
|
||||
"NonRPName": "¡Nombre no RP! Elige uno nuevo:",
|
||||
"InvalidStaffFlag": "Bandera administrativa no encontrada",
|
||||
"InvalidClanFlag": "Bandera del clan no encontrada",
|
||||
"InvalidLocale": "Language not found!",
|
||||
"HeaderJobUniformList": "Job Uniforms ({1})",
|
||||
"HeaderJobEquipmentList": "Job Equipment ({1})",
|
||||
"InvalidJobUniform": "Job uniform not found!",
|
||||
"InvalidJobEquipment": "Job equipment not found!",
|
||||
"HeaderVehiclesInRangeList": "Vehicles within {1}",
|
||||
"NoVehiclesWithInRange": "There are no vehicles within {1}",
|
||||
"AmountNotNumber": "The amount must be a number!",
|
||||
"NeedToBeWorking": "You need to be working! Use {1} at a job location or near a job vehicle.",
|
||||
"NeedToBeOnJobRoute": "You need to be doing a job route! Use {1} in a job vehicle",
|
||||
"CurrentJobRouteDeleted": "The job route you were on has been deleted by an admin",
|
||||
"CurrentJobRouteVehicleColoursChanged": "Your job route's vehicle colours were changed by an admin",
|
||||
"NotYourJob": "This is not your job!",
|
||||
"JobPoints": "You can get a job by going the yellow points on the map.",
|
||||
"QuitJobToTakeAnother": "If you want this job, use {1} to quit your current job.",
|
||||
"NotAJobVehicle": "This is not a job vehicle!",
|
||||
"NotYourJobVehicle": "This is not your job's vehicle!",
|
||||
"JobRouteDisabled": "The job route you were on has been disabled by an admin",
|
||||
"HeaderPickupTypes": "Pickup Types",
|
||||
"HeaderBlipTypes": "Map Icon Types",
|
||||
"InvalidGPSLocation": "There are no locations with that name or type",
|
||||
"HeaderBusinessList": "Businesses",
|
||||
"VehicleForSale": "This {1} is buyable for {2}! Use {3} if you want to buy it",
|
||||
"VehicleForRent": "This {1} is rentable for {2}! Use {3} if you want to rent it",
|
||||
|
||||
"ADDED-31JAN2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
|
||||
"LoginFailedInvalidPassword": "Invalid password! {1} attempts remaining",
|
||||
"LoginFailedNoPassword": "You must enter a password! ! {1} attempts remaining",
|
||||
"RegistrationFailedNoPassword": "You must enter a password!",
|
||||
"RegistrationFailedNoPasswordConfirm": "You must confirm the password!",
|
||||
"RegistrationFailedNoEmail": "You must enter an email!",
|
||||
"AccountNameAlreadyRegistered": "Your name is already registered!",
|
||||
"AlreadyLoggedIn": "You are already logged in!",
|
||||
"RegistrationFailedInvalidEmail": "That email is invalid!",
|
||||
"RegistrationFailedPasswordMismatch": "The passwords don't match!",
|
||||
"RegistrationFailedCreateError": "Your account couldn't be created!",
|
||||
"RegistrationSuccess": "Your account has been created!",
|
||||
"RegistrationEmailVerifyReminder": "Don't forget to verify your email! A verification code has been sent to you.",
|
||||
"RegistrationCreateCharReminder": "To play on the server, you will need to make a character.",
|
||||
"NoCharactersGUIMessage": "You have no characters. Would you like to make one?",
|
||||
"NoCharactersGUIWindowTitle": "No characters",
|
||||
"NoCharactersChatMessage": "You have no characters. Use {1} to make one.",
|
||||
"NeedEmailFor2FA": "You need to add your email to your account to use two-factor authentication.",
|
||||
"NeedEmailVerifiedFor2FA": "You need to verify your email to use two-factor authentication.",
|
||||
"SetEmailHelpTip": "Use {1} to set your email.",
|
||||
"VerifyEmailHelpTip": "Use {1} to verify your email.",
|
||||
|
||||
"ADDED-13FEB2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations.",
|
||||
"NearbyRadio": "Nearby radio",
|
||||
"FromRadio": "From radio",
|
||||
"ToRadio": "To radio",
|
||||
"NeedToEnterPropertyCommand": "You need to enter the {1} first! Use {2} to enter and exit",
|
||||
"NeedToEnterPropertyKeyPress": "You need to enter the {1} first! Press {2} to enter and exit",
|
||||
"InventoryFullCantCarry": "You don't have any space to carry this (full inventory)!",
|
||||
"NotEnoughCashNeedAmountMore": "You don't have enough money! You need {1} more!",
|
||||
"AmountMustBeMoreThan": "The amount must be more than {1}!",
|
||||
"WeaponBanned": "You are not allowed to buy or use weapons!",
|
||||
"TimeNotNumber": "The time must be a number",
|
||||
"HeaderDefaultBusinessItemTypes": "Business Item Templates",
|
||||
"FixingStuck": "Fixing your position and virtual world ...",
|
||||
"CantUseCommandYet": "You must wait before you can use this command again!",
|
||||
"NotATester": "You are not a tester!",
|
||||
"AccessDenied": "AccessDenied",
|
||||
"InvalidSkin": "That skin is invalid!",
|
||||
"HeaderInteriorTypes": "Interiors List",
|
||||
"ViewInventoryKeyPressTip": "Press {1} to see your items",
|
||||
"ViewInventoryCommandTip": "Use {1} to see your items",
|
||||
"GUIAccountSettingToggle": "You have turned {1} GUI",
|
||||
|
||||
"ADDED-23MAR2022": "DO NOT TRANSLATE. This string is just a comment to separate newly added translations",
|
||||
"CarCommandHelp": "You can buy a car by visiting a vehicle dealership. Use {1} for more information.",
|
||||
"SkinCommandHelp": "You can change your skin by visiting a clothes store. Use {1} for more info.",
|
||||
"BusinessVehiclesRespawned": "All business vehicles have been respawned by an admin!",
|
||||
"JobVehiclesRespawned": "All job vehicles have been respawned by an admin!",
|
||||
"PlayerVehiclesRespawned": "All player vehicles have been respawned by an admin!",
|
||||
"ClanVehiclesRespawned": "All clan vehicles have been respawned by an admin!",
|
||||
"PublicVehiclesRespawned": "All public have been respawned by an admin!",
|
||||
"EmptyVehiclesRespawned": "All empty vehicles have been respawned by an admin!",
|
||||
"AllVehiclesRespawned": "All vehicles have been respawned by an admin!",
|
||||
"AllVehiclesReloaded": "All vehicles have been reloaded by an admin!",
|
||||
"YourVehicleRespawned": "Your vehicle has been respawned",
|
||||
"PlayerIPBanned": "{1} has been IP banned!",
|
||||
"PlayerCharacterBanned": "{1} has been character banned!",
|
||||
"PlayerSubNetBanned": "{1} has been subnet banned!",
|
||||
"CantModifyBusiness": "You can't manage or modify this business",
|
||||
"CantModifyHouse": "You can't manage or modify this house",
|
||||
"ServerTimeSet": "{1} set the time to {2}",
|
||||
"ServerWeatherSet": "{1} set the weather to {2}",
|
||||
"ServerSnowSet": "{1} turned falling snow {2} and ground snow {3}",
|
||||
"AllJobsReloaded": "All server jobs have been reloaded by an admin",
|
||||
"ServerLogoSet": "{1} turned the server logo image {2}",
|
||||
"ServerGUISet": "{1} turned GUI for this server {2}",
|
||||
"ServerBusinessBlipsSet": "{1} turned all business blips {2}",
|
||||
"ServerHouseBlipsSet": "{1} turned all house blips {2}",
|
||||
"ServerJobBlipsSet": "{1} turned all job blips {2}",
|
||||
"ServerBusinessPickupsSet": "{1} turned all business pickups {2}",
|
||||
"ServerHousePickupsSet": "{1} turned all house pickups {2}",
|
||||
"ServerJobPickupsSet": "{1} turned on all job pickups {2}",
|
||||
"BusinessBuyItemsLabel": "Use {1} to purchase items",
|
||||
"PropertyEnterCommandLabel": "Use {1} to enter",
|
||||
"PropertyEnterKeyPressLabel": "Press {1} to enter",
|
||||
"PropertyForSaleLabel": "For sale: ${1}",
|
||||
"PropertyForRentLabel": "For rent: ${1} every payday",
|
||||
"RemainingTaxPaidInMoney": "You covered the remaining taxes with ${1} in cash.",
|
||||
"LostMoneyFromTaxes": "You lost money since your taxes are more than your paycheck!",
|
||||
"NextPaycheckRepossessionWarning": "If you don't have enough cash to cover taxes on next paycheck, you will lose stuff!",
|
||||
"NotEnoughMoneyForTax": "You don't have enough money to cover your taxes!",
|
||||
"AssetsRepossessedForTax": "You lost {1} vehicles, {2} houses, and {3} businesses because you couldn't pay taxes!",
|
||||
"Closed": "Closed",
|
||||
"Open": "Open",
|
||||
"VehicleDealershipLabel": "Enter a vehicle as driver to buy it",
|
||||
"TakeJobLabel": "Use {1} to work here",
|
||||
"StartWorkLabel": "Use {1} to start working",
|
||||
"JobEquipAndUniformLabel": "Use {1} and {2} for job stuff, or {3} to stop working",
|
||||
"NotYourJobLabel": "You already have a different job. Use {1} if you want this one",
|
||||
"JobLabel": "{1} Job",
|
||||
"PaydayBonusSet": "{1} set the payday bonus to ${2}",
|
||||
"AllHousesReloaded": "All houses have been reloaded by an admin",
|
||||
"AllRadioStationsReloaded": "All radio stations have been reloaded by an admin!",
|
||||
"PlayerKicked": "{1} has been kicked from the server",
|
||||
"AllBusinessesReloaded": "All businesses have been reloaded by an admin!",
|
||||
"UnableToDoThat": "You aren't able to do that",
|
||||
"SetVehicleClanConfirmMessage": "Are you sure you want to give this vehicle to your clan?",
|
||||
"SetVehicleClanConfirmTitle": "Warning!",
|
||||
"SetItemPriceBelowOrderPriceMessage": "Are you sure you want to set the item price below it's order price? You will lose ${1} every purchase!",
|
||||
"SetItemPriceBelowOrderPriceTitle": "Warning!",
|
||||
"MustOwnVehicle": "You don't own this vehicle!"
|
||||
}
|
||||
38
meta.xml
@@ -9,8 +9,8 @@
|
||||
<script src="scripts/shared/gamedata.js" type="server" language="javascript" />
|
||||
<script src="scripts/shared/gamedata.js" type="client" language="javascript" />
|
||||
|
||||
|
||||
<!-- Multiplayer Mod (Wrapped Natives) -->
|
||||
<!-- The goal is to just swap only these out when I port the script to a new mod, like Oakwood -->
|
||||
<script src="scripts/server/native/connected.js" type="server" language="javascript" />
|
||||
<script src="scripts/client/native/connected.js" type="client" language="javascript" />
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
<script src="scripts/server/email.js" type="server" language="javascript" />
|
||||
<script src="scripts/server/event.js" type="server" language="javascript" />
|
||||
<script src="scripts/server/fishing.js" type="server" language="javascript" />
|
||||
<script src="scripts/server/gate.js" type="server" language="javascript" />
|
||||
<script src="scripts/server/gui.js" type="server" language="javascript" />
|
||||
<script src="scripts/server/help.js" type="server" language="javascript" />
|
||||
<script src="scripts/server/house.js" type="server" language="javascript" />
|
||||
@@ -44,9 +45,11 @@
|
||||
<script src="scripts/server/messaging.js" type="server" language="javascript" />
|
||||
<script src="scripts/server/misc.js" type="server" language="javascript" />
|
||||
<script src="scripts/server/npc.js" type="server" language="javascript" />
|
||||
<script src="scripts/server/staff.js" type="server" language="javascript" />
|
||||
<script src="scripts/server/race.js" type="server" language="javascript" />
|
||||
<script src="scripts/server/radio.js" type="server" language="javascript" />
|
||||
<script src="scripts/server/radio.js" type="server" language="javascript" />
|
||||
<script src="scripts/server/security.js" type="server" language="javascript" />
|
||||
<script src="scripts/server/staff.js" type="server" language="javascript" />
|
||||
<script src="scripts/server/subaccount.js" type="server" language="javascript" />
|
||||
<script src="scripts/server/timers.js" type="server" language="javascript" />
|
||||
<script src="scripts/server/trigger.js" type="server" language="javascript" />
|
||||
@@ -81,7 +84,34 @@
|
||||
<file type="client" src="files/images/skins/none.png" />
|
||||
<file type="client" src="files/images/mafiac-logo.png" />
|
||||
<file type="client" src="files/images/gtac-logo.png" />
|
||||
<file type="client" src="files/images/server-logo.png" />
|
||||
<file type="client" src="files/images/asshat-logo.png" />
|
||||
|
||||
<!-- Locale Files -->
|
||||
<file type="client" src="config/client/locale.json" />
|
||||
<file type="client" src="locale/english.json" />
|
||||
<file type="client" src="locale/russian.json" />
|
||||
<file type="client" src="locale/polish.json" />
|
||||
<file type="client" src="locale/spanish.json" />
|
||||
<file type="client" src="locale/french.json" />
|
||||
<file type="client" src="locale/japanese.json" />
|
||||
<file type="client" src="locale/german.json" />
|
||||
<file type="client" src="locale/slovak.json" />
|
||||
<file type="client" src="locale/finnish.json" />
|
||||
<file type="client" src="locale/chinese.json" />
|
||||
<file type="client" src="locale/arabic.json" />
|
||||
|
||||
<!-- International Flag Images -->
|
||||
<file type="client" src="files/images/flags/uk.png" />
|
||||
<file type="client" src="files/images/flags/de.png" />
|
||||
<file type="client" src="files/images/flags/fr.png" />
|
||||
<file type="client" src="files/images/flags/pl.png" />
|
||||
<file type="client" src="files/images/flags/es.png" />
|
||||
<file type="client" src="files/images/flags/jp.png" />
|
||||
<file type="client" src="files/images/flags/sk.png" />
|
||||
<file type="client" src="files/images/flags/sa.png" />
|
||||
<file type="client" src="files/images/flags/cn.png" />
|
||||
<file type="client" src="files/images/flags/fi.png" />
|
||||
<file type="client" src="files/images/flags/ru.png" />
|
||||
|
||||
<!-- GUI -->
|
||||
<script src="scripts/client/gui/login.js" type="client" language="javascript" />
|
||||
@@ -98,6 +128,7 @@
|
||||
<script src="scripts/client/gui/bizmgr.js" type="client" language="javascript" />
|
||||
<script src="scripts/client/gui/2fa.js" type="client" language="javascript" />
|
||||
<script src="scripts/client/gui/list.js" type="client" language="javascript" />
|
||||
<script src="scripts/client/gui/localechooser.js" type="client" language="javascript" />
|
||||
|
||||
<!-- Client Scripts -->
|
||||
<script src="scripts/client/afk.js" type="client" language="javascript" />
|
||||
@@ -106,6 +137,7 @@
|
||||
<script src="scripts/client/chatbox.js" type="client" language="javascript" />
|
||||
<script src="scripts/client/event.js" type="client" language="javascript" />
|
||||
<script src="scripts/client/gui.js" type="client" language="javascript" />
|
||||
<script src="scripts/client/gps.js" type="client" language="javascript" />
|
||||
<script src="scripts/client/house.js" type="client" language="javascript" />
|
||||
<script src="scripts/client/item.js" type="client" language="javascript" />
|
||||
<script src="scripts/client/job.js" type="client" language="javascript" />
|
||||
|
||||
@@ -8,99 +8,126 @@
|
||||
// ===========================================================================
|
||||
|
||||
function makePedPlayAnimation(pedId, animationSlot, positionOffset) {
|
||||
let ped = getElementFromId(pedId);
|
||||
|
||||
if(ped == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let animationData = getAnimationData(animationSlot);
|
||||
logToConsole(LOG_DEBUG, `[VRR.Animation] Playing animation ${animationData[0]} for ped ${pedId}`);
|
||||
|
||||
let freezePlayer = false;
|
||||
switch(animationData.moveType) {
|
||||
case VRR_ANIMMOVE_FORWARD:
|
||||
case VRR_ANIMMOVE_FORWARD: {
|
||||
setElementCollisionsEnabled(ped, false);
|
||||
setElementPosition(ped, getPosInFrontOfPos(getElementPosition(ped), fixAngle(getElementHeading(ped)), positionOffset));
|
||||
if(ped.isSyncer) {
|
||||
setElementPosition(ped, getPosInFrontOfPos(getElementPosition(pedId), fixAngle(getElementHeading(pedId)), positionOffset));
|
||||
}
|
||||
freezePlayer = true;
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_ANIMMOVE_BACK:
|
||||
setElementCollisionsEnabled(ped, false);
|
||||
setElementPosition(ped, getPosBehindPos(getElementPosition(ped), fixAngle(getElementHeading(ped)), positionOffset));
|
||||
case VRR_ANIMMOVE_BACK: {
|
||||
setElementCollisionsEnabled(pedId, false);
|
||||
if(ped.isSyncer) {
|
||||
setElementPosition(pedId, getPosBehindPos(getElementPosition(pedId), fixAngle(getElementHeading(pedId)), positionOffset));
|
||||
}
|
||||
freezePlayer = true;
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_ANIMMOVE_LEFT:
|
||||
setElementCollisionsEnabled(ped, false);
|
||||
setElementPosition(ped, getPosToLeftOfPos(getElementPosition(ped), fixAngle(getElementHeading(ped)), positionOffset));
|
||||
case VRR_ANIMMOVE_LEFT: {
|
||||
setElementCollisionsEnabled(pedId, false);
|
||||
if(ped.isSyncer) {
|
||||
setElementPosition(pedId, getPosToLeftOfPos(getElementPosition(pedId), fixAngle(getElementHeading(pedId)), positionOffset));
|
||||
}
|
||||
freezePlayer = true;
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_ANIMMOVE_RIGHT:
|
||||
setElementCollisionsEnabled(ped, false);
|
||||
setElementPosition(ped, getPosToRightOfPos(getElementPosition(ped), fixAngle(getElementHeading(ped)), positionOffset));
|
||||
case VRR_ANIMMOVE_RIGHT: {
|
||||
setElementCollisionsEnabled(pedId, false);
|
||||
if(ped.isSyncer) {
|
||||
setElementPosition(pedId, getPosToRightOfPos(getElementPosition(pedId), fixAngle(getElementHeading(pedId)), positionOffset));
|
||||
}
|
||||
freezePlayer = true;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(getGame() < VRR_GAME_GTA_IV) {
|
||||
if(animationData.animType == VRR_ANIMTYPE_NORMAL || animationData.animType == VRR_ANIMTYPE_SURRENDER) {
|
||||
if(getGame() == VRR_GAME_GTA_VC || getGame() == VRR_GAME_GTA_SA) {
|
||||
getElementFromId(pedId).clearAnimations();
|
||||
ped.clearAnimations();
|
||||
} else {
|
||||
getElementFromId(pedId).clearObjective();
|
||||
ped.clearObjective();
|
||||
}
|
||||
getElementFromId(pedId).addAnimation(animationData.groupId, animationData.animId);
|
||||
ped.addAnimation(animationData.groupId, animationData.animId);
|
||||
|
||||
if(getElementFromId(pedId) == localPlayer && freezePlayer == true) {
|
||||
if(ped == localPlayer && freezePlayer == true) {
|
||||
inAnimation = true;
|
||||
setLocalPlayerControlState(false, false);
|
||||
localPlayer.collisionsEnabled = false;
|
||||
}
|
||||
} else if(animationData.animType == VRR_ANIMTYPE_BLEND) {
|
||||
getElementFromId(pedId).position = getElementFromId(pedId).position;
|
||||
getElementFromId(pedId).blendAnimation(animationData.groupId, animationData.animId, animationData.animSpeed);
|
||||
ped.position = ped.position;
|
||||
ped.blendAnimation(animationData.groupId, animationData.animId, animationData.animSpeed);
|
||||
}
|
||||
} else {
|
||||
natives.requestAnims(animationData.groupId);
|
||||
natives.taskPlayAnimNonInterruptable(getElementFromId(pedId), animationData.groupId, animationData.animId, animationData.animSpeed, boolToInt(animationData.infiniteLoop), boolToInt(animationData.infiniteLoopNoMovement), boolToInt(animationData.dontReturnToStartCoords), boolToInt(animationData.freezeLastFrame), -1);
|
||||
natives.taskPlayAnimNonInterruptable(ped, animationData.groupId, animationData.animId, animationData.animSpeed, boolToInt(animationData.infiniteLoop), boolToInt(animationData.infiniteLoopNoMovement), boolToInt(animationData.dontReturnToStartCoords), boolToInt(animationData.freezeLastFrame), -1);
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function forcePedAnimation(pedId, animSlot) {
|
||||
let ped = getElementFromId(pedId);
|
||||
|
||||
if(ped == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let animationData = getAnimationData(animSlot);
|
||||
|
||||
if(getGame() < VRR_GAME_GTA_IV) {
|
||||
getElementFromId(pedId).position = getElementFromId(pedId).position;
|
||||
getElementFromId(pedId).addAnimation(animationData.groupId, animationData.animId);
|
||||
ped.position = ped.position;
|
||||
ped.addAnimation(animationData.groupId, animationData.animId);
|
||||
|
||||
if(getElementFromId(pedId) == localPlayer) {
|
||||
if(ped == localPlayer) {
|
||||
inAnimation = true;
|
||||
setLocalPlayerControlState(false, false);
|
||||
localPlayer.collisionsEnabled = false;
|
||||
}
|
||||
} else {
|
||||
natives.requestAnims(animationData.groupId);
|
||||
natives.taskPlayAnimNonInterruptable(getElementFromId(pedId), animationData.groupId, animationData.animId, animationData.animSpeed, boolToInt(animationData.infiniteLoop), boolToInt(animationData.infiniteLoopNoMovement), boolToInt(animationData.dontReturnToStartCoords), boolToInt(animationData.freezeLastFrame), -1);
|
||||
natives.taskPlayAnimNonInterruptable(ped, animationData.groupId, animationData.animId, animationData.animSpeed, boolToInt(animationData.infiniteLoop), boolToInt(animationData.infiniteLoopNoMovement), boolToInt(animationData.dontReturnToStartCoords), boolToInt(animationData.freezeLastFrame), -1);
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function makePedStopAnimation(pedId) {
|
||||
if(getElementFromId(pedId) == null) {
|
||||
let ped = getElementFromId(pedId);
|
||||
|
||||
if(ped == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getGame() != VRR_GAME_GTA_IV) {
|
||||
if(getGame() == VRR_GAME_GTA_VC || getGame() == VRR_GAME_GTA_SA) {
|
||||
getElementFromId(pedId).clearAnimations();
|
||||
ped.clearAnimations();
|
||||
} else {
|
||||
getElementFromId(pedId).clearObjective();
|
||||
ped.clearObjective();
|
||||
}
|
||||
}
|
||||
|
||||
if(getElementFromId(pedId) == localPlayer) {
|
||||
if(ped == localPlayer) {
|
||||
if(getGame() != VRR_GAME_GTA_IV) {
|
||||
localPlayer.collisionsEnabled = true;
|
||||
}
|
||||
|
||||
@@ -59,8 +59,13 @@ function addAllEventHandlers() {
|
||||
|
||||
function onResourceStart(event, resource) {
|
||||
sendResourceStartedSignalToServer();
|
||||
setUpInitialGame();
|
||||
garbageCollectorInterval = setInterval(collectAllGarbage, 1000*60);
|
||||
//setUpInitialGame();
|
||||
//garbageCollectorInterval = setInterval(collectAllGarbage, 1000*60);
|
||||
|
||||
resourceStarted = true;
|
||||
if(resourceReady == true) {
|
||||
initClient();
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -73,6 +78,10 @@ function onResourceStop(event, resource) {
|
||||
|
||||
function onResourceReady(event, resource) {
|
||||
sendResourceReadySignalToServer();
|
||||
resourceReady = true;
|
||||
if(resourceStarted == true) {
|
||||
initClient();
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -97,6 +106,7 @@ function onProcess(event, deltaTime) {
|
||||
processGameSpecifics();
|
||||
processNearbyPickups();
|
||||
processVehiclePurchasing();
|
||||
processVehicleBurning();
|
||||
//checkChatBoxAutoHide(); // Will be uncommented on 1.4.0 GTAC update
|
||||
//processVehicleFires();
|
||||
}
|
||||
@@ -163,13 +173,13 @@ function onLocalPlayerEnteredVehicle(event, vehicle, seat) {
|
||||
|
||||
sendNetworkEventToServer("vrr.onPlayerEnterVehicle", getVehicleForNetworkEvent(vehicle), seat);
|
||||
|
||||
if(inVehicleSeat == 0) {
|
||||
inVehicle.engine = false;
|
||||
if(!inVehicle.engine) {
|
||||
parkedVehiclePosition = inVehicle.position;
|
||||
parkedVehicleHeading = inVehicle.heading;
|
||||
}
|
||||
}
|
||||
//if(inVehicleSeat == 0) {
|
||||
//setVehicleEngine(vehicle, false);
|
||||
//if(!inVehicle.engine) {
|
||||
// parkedVehiclePosition = inVehicle.position;
|
||||
// parkedVehicleHeading = inVehicle.heading;
|
||||
//}
|
||||
//}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -182,7 +192,7 @@ function onPedInflictDamage(event, damagedEntity, damagerEntity, weaponId, healt
|
||||
if(damagedEntity.isType(ELEMENT_PLAYER)) {
|
||||
if(damagedEntity == localPlayer) {
|
||||
//if(!weaponDamageEnabled[damagerEntity.name]) {
|
||||
event.preventDefault();
|
||||
preventDefaultEventAction(event);
|
||||
sendNetworkEventToServer("vrr.weaponDamage", damagerEntity.name, weaponId, pedPiece, healthLoss);
|
||||
//}
|
||||
}
|
||||
|
||||
65
scripts/client/gps.js
Normal file
@@ -0,0 +1,65 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// ===========================================================================
|
||||
// FILE: gps.js
|
||||
// DESC: Provides GPS functions and usage
|
||||
// TYPE: Client (JavaScript)
|
||||
// ===========================================================================
|
||||
|
||||
let gpsBlip = null;
|
||||
let gpsBlipBlinkTimes = 0;
|
||||
let gpsBlipBlinkAmount = 0;
|
||||
let gpsBlipBlinkInterval = 500;
|
||||
let gpsBlipBlinkTimer = null;
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showGPSLocation(position, colour) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GPS] Showing gps location`);
|
||||
if(getMultiplayerMod() == VRR_MPMOD_GTAC) {
|
||||
if(getGame() == VRR_GAME_GTA_SA) {
|
||||
// Server-side spheres don't show in GTA SA for some reason.
|
||||
gpsSphere = game.createPickup(1318, position, 1);
|
||||
} else {
|
||||
gpsSphere = game.createSphere(position, 3);
|
||||
gpsSphere.colour = colour;
|
||||
}
|
||||
|
||||
if(gpsBlip != null) {
|
||||
destroyElement(gpsBlip);
|
||||
}
|
||||
|
||||
// Blinking is bugged if player hit the spot before it stops blinking.
|
||||
blinkGPSBlip(10, position, colour);
|
||||
gpsBlip = game.createBlip(position, 0, 2, colour);
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function blinkGPSBlip(times, position, colour) {
|
||||
gpsBlipBlinkTimes = times;
|
||||
gpsBlipBlinkTimer = setInterval(function() {
|
||||
if(gpsBlip != null) {
|
||||
destroyElement(gpsBlip);
|
||||
gpsBlip = null;
|
||||
} else {
|
||||
gpsBlip = game.createBlip(position, 0, 2, colour);
|
||||
}
|
||||
|
||||
if(gpsBlipBlinkAmount >= gpsBlipBlinkTimes) {
|
||||
if(gpsBlip != null) {
|
||||
destroyElement(gpsBlip);
|
||||
gpsBlip = null;
|
||||
}
|
||||
|
||||
gpsBlipBlinkAmount = 0;
|
||||
gpsBlipBlinkTimes = 0;
|
||||
gpsBlip = game.createBlip(position, 0, 2, colour);
|
||||
clearInterval(gpsBlipBlinkTimer);
|
||||
}
|
||||
}, gpsBlipBlinkInterval);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -12,7 +12,7 @@ var app = {};
|
||||
let mainFont = "Roboto"; // "Arial"
|
||||
|
||||
//let mainLogoPath = (typeof gta == "undefined") ? "files/images/mafiac-logo.png" : "files/images/gtac-logo.png";
|
||||
let mainLogoPath = "files/images/server-logo.png";
|
||||
let mainLogoPath = "files/images/asshat-logo.png";
|
||||
|
||||
let primaryColour = [200, 200, 200];
|
||||
let secondaryColour = [16, 16, 16];
|
||||
@@ -60,12 +60,17 @@ function initGUI() {
|
||||
initListGUI();
|
||||
initResetPasswordGUI();
|
||||
initChangePasswordGUI();
|
||||
initLocaleChooserGUI();
|
||||
|
||||
closeAllWindows();
|
||||
guiReady = true;
|
||||
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] All GUI created successfully!`);
|
||||
sendNetworkEventToServer("vrr.guiReady", true);
|
||||
|
||||
loadAllLocaleStrings();
|
||||
resetGUIStrings();
|
||||
resetLocaleChooserOptions();
|
||||
};
|
||||
|
||||
// ===========================================================================
|
||||
@@ -81,8 +86,9 @@ function closeAllWindows() {
|
||||
characterSelect.window.shown = false;
|
||||
twoFactorAuth.window.shown = false;
|
||||
listDialog.window.shown = false;
|
||||
resetPassword.window.shown = false;
|
||||
passwordReset.window.shown = false;
|
||||
passwordChange.window.shown = false;
|
||||
localeChooser.window.shown = false;
|
||||
|
||||
mexui.setInput(false);
|
||||
mexui.focusedControl = false;
|
||||
@@ -137,7 +143,7 @@ function isAnyGUIActive() {
|
||||
return true;
|
||||
}
|
||||
|
||||
if(resetPassword.window.shown == true) {
|
||||
if(passwordReset.window.shown == true) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -145,6 +151,10 @@ function isAnyGUIActive() {
|
||||
return true;
|
||||
}
|
||||
|
||||
if(localeChooser.window.shown == true) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -242,6 +252,13 @@ addNetworkEventHandler("vrr.showResetPasswordCodeInput", function() {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
addNetworkEventHandler("vrr.showLocaleChooser", function() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Received signal to show locale chooser from server`);
|
||||
showLocaleChooserGUI();
|
||||
});
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
addNetworkEventHandler("vrr.guiColour", function(red1, green1, blue1, red2, green2, blue2, red3, green3, blue3) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Received new GUI colours from server: ${red1}, ${green1}, ${blue1} / ${red2}, ${green2}, ${blue2} / ${red3}, ${green3}, ${blue3}`);
|
||||
primaryColour = [red1, green1, blue1];
|
||||
@@ -320,3 +337,49 @@ function processToggleGUIKeyPress(keyCode) {
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function resetGUIStrings() {
|
||||
// Login GUI
|
||||
login.messageLabel.text = getLocaleString("GUILoginWindowLabelEnterPassword");
|
||||
login.passwordInput.placeholder = getLocaleString("GUILoginWindowPasswordPlaceholder");
|
||||
login.loginButton.text = toUpperCase(getLocaleString("GUILoginWindowSubmitButton"));
|
||||
login.forgotPasswordButton.text = toUpperCase(getLocaleString("GUILoginWindowResetPasswordButton"));
|
||||
login.resetPasswordLabel.text = getLocaleString("GUILoginWindowForgotPasswordLabel");
|
||||
|
||||
// Register GUI
|
||||
register.messageLabel.text = getLocaleString("GUIRegisterWindowLabelCreateAccount");
|
||||
register.passwordInput.placeholder = getLocaleString("GUIRegisterWindowPasswordPlaceholder");
|
||||
register.confirmPasswordInput.placeholder = getLocaleString("GUIRegisterWindowConfirmPasswordPlaceholder");
|
||||
register.emailInput.placeholder = getLocaleString("GUIRegisterWindowEmailPlaceholder");
|
||||
register.registerButton.text = toUpperCase(getLocaleString("GUIRegisterWindowSubmitButton"));
|
||||
|
||||
// Change Password GUI
|
||||
passwordChange.window.title = toUpperCase(getLocaleString("GUIChangePasswordWindowTitle"));
|
||||
passwordChange.messageLabel.text = getLocaleString("GUIChangePasswordPasswordLabel");
|
||||
passwordChange.passwordInput.placeholder = getLocaleString("GUIChangePasswordPasswordPlaceholder");
|
||||
passwordChange.confirmPasswordInput.placeholder = getLocaleString("GUIChangePasswordConfirmPasswordPlaceholder");
|
||||
passwordChange.submitButton.text = toUpperCase(getLocaleString("GUIChangePasswordSubmitButton"));
|
||||
|
||||
// Reset Password GUI
|
||||
passwordReset.messageLabel.text = toUpperCase(getLocaleString("GUIResetPasswordConfirmEmailLabel"));
|
||||
passwordReset.emailInput.placeholder = getLocaleString("GUIResetPasswordEmailPlaceholder");
|
||||
passwordReset.resetPasswordButton.text = toUpperCase(getLocaleString("GUIResetPasswordSubmitButton"));
|
||||
passwordReset.backToLoginButton.text = toUpperCase(getLocaleString("GUIResetPasswordLoginButton"));
|
||||
passwordReset.backToLoginLabel.text = getLocaleString("GUIResetPasswordRememberMessage");
|
||||
|
||||
// Character Selection GUI
|
||||
characterSelect.window.title = toUpperCase(getLocaleString("GUICharacterSelectWindowTitle"));
|
||||
characterSelect.cashText.text = getLocaleString("GUICharacterSelectMoneyLabel", "0");
|
||||
characterSelect.clanText.text = getLocaleString("GUICharacterSelectClanLabel", "None");
|
||||
characterSelect.lastPlayedText.text = getLocaleString("GUICharacterSelectLastPlayedLabel", "Never");
|
||||
characterSelect.previousCharacterButton.text = toUpperCase(getLocaleString("GUIPreviousCharacterButton"));
|
||||
characterSelect.nextCharacterButton.text = toUpperCase(getLocaleString("GUINextCharacterButton"));
|
||||
characterSelect.selectCharacterButton.text = toUpperCase(getLocaleString("GUIPlayAsCharacterButton"));
|
||||
characterSelect.newCharacterButton.text = toUpperCase(getLocaleString("GUINewCharacterButton"));
|
||||
|
||||
// Character Creation GUI
|
||||
newCharacter.messageLabel.text = getLocaleString("GUINewCharacterMessageLabel");
|
||||
newCharacter.firstNameInput.placeholder = getLocaleString("GUINewCharacterFirstNamePlaceholder");
|
||||
newCharacter.lastNameInput.placeholder = getLocaleString("GUINewCharacterLastNamePlaceholder");
|
||||
newCharacter.createCharacterButton.text = toUpperCase(getLocaleString("GUINewCharacterSubmitButton"));
|
||||
}
|
||||
@@ -38,6 +38,7 @@ function initChangePasswordGUI() {
|
||||
});
|
||||
passwordChange.window.titleBarIconSize = toVector2(0,0);
|
||||
passwordChange.window.titleBarHeight = 0;
|
||||
passwordChange.window.titleBarShown = false;
|
||||
|
||||
passwordChange.window.image(85, -10, 140, 140, mainLogoPath, {
|
||||
focused: {
|
||||
@@ -140,6 +141,8 @@ function showChangePasswordGUI() {
|
||||
passwordChange.window.shown = true;
|
||||
mexui.focusedControl = passwordChange.passwordInput;
|
||||
guiSubmitKey = checkChangePassword;
|
||||
|
||||
showLocaleChooserGUI();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
@@ -24,23 +24,26 @@ let characterSelect = {
|
||||
|
||||
function initCharacterSelectGUI() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating character select GUI ...`);
|
||||
characterSelect.window = mexui.window(game.width/2-215, game.height/2-83, 430, 190, 'Select Character', {
|
||||
characterSelect.window = mexui.window(game.width/2-215, game.height/2-83, 430, 190, 'SELECT CHARACTER', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
},
|
||||
title: {
|
||||
textSize: 12.0,
|
||||
textColour: toColour(0, 0, 0, 0),
|
||||
textSize: 12.0,
|
||||
textFont: mainFont,
|
||||
textColour: toColour(0, 0, 0, 255),
|
||||
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha),
|
||||
},
|
||||
icon: {
|
||||
textSize: 12.0,
|
||||
textColour: toColour(0, 0, 0, 0),
|
||||
textSize: 10.0,
|
||||
textFont: mainFont,
|
||||
textColour: toColour(0, 0, 0, 255),
|
||||
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha),
|
||||
}
|
||||
});
|
||||
characterSelect.window.titleBarIconSize = toVector2(0,0);
|
||||
characterSelect.window.titleBarHeight = 0;
|
||||
characterSelect.window.titleBarIconSize = toVector2(0, 0);
|
||||
characterSelect.window.titleBarIconShown = false;
|
||||
characterSelect.window.titleBarHeight = 30;
|
||||
|
||||
characterSelect.nameText = characterSelect.window.text(5, 40, 200, 25, 'Lastname, Firstname', {
|
||||
main: {
|
||||
@@ -167,6 +170,8 @@ function showCharacterSelectGUI(firstName, lastName, cash, clan, lastPlayed, ski
|
||||
guiSubmitKey = selectThisCharacter;
|
||||
guiLeftKey = selectPreviousCharacter;
|
||||
guiRightKey = selectNextCharacter;
|
||||
|
||||
showLocaleChooserGUI();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
// ===========================================================================
|
||||
|
||||
let clanManager = {
|
||||
window: null,
|
||||
generalTab: null,
|
||||
ranksTab: null,
|
||||
membersTab: null,
|
||||
vehiclesTab: null,
|
||||
businessesTab: null,
|
||||
housesTab: null,
|
||||
window: null,
|
||||
generalTab: null,
|
||||
ranksTab: null,
|
||||
membersTab: null,
|
||||
vehiclesTab: null,
|
||||
businessesTab: null,
|
||||
housesTab: null,
|
||||
};
|
||||
|
||||
// ===========================================================================
|
||||
@@ -16,49 +16,49 @@ let errorDialog = {
|
||||
// ===========================================================================
|
||||
|
||||
function initErrorDialogGUI() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating error GUI ...`);
|
||||
errorDialog.window = mexui.window(game.width/2-200, game.height/2-70, 500, 140, 'ERROR', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
transitionTime: 500,
|
||||
},
|
||||
title: {
|
||||
textSize: 11.0,
|
||||
textColour: toColour(primaryTextColour[0], primaryTextColour[1], primaryTextColour[2], 255),
|
||||
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha),
|
||||
},
|
||||
icon: {
|
||||
textSize: 0.0,
|
||||
textColour: toColour(0, 0, 0, 0),
|
||||
backgroundColour: toColour(0, 0, 0, 0),
|
||||
},
|
||||
});
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating error GUI ...`);
|
||||
errorDialog.window = mexui.window(game.width/2-200, game.height/2-70, 500, 140, 'ERROR', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
transitionTime: 500,
|
||||
},
|
||||
title: {
|
||||
textSize: 11.0,
|
||||
textColour: toColour(primaryTextColour[0], primaryTextColour[1], primaryTextColour[2], 255),
|
||||
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha),
|
||||
},
|
||||
icon: {
|
||||
textSize: 0.0,
|
||||
textColour: toColour(0, 0, 0, 0),
|
||||
backgroundColour: toColour(0, 0, 0, 0),
|
||||
},
|
||||
});
|
||||
|
||||
errorDialog.messageLabel = errorDialog.window.text(15, 50, 470, 75, 'Error Message', {
|
||||
main: {
|
||||
textSize: 10.0,
|
||||
textAlign: 0.5,
|
||||
textColour: toColour(255, 255, 255, 255),
|
||||
textFont: mainFont,
|
||||
},
|
||||
focused: {
|
||||
borderColour: toColour(0, 0, 0, 0),
|
||||
},
|
||||
});
|
||||
errorDialog.messageLabel = errorDialog.window.text(15, 50, 470, 75, 'Error Message', {
|
||||
main: {
|
||||
textSize: 10.0,
|
||||
textAlign: 0.5,
|
||||
textColour: toColour(255, 255, 255, 255),
|
||||
textFont: mainFont,
|
||||
},
|
||||
focused: {
|
||||
borderColour: toColour(0, 0, 0, 0),
|
||||
},
|
||||
});
|
||||
|
||||
errorDialog.okayButton = errorDialog.window.button(5, 105, 390, 30, 'OK', {
|
||||
main: {
|
||||
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha),
|
||||
textColour: toColour(primaryTextColour[0], primaryTextColour[1], primaryTextColour[2], 255),
|
||||
textSize: 10.0,
|
||||
textFont: mainFont,
|
||||
textAlign: 0.5,
|
||||
},
|
||||
focused: {
|
||||
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], 255),
|
||||
},
|
||||
}, closeErrorDialog);
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Created error GUI ...`);
|
||||
errorDialog.okayButton = errorDialog.window.button(5, 105, 390, 30, 'OK', {
|
||||
main: {
|
||||
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha),
|
||||
textColour: toColour(primaryTextColour[0], primaryTextColour[1], primaryTextColour[2], 255),
|
||||
textSize: 10.0,
|
||||
textFont: mainFont,
|
||||
textAlign: 0.5,
|
||||
},
|
||||
focused: {
|
||||
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], 255),
|
||||
},
|
||||
}, closeErrorDialog);
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Created error GUI ...`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
116
scripts/client/gui/localechooser.js
Normal file
@@ -0,0 +1,116 @@
|
||||
// ===========================================================================
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// ===========================================================================
|
||||
// FILE: localechooser.js
|
||||
// DESC: Provides locale chooser GUI
|
||||
// TYPE: Client (JavaScript)
|
||||
// ===========================================================================
|
||||
|
||||
let localeChooser = {
|
||||
window: null,
|
||||
flagImages: [],
|
||||
activeRingImages: [],
|
||||
};
|
||||
|
||||
let flagImageSize = toVector2(30, 30);
|
||||
let flagImageGap = toVector2(5, 5);
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function initLocaleChooserGUI() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating locale chooser GUI ...`);
|
||||
localeChooser.window = mexui.window(game.width/2-200, game.height-150, 60, 60, 'Choose a language', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], 0),
|
||||
},
|
||||
title: {
|
||||
textSize: 11.0,
|
||||
textColour: toColour(primaryTextColour[0], primaryTextColour[1], primaryTextColour[2], 255),
|
||||
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha),
|
||||
},
|
||||
icon: {
|
||||
textSize: 0.0,
|
||||
textColour: toColour(0, 0, 0, 0),
|
||||
backgroundColour: toColour(0, 0, 0, 0),
|
||||
},
|
||||
});
|
||||
localeChooser.window.titleBarShown = false;
|
||||
|
||||
loadLocaleConfig();
|
||||
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Created locale chooser GUI`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function closeLocaleChooserGUI() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Closing locale chooser window`);
|
||||
localeChooser.window.shown = false;
|
||||
mexui.setInput(false);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showLocaleChooserGUI(position = toVector2(0, 0)) {
|
||||
if(position.x != 0 && position.y != 0) {
|
||||
localeChooser.window.position = position;
|
||||
} else {
|
||||
localeChooser.window.position = toVector2((getScreenWidth()/2)-(localeChooser.window.size.x/2), getScreenHeight()-100);
|
||||
}
|
||||
|
||||
//closeAllWindows();
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Showing locale chooser window`);
|
||||
mexui.setInput(true);
|
||||
localeChooser.window.shown = true;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function toggleLocaleChooserGUI() {
|
||||
if(localeChooser.window.shown) {
|
||||
closeLocaleChooserGUI();
|
||||
} else {
|
||||
showLocaleChooserGUI();
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function localeChooserSetLocale(localeId) {
|
||||
logToConsole(LOG_DEBUG|LOG_WARN, `[VRR.GUI] Asking server to change locale to ${localeId}`);
|
||||
sendLocaleSelectToServer(localeId);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function resetLocaleChooserOptions() {
|
||||
logToConsole(LOG_DEBUG|LOG_WARN, `[VRR.GUI] Resetting locale chooser options`);
|
||||
|
||||
// let tempLocaleOptions = getServerData().localeOptions; // getAvailableLocaleOptions();
|
||||
let tempLocaleOptions = getAvailableLocaleOptions();
|
||||
|
||||
localeChooser.window.size = toVector2((tempLocaleOptions.length*(flagImageSize.x+flagImageGap.x))+flagImageGap.x, flagImageSize.y+flagImageGap.y*2);
|
||||
localeChooser.window.position = toVector2((getScreenWidth()/2)-(localeChooser.window.size.x/2), getScreenHeight()-100);
|
||||
|
||||
for(let i in localeChooser.flagImages) {
|
||||
localeChooser.flagImages[i].remove();
|
||||
}
|
||||
|
||||
for(let i in tempLocaleOptions) {
|
||||
let imagePath = `files/images/flags/${tempLocaleOptions[i].flagImageFile}`;
|
||||
localeChooser.flagImages[i] = localeChooser.window.image((i*(flagImageSize.x+flagImageGap.x))+flagImageGap.x, flagImageGap.y, flagImageSize.x, flagImageSize.y, imagePath, {
|
||||
focused: {
|
||||
borderColour: toColour(0, 0, 0, 0),
|
||||
},
|
||||
}, function() {
|
||||
localeChooserSetLocale(tempLocaleOptions[i].id);
|
||||
});
|
||||
|
||||
logToConsole(LOG_DEBUG|LOG_WARN, `[VRR.GUI] Created locale chooser option ${tempLocaleOptions[i].englishName} with image ${imagePath}`);
|
||||
|
||||
//localeChooser.activeRingImages.push(activeRingImage);
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -11,7 +11,6 @@ let login = {
|
||||
window: null,
|
||||
logoImage: null,
|
||||
messageLabel: null,
|
||||
passwordLabel: null,
|
||||
passwordInput: null,
|
||||
loginButton: null,
|
||||
forgotPasswordButton: null,
|
||||
@@ -23,7 +22,7 @@ let login = {
|
||||
let loginHTML =
|
||||
`<html>
|
||||
<head>
|
||||
<title>Connected RP: Login</title>
|
||||
<title>Asshat Gaming Roleplay: Login</title>
|
||||
<style type="text/css" rel="stylesheet">
|
||||
.input-box
|
||||
{
|
||||
@@ -63,8 +62,9 @@ function initLoginGUI() {
|
||||
});
|
||||
login.window.titleBarIconSize = toVector2(0,0);
|
||||
login.window.titleBarHeight = 0;
|
||||
login.window.titleBarShown = false;
|
||||
|
||||
login.logoImage = login.window.image(5, 20, 290, 100, mainLogoPath, {
|
||||
login.logoImage = login.window.image(100, 20, 100, 100, mainLogoPath, {
|
||||
focused: {
|
||||
borderColour: toColour(0, 0, 0, 0),
|
||||
},
|
||||
@@ -156,6 +156,8 @@ function showLoginGUI() {
|
||||
login.window.shown = true;
|
||||
mexui.focusedControl = login.passwordInput;
|
||||
guiSubmitKey = checkLogin;
|
||||
|
||||
showLocaleChooserGUI();
|
||||
//showSmallGameMessage(`If you don't have a mouse cursor, press ${toUpperCase(getKeyNameFromId(disableGUIKey))} to disable GUI`, COLOUR_WHITE, 7500);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,106 +9,108 @@
|
||||
|
||||
let newCharacter = {
|
||||
window: null,
|
||||
messageLabel: null,
|
||||
firstNameInput: null,
|
||||
lastNameInput: null,
|
||||
skinDropDown: null,
|
||||
spawnAreaDropDown: null,
|
||||
createButton: null,
|
||||
mainLogoImage: null,
|
||||
createCharacterButton: null,
|
||||
mainLogoImage: null,
|
||||
};
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function initNewCharacterGUI() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating new character GUI ...`);
|
||||
newCharacter.window = mexui.window(game.width/2-130, game.height/2-115, 300, 230, 'New Character', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
transitionTime: 500,
|
||||
},
|
||||
title: {
|
||||
textSize: 0.0,
|
||||
textColour: toColour(0, 0, 0, 0),
|
||||
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha),
|
||||
},
|
||||
icon: {
|
||||
textSize: 0.0,
|
||||
textColour: toColour(0, 0, 0, 0),
|
||||
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha),
|
||||
}
|
||||
});
|
||||
newCharacter.window.titleBarIconSize = toVector2(0,0);
|
||||
newCharacter.window.titleBarHeight = 0;
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating new character GUI ...`);
|
||||
newCharacter.window = mexui.window(game.width/2-130, game.height/2-115, 300, 230, 'NEW CHARACTER', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
transitionTime: 500,
|
||||
},
|
||||
title: {
|
||||
textSize: 12.0,
|
||||
textFont: mainFont,
|
||||
textColour: toColour(0, 0, 0, 0),
|
||||
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha),
|
||||
},
|
||||
icon: {
|
||||
textSize: 0.0,
|
||||
textColour: toColour(0, 0, 0, 0),
|
||||
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha),
|
||||
}
|
||||
});
|
||||
newCharacter.window.titleBarIconSize = toVector2(0, 0);
|
||||
newCharacter.window.titleBarIconShown = false;
|
||||
newCharacter.window.titleBarShown = false;
|
||||
newCharacter.window.titleBarHeight = 30;
|
||||
|
||||
newCharacter.mainLogoImage = newCharacter.window.image(5, 20, 290, 80, mainLogoPath, {
|
||||
focused: {
|
||||
borderColour: toColour(0, 0, 0, 0),
|
||||
},
|
||||
});
|
||||
newCharacter.mainLogoImage = newCharacter.window.image(80, 20, 80, 80, mainLogoPath, {
|
||||
focused: {
|
||||
borderColour: toColour(0, 0, 0, 0),
|
||||
},
|
||||
});
|
||||
|
||||
newCharacter.messageLabel = newCharacter.window.text(20, 100, 260, 20, 'Name your character', {
|
||||
main: {
|
||||
textSize: 10.0,
|
||||
textAlign: 0.5,
|
||||
textColour: toColour(200, 200, 200, 255),
|
||||
textFont: mainFont,
|
||||
},
|
||||
focused: {
|
||||
borderColour: toColour(0, 0, 0, 0),
|
||||
},
|
||||
});
|
||||
newCharacter.messageLabel = newCharacter.window.text(20, 100, 260, 20, 'Name your character', {
|
||||
main: {
|
||||
textSize: 10.0,
|
||||
textAlign: 0.5,
|
||||
textColour: toColour(200, 200, 200, 255),
|
||||
textFont: mainFont,
|
||||
},
|
||||
focused: {
|
||||
borderColour: toColour(0, 0, 0, 0),
|
||||
},
|
||||
});
|
||||
|
||||
newCharacter.firstNameInput = newCharacter.window.textInput(20, 125, 260, 25, '', {
|
||||
main: {
|
||||
backgroundColour: toColour(0, 0, 0, 120),
|
||||
textColour: toColour(200, 200, 200, 255),
|
||||
textSize: 10.0,
|
||||
textFont: mainFont,
|
||||
},
|
||||
caret: {
|
||||
lineColour: toColour(255, 255, 255, 255),
|
||||
},
|
||||
placeholder: {
|
||||
backgroundColour: toColour(0, 0, 0, 120),
|
||||
textColour: toColour(200, 200, 200, 200),
|
||||
textSize: 10.0,
|
||||
textFont: mainFont,
|
||||
}
|
||||
});
|
||||
newCharacter.firstNameInput.placeholder = "First Name";
|
||||
newCharacter.firstNameInput = newCharacter.window.textInput(20, 125, 260, 25, '', {
|
||||
main: {
|
||||
backgroundColour: toColour(0, 0, 0, 120),
|
||||
textColour: toColour(200, 200, 200, 255),
|
||||
textSize: 10.0,
|
||||
textFont: mainFont,
|
||||
},
|
||||
caret: {
|
||||
lineColour: toColour(255, 255, 255, 255),
|
||||
},
|
||||
placeholder: {
|
||||
backgroundColour: toColour(0, 0, 0, 120),
|
||||
textColour: toColour(200, 200, 200, 200),
|
||||
textSize: 10.0,
|
||||
textFont: mainFont,
|
||||
}
|
||||
});
|
||||
newCharacter.firstNameInput.placeholder = "First Name";
|
||||
|
||||
newCharacter.lastNameInput = newCharacter.window.textInput(20, 155, 260, 25, '', {
|
||||
main: {
|
||||
backgroundColour: toColour(0, 0, 0, 120),
|
||||
textColour: toColour(200, 200, 200, 255),
|
||||
textSize: 10.0,
|
||||
textFont: mainFont,
|
||||
},
|
||||
caret: {
|
||||
lineColour: toColour(255, 255, 255, 255),
|
||||
},
|
||||
placeholder: {
|
||||
backgroundColour: toColour(0, 0, 0, 120),
|
||||
textColour: toColour(150, 150, 150, 200),
|
||||
textSize: 10.0,
|
||||
textFont: mainFont,
|
||||
}
|
||||
});
|
||||
newCharacter.lastNameInput.placeholder = "Last Name";
|
||||
newCharacter.lastNameInput = newCharacter.window.textInput(20, 155, 260, 25, '', {
|
||||
main: {
|
||||
backgroundColour: toColour(0, 0, 0, 120),
|
||||
textColour: toColour(200, 200, 200, 255),
|
||||
textSize: 10.0,
|
||||
textFont: mainFont,
|
||||
},
|
||||
caret: {
|
||||
lineColour: toColour(255, 255, 255, 255),
|
||||
},
|
||||
placeholder: {
|
||||
backgroundColour: toColour(0, 0, 0, 120),
|
||||
textColour: toColour(150, 150, 150, 200),
|
||||
textSize: 10.0,
|
||||
textFont: mainFont,
|
||||
}
|
||||
});
|
||||
newCharacter.lastNameInput.placeholder = "Last Name";
|
||||
|
||||
newCharacter.createCharacterButton = newCharacter.window.button(20, 185, 260, 25, 'CREATE CHARACTER', {
|
||||
main: {
|
||||
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha),
|
||||
textColour: toColour(255, 255, 255, 255),
|
||||
textSize: 10.0,
|
||||
textFont: mainFont,
|
||||
textAlign: 0.5,
|
||||
},
|
||||
focused: {
|
||||
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha),
|
||||
},
|
||||
}, checkNewCharacter);
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Created new character GUI`);
|
||||
newCharacter.createCharacterButton = newCharacter.window.button(20, 185, 260, 25, 'CREATE CHARACTER', {
|
||||
main: {
|
||||
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha),
|
||||
textColour: toColour(255, 255, 255, 255),
|
||||
textSize: 10.0,
|
||||
textFont: mainFont,
|
||||
textAlign: 0.5,
|
||||
},
|
||||
focused: {
|
||||
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha),
|
||||
},
|
||||
}, checkNewCharacter);
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Created new character GUI`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -133,8 +135,6 @@ function newCharacterFailed(errorMessage) {
|
||||
|
||||
function checkNewCharacter() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Checking new character with server ...`);
|
||||
let skinId = false;
|
||||
|
||||
if(newCharacter.firstNameInput.lines[0].length < 2) {
|
||||
return false;
|
||||
}
|
||||
@@ -157,8 +157,10 @@ function showNewCharacterGUI() {
|
||||
setChatWindowEnabled(false);
|
||||
mexui.setInput(true);
|
||||
newCharacter.window.shown = true;
|
||||
mexui.focusedInput = newCharacter.firstNameInput;
|
||||
guiSubmitButton = checkNewCharacter;
|
||||
mexui.focusedInput = newCharacter.firstNameInput;
|
||||
guiSubmitButton = checkNewCharacter;
|
||||
|
||||
showLocaleChooserGUI();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -39,8 +39,9 @@ function initRegisterGUI() {
|
||||
});
|
||||
register.window.titleBarIconSize = toVector2(0,0);
|
||||
register.window.titleBarHeight = 0;
|
||||
register.window.titleBarShown = false;
|
||||
|
||||
register.window.image(5, 20, 290, 100, mainLogoPath, {
|
||||
register.window.image(100, 20, 100, 100, mainLogoPath, {
|
||||
focused: {
|
||||
borderColour: toColour(0, 0, 0, 0),
|
||||
},
|
||||
@@ -160,6 +161,9 @@ function showRegistrationGUI() {
|
||||
register.window.shown = true;
|
||||
mexui.focusedControl = register.passwordInput;
|
||||
guiSubmitKey = checkRegistration;
|
||||
|
||||
showLocaleChooserGUI();
|
||||
|
||||
//showSmallGameMessage(`If you don't have a mouse cursor, press ${toUpperCase(getKeyNameFromId(disableGUIKey))} to disable GUI`, COLOUR_WHITE, 7500);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,11 +7,10 @@
|
||||
// TYPE: Client (JavaScript)
|
||||
// ===========================================================================
|
||||
|
||||
let resetPassword = {
|
||||
let passwordReset = {
|
||||
window: null,
|
||||
logoImage: null,
|
||||
messageLabel: null,
|
||||
emailLabel: null,
|
||||
emailInput: null,
|
||||
resetPasswordButton: null,
|
||||
backToLoginButton: null,
|
||||
@@ -22,7 +21,7 @@ let resetPassword = {
|
||||
|
||||
function initResetPasswordGUI() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating password reset GUI ...`);
|
||||
resetPassword.window = mexui.window(game.width/2-150, game.height/2-130, 300, 260, 'RESET PASSWORD', {
|
||||
passwordReset.window = mexui.window(game.width/2-150, game.height/2-130, 300, 260, 'RESET PASSWORD', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
transitionTime: 500,
|
||||
@@ -39,16 +38,17 @@ function initResetPasswordGUI() {
|
||||
borderColour: toColour(0, 0, 0, 0),
|
||||
},
|
||||
});
|
||||
resetPassword.window.titleBarIconSize = toVector2(0,0);
|
||||
resetPassword.window.titleBarHeight = 0;
|
||||
passwordReset.window.titleBarIconSize = toVector2(0,0);
|
||||
passwordReset.window.titleBarHeight = 0;
|
||||
passwordReset.window.titleBarShown = false;
|
||||
|
||||
resetPassword.logoImage = resetPassword.window.image(5, 20, 290, 80, mainLogoPath, {
|
||||
passwordReset.logoImage = passwordReset.window.image(5, 20, 290, 80, mainLogoPath, {
|
||||
focused: {
|
||||
borderColour: toColour(0, 0, 0, 0),
|
||||
},
|
||||
});
|
||||
|
||||
resetPassword.messageLabel = resetPassword.window.text(20, 135, 260, 20, 'Please confirm your email', {
|
||||
passwordReset.messageLabel = passwordReset.window.text(20, 135, 260, 20, 'Please confirm your email', {
|
||||
main: {
|
||||
textSize: 10.0,
|
||||
textAlign: 0.5,
|
||||
@@ -60,7 +60,7 @@ function initResetPasswordGUI() {
|
||||
},
|
||||
});
|
||||
|
||||
resetPassword.emailInput = resetPassword.window.textInput(20, 170, 260, 25, '', {
|
||||
passwordReset.emailInput = passwordReset.window.textInput(20, 170, 260, 25, '', {
|
||||
main: {
|
||||
backgroundColour: toColour(0, 0, 0, 120),
|
||||
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], textInputAlpha),
|
||||
@@ -80,9 +80,9 @@ function initResetPasswordGUI() {
|
||||
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], 255),
|
||||
},
|
||||
});
|
||||
resetPassword.emailInput.placeholder = "Email";
|
||||
passwordReset.emailInput.placeholder = "Email";
|
||||
|
||||
resetPassword.resetPasswordButton = resetPassword.window.button(20, 205, 260, 30, 'RESET PASSWORD', {
|
||||
passwordReset.resetPasswordButton = passwordReset.window.button(20, 205, 260, 30, 'RESET PASSWORD', {
|
||||
main: {
|
||||
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha),
|
||||
textColour: toColour(primaryTextColour[0], primaryTextColour[1], primaryTextColour[2], 255),
|
||||
@@ -95,7 +95,7 @@ function initResetPasswordGUI() {
|
||||
},
|
||||
}, checkResetPassword);
|
||||
|
||||
resetPassword.backToLoginButton = resetPassword.window.button(200, 240, 80, 15, 'LOGIN', {
|
||||
passwordReset.backToLoginButton = passwordReset.window.button(200, 240, 80, 15, 'LOGIN', {
|
||||
main: {
|
||||
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha),
|
||||
textColour: toColour(primaryTextColour[0], primaryTextColour[1], primaryTextColour[2], 255),
|
||||
@@ -108,7 +108,7 @@ function initResetPasswordGUI() {
|
||||
},
|
||||
}, switchToLoginGUI);
|
||||
|
||||
resetPassword.backToLoginLabel = resetPassword.window.text(125, 240, 60, 15, 'Remember your password?', {
|
||||
passwordReset.backToLoginLabel = passwordReset.window.text(125, 240, 60, 15, 'Remember your password?', {
|
||||
main: {
|
||||
textSize: 8.0,
|
||||
textAlign: 1.0,
|
||||
@@ -130,9 +130,11 @@ function showResetPasswordGUI() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Showing password reset window`);
|
||||
setChatWindowEnabled(false);
|
||||
mexui.setInput(true);
|
||||
resetPassword.window.shown = true;
|
||||
mexui.focusedControl = resetPassword.emailInput;
|
||||
passwordReset.window.shown = true;
|
||||
mexui.focusedControl = passwordReset.emailInput;
|
||||
guiSubmitButton = checkResetPassword;
|
||||
|
||||
showLocaleChooserGUI();
|
||||
//showSmallGameMessage(`If you don't have a mouse cursor, press ${toUpperCase(getKeyNameFromId(disableGUIKey))} to disable GUI`, COLOUR_WHITE, 7500);
|
||||
}
|
||||
|
||||
@@ -140,16 +142,16 @@ function showResetPasswordGUI() {
|
||||
|
||||
function checkResetPassword() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Checking password reset with server ...`);
|
||||
sendNetworkEventToServer("vrr.checkResetPassword", resetPassword.emailInput.lines[0]);
|
||||
sendNetworkEventToServer("vrr.checkResetPassword", passwordReset.emailInput.lines[0]);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function resetPasswordFailed(errorMessage) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Server reports password reset failed`);
|
||||
resetPassword.messageLabel.text = errorMessage;
|
||||
resetPassword.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255);
|
||||
resetPassword.emailInput.text = "";
|
||||
passwordReset.messageLabel.text = errorMessage;
|
||||
passwordReset.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255);
|
||||
passwordReset.emailInput.text = "";
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -157,10 +159,10 @@ function resetPasswordFailed(errorMessage) {
|
||||
function resetPasswordCodeInputGUI() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Server reports password reset was successful`);
|
||||
|
||||
resetPassword.messageLabel.text = "Check your email for a verification code";
|
||||
resetPassword.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255);
|
||||
resetPassword.emailInput.text = "";
|
||||
resetPassword.emailInput.placeholder = "Verification Code";
|
||||
passwordReset.messageLabel.text = "Check your email for a verification code";
|
||||
passwordReset.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255);
|
||||
passwordReset.emailInput.text = "";
|
||||
passwordReset.emailInput.placeholder = "Verification Code";
|
||||
|
||||
guiSubmitButton = checkResetPassword;
|
||||
closeAllWindows();
|
||||
|
||||
@@ -82,10 +82,17 @@ function showYesNoPromptGUI(promptMessage, promptTitle, yesButtonText, noButtonT
|
||||
closeAllWindows();
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Showing prompt window. Prompt: ${promptTitle} - ${promptMessage}`);
|
||||
mexui.setInput(true);
|
||||
|
||||
yesNoDialog.messageLabel.text = "";
|
||||
yesNoDialog.yesButton.text = "";
|
||||
yesNoDialog.noButton.text = "";
|
||||
yesNoDialog.window.title = "";
|
||||
|
||||
yesNoDialog.messageLabel.text = promptMessage;
|
||||
yesNoDialog.yesButton.text = yesButtonText;
|
||||
yesNoDialog.noButton.text = noButtonText;
|
||||
yesNoDialog.window.title = promptTitle;
|
||||
|
||||
yesNoDialog.window.shown = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,11 @@ let localPlayerWorking = false;
|
||||
let jobRouteLocationBlip = null;
|
||||
let jobRouteLocationSphere = null;
|
||||
|
||||
let jobBlipBlinkAmount = 0;
|
||||
let jobBlipBlinkTimes = 10;
|
||||
let jobBlipBlinkInterval = 500;
|
||||
let jobBlipBlinkTimer = null;
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
class JobData {
|
||||
@@ -52,7 +57,7 @@ function setLocalPlayerWorkingState(tempWorking) {
|
||||
function showJobRouteLocation(position, colour) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Job] Showing job route location`);
|
||||
if(getMultiplayerMod() == VRR_MPMOD_GTAC) {
|
||||
if(game.game == VRR_GAME_GTA_SA) {
|
||||
if(getGame() == VRR_GAME_GTA_SA) {
|
||||
// Server-side spheres don't show in GTA SA for some reason.
|
||||
jobRouteLocationSphere = game.createPickup(1318, position, 1);
|
||||
} else {
|
||||
@@ -64,7 +69,9 @@ function showJobRouteLocation(position, colour) {
|
||||
destroyElement(jobRouteLocationBlip);
|
||||
}
|
||||
|
||||
// Blinking is bugged if player hit the spot before it stops blinking.
|
||||
blinkJobRouteLocationBlip(10, position, colour);
|
||||
jobRouteLocationBlip = game.createBlip(position, 0, 2, colour);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,30 +79,48 @@ function showJobRouteLocation(position, colour) {
|
||||
|
||||
function enteredJobRouteSphere() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Job] Entered job route sphere`);
|
||||
|
||||
clearInterval(jobBlipBlinkTimer);
|
||||
jobBlipBlinkAmount = 0;
|
||||
jobBlipBlinkTimes = 0;
|
||||
|
||||
if(jobRouteLocationBlip != null) {
|
||||
destroyElement(jobRouteLocationBlip);
|
||||
jobRouteLocationBlip = null;
|
||||
}
|
||||
|
||||
if(jobRouteLocationSphere != null) {
|
||||
destroyElement(jobRouteLocationSphere);
|
||||
jobRouteLocationSphere = null;
|
||||
}
|
||||
|
||||
tellServerPlayerArrivedAtJobRouteLocation();
|
||||
destroyElement(jobRouteLocationSphere);
|
||||
destroyElement(jobRouteLocationBlip);
|
||||
jobRouteLocationSphere = null;
|
||||
jobRouteLocationBlip = null;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function blinkJobRouteLocationBlip(times, position, colour) {
|
||||
for(let i = 1 ; i <= times ; i++) {
|
||||
setTimeout(function() {
|
||||
jobBlipBlinkTimes = times;
|
||||
jobBlipBlinkTimer = setInterval(function() {
|
||||
if(jobRouteLocationBlip != null) {
|
||||
destroyElement(jobRouteLocationBlip);
|
||||
jobRouteLocationBlip = null;
|
||||
} else {
|
||||
jobRouteLocationBlip = game.createBlip(position, 0, 2, colour);
|
||||
}
|
||||
|
||||
if(jobBlipBlinkAmount >= jobBlipBlinkTimes) {
|
||||
if(jobRouteLocationBlip != null) {
|
||||
destroyElement(jobRouteLocationBlip);
|
||||
jobRouteLocationBlip = null;
|
||||
} else {
|
||||
jobRouteLocationBlip = game.createBlip(position, 0, 2, colour);
|
||||
}
|
||||
}, 500*i);
|
||||
}
|
||||
|
||||
setTimeout(function() {
|
||||
jobRouteLocationBlip = game.createBlip(position, 0, 2, colour);
|
||||
}, 500*times+1);
|
||||
jobBlipBlinkAmount = 0;
|
||||
jobBlipBlinkTimes = 0;
|
||||
jobRouteLocationBlip = game.createBlip(position, 0, 2, colour);
|
||||
clearInterval(jobBlipBlinkTimer);
|
||||
}
|
||||
}, jobBlipBlinkInterval);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"moduleResolution": "classic"
|
||||
},
|
||||
"include": [
|
||||
"*.js",
|
||||
"gui/*.js",
|
||||
"native/*.js",
|
||||
"../shared/*.js",
|
||||
"../third-party/mexui/*"
|
||||
]
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"moduleResolution": "classic"
|
||||
},
|
||||
"include": [
|
||||
"*.js",
|
||||
"gui/*.js",
|
||||
"native/*.js",
|
||||
"../shared/*.js",
|
||||
"../third-party/mexui/*"
|
||||
]
|
||||
}
|
||||
@@ -121,7 +121,6 @@ function renderPropertyEntranceLabel(name, position, locked, isBusiness, price,
|
||||
screenPosition.y -= propertyLabelPriceOffset;
|
||||
}
|
||||
|
||||
|
||||
if(isBusiness) {
|
||||
text = (locked) ? toUpperCase(getLocaleString("Closed")) : toUpperCase(getLocaleString("Open"));
|
||||
} else {
|
||||
@@ -131,42 +130,48 @@ function renderPropertyEntranceLabel(name, position, locked, isBusiness, price,
|
||||
if(!locked && labelInfoType != VRR_PROPLABEL_INFO_NONE) {
|
||||
let infoText = "";
|
||||
switch(labelInfoType) {
|
||||
case VRR_PROPLABEL_INFO_ENTER:
|
||||
case VRR_PROPLABEL_INFO_ENTER: {
|
||||
if(enterPropertyKey) {
|
||||
infoText = getLocaleString("PropertyEnterCommandLabel", "/enter");
|
||||
infoText = getLocaleString("PropertyEnterKeyPressLabel", toUpperCase(getKeyNameFromId(enterPropertyKey)));
|
||||
} else {
|
||||
infoText = getLocaleString("PropertyEnterKeyPressLabel", getKeyNameFromId(enterPropertyKey));
|
||||
infoText = getLocaleString("PropertyEnterCommandLabel", "/enter");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_PROPLABEL_INFO_BUY:
|
||||
case VRR_PROPLABEL_INFO_BUY: {
|
||||
infoText = getLocaleString("BusinessBuyItemsLabel", "/buy");
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_PROPLABEL_INFO_BUYBIZ:
|
||||
infoText = getLocaleString("PropertyForSaleLabel", price);
|
||||
case VRR_PROPLABEL_INFO_BUYBIZ: {
|
||||
infoText = getLocaleString("BuyBusinessLabel", "/bizbuy");
|
||||
break;
|
||||
}
|
||||
|
||||
//case VRR_PROPLABEL_INFO_RENTBIZ:
|
||||
// infoText = `Use /bizrent to buy this business`;
|
||||
// break;
|
||||
|
||||
case VRR_PROPLABEL_INFO_BUYHOUSE:
|
||||
infoText = getLocaleString("PropertyForSaleLabel", price);
|
||||
case VRR_PROPLABEL_INFO_BUYHOUSE: {
|
||||
infoText = getLocaleString("BuyHouseLabel", "/housebuy");
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_PROPLABEL_INFO_RENTHOUSE:
|
||||
infoText = getLocaleString("PropertyForRentLabel", rentPrice);
|
||||
case VRR_PROPLABEL_INFO_RENTHOUSE: {
|
||||
infoText = getLocaleString("RentHouseLabel", "/houserent");
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_PROPLABEL_INFO_ENTERVEH:
|
||||
case VRR_PROPLABEL_INFO_ENTERVEHICLE: {
|
||||
infoText = getLocaleString("VehicleDealershipLabel");
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_PROPLABEL_INFO_NONE:
|
||||
default:
|
||||
infoText = "";
|
||||
default: {
|
||||
if(enterPropertyKey) {
|
||||
infoText = getLocaleString("PropertyEnterKeyPressLabel", toUpperCase(getKeyNameFromId(enterPropertyKey)));
|
||||
} else {
|
||||
infoText = getLocaleString("PropertyEnterCommandLabel", "/enter");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(getDistance(localPlayer.position, position) <= renderLabelDistance-2) {
|
||||
let size = propertyLabelLockedFont.measure(infoText, game.width, 0.0, 0.0, propertyLabelLockedFont.size, true, true);
|
||||
@@ -347,21 +352,25 @@ function processLabelRendering() {
|
||||
}
|
||||
|
||||
switch(pickups[i].getData("vrr.label.type")) {
|
||||
case VRR_LABEL_BUSINESS:
|
||||
case VRR_LABEL_BUSINESS: {
|
||||
renderPropertyEntranceLabel(pickups[i].getData("vrr.label.name"), pickups[i].position, pickups[i].getData("vrr.label.locked"), true, price, rentPrice, labelInfoType);
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_LABEL_HOUSE:
|
||||
renderPropertyEntranceLabel("House", pickups[i].position, pickups[i].getData("vrr.label.locked"), false, price, rentPrice, labelInfoType);
|
||||
case VRR_LABEL_HOUSE: {
|
||||
renderPropertyEntranceLabel(pickups[i].getData("vrr.label.name"), pickups[i].position, pickups[i].getData("vrr.label.locked"), false, price, rentPrice, labelInfoType);
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_LABEL_JOB:
|
||||
case VRR_LABEL_JOB: {
|
||||
renderJobLabel(pickups[i].getData("vrr.label.name"), pickups[i].position, pickups[i].getData("vrr.label.jobType"));
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_LABEL_EXIT:
|
||||
case VRR_LABEL_EXIT: {
|
||||
renderPropertyExitLabel(pickups[i].position);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,11 +8,15 @@
|
||||
// ===========================================================================
|
||||
|
||||
function getLocaleString(stringName, ...args) {
|
||||
if(typeof getServerData().localeStrings[stringName] == undefined) {
|
||||
if(typeof getServerData().localeStrings[localLocaleId][stringName] == undefined) {
|
||||
return "";
|
||||
}
|
||||
|
||||
let tempString = getServerData().localeStrings[stringName];
|
||||
let tempString = getServerData().localeStrings[localLocaleId][stringName];
|
||||
|
||||
if(tempString == "" || tempString == null || tempString == undefined) {
|
||||
return "";
|
||||
}
|
||||
|
||||
for(let i = 1; i <= args.length; i++) {
|
||||
tempString = tempString.replace(`{${i}}`, args[i-1]);
|
||||
@@ -23,9 +27,36 @@ function getLocaleString(stringName, ...args) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function receiveLocaleStringFromServer(stringName, stringValue) {
|
||||
logToConsole(LOG_INFO, `[VRR.Locale]: Received locale string "${stringName}" from server (${stringValue})`);
|
||||
getServerData().localeStrings[stringName] = stringValue;
|
||||
function getAvailableLocaleOptions() {
|
||||
return getServerData().localeOptions.filter(localeOption => localeOption.requiresUnicode == false);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function loadLocaleConfig() {
|
||||
let configFile = loadTextFile("config/client/locale.json");
|
||||
getServerData().localeOptions = JSON.parse(configFile);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function loadAllLocaleStrings() {
|
||||
let localeOptions = getServerData().localeOptions;
|
||||
for(let i in localeOptions) {
|
||||
logToConsole(LOG_INFO, `[VRR.Locale] Loading locale strings for ${localeOptions[i].englishName} (${i})`);
|
||||
let localeFile = loadTextFile(`locale/${localeOptions[i].stringsFile}`);
|
||||
let localeData = JSON.parse(localeFile);
|
||||
|
||||
getServerData().localeStrings[i] = localeData;
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setLocale(tempLocaleId) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Locale] Setting locale to ${tempLocaleId} (${getServerData().localeOptions[tempLocaleId].englishName})`);
|
||||
localLocaleId = tempLocaleId;
|
||||
resetGUIStrings();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -7,6 +7,9 @@
|
||||
// TYPE: Client (JavaScript)
|
||||
// ===========================================================================
|
||||
|
||||
let resourceReady = false;
|
||||
let resourceStarted = false;
|
||||
|
||||
let inSphere = false;
|
||||
let inVehicle = false;
|
||||
let inVehicleSeat = false;
|
||||
@@ -27,7 +30,7 @@ let renderHotBar = true;
|
||||
let renderItemActionDelay = true;
|
||||
let renderInteriorLights = true;
|
||||
|
||||
let logLevel = LOG_INFO|LOG_DEBUG|LOG_VERBOSE|LOG_WARN|LOG_ERROR;
|
||||
let logLevel = LOG_INFO|LOG_DEBUG|LOG_VERBOSE;
|
||||
|
||||
let weaponDamageEnabled = {};
|
||||
let weaponDamageEvent = {};
|
||||
@@ -75,10 +78,13 @@ let guiDownKey = false;
|
||||
// Pre-cache all allowed skins
|
||||
let allowedSkins = getAllowedSkins(getGame());
|
||||
|
||||
let localLocaleId = 0;
|
||||
|
||||
let serverData = {
|
||||
houses: [],
|
||||
businesses: [],
|
||||
localeStrings: [],
|
||||
localeOptions: [],
|
||||
vehicles: [],
|
||||
jobs: [],
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ function SetStandardControlsEnabled(bEnabled)
|
||||
|
||||
if (game.standardControls === undefined)
|
||||
{
|
||||
console.warn("game.standardControls not implemented");
|
||||
logToConsole(LOG_WARN, "game.standardControls not implemented");
|
||||
return;
|
||||
}
|
||||
game.standardControls = bEnabled;
|
||||
@@ -93,7 +93,7 @@ function GetMouseSensitivity()
|
||||
{
|
||||
if (game.getMouseSensitivity === undefined)
|
||||
{
|
||||
//console.error("game.getMouseSensitivity not implemented");
|
||||
//logToConsole(LOG_ERROR, "game.getMouseSensitivity not implemented");
|
||||
return [0.0025,0.003];
|
||||
}
|
||||
let MouseSensitivity = game.getMouseSensitivity();
|
||||
@@ -124,7 +124,7 @@ function ProcessLineOfSight(vecStartX, vecStartY, vecStartZ, vecEndX, vecEndY, v
|
||||
{
|
||||
if (game.processLineOfSight === undefined)
|
||||
{
|
||||
console.warn("game.processLineOfSight not implemented");
|
||||
logToConsole(LOG_WARN, "game.processLineOfSight not implemented");
|
||||
return [null];
|
||||
}
|
||||
let Result = game.processLineOfSight([vecStartX, vecStartY, vecStartZ], [vecEndX, vecEndY, vecEndZ], bCheckBuildings, bCheckVehicles, bCheckPeds, bCheckObjects, bCheckDummies, bCheckSeeThroughStuff, bIgnoreSomeObjectsForCamera);
|
||||
|
||||
@@ -48,7 +48,7 @@ function updatePlayerNameTag(clientName, characterName, colour, paused, ping) {
|
||||
playerPaused[clientName] = paused;
|
||||
playerPing[clientName] = ping;
|
||||
|
||||
if(game.game == VRR_GAME_GTA_IV) {
|
||||
if(getGame() == VRR_GAME_GTA_IV) {
|
||||
let client = getPlayerFromParams(clientName);
|
||||
if(client != false) {
|
||||
if(getPlayerPed(client) != null) {
|
||||
@@ -81,7 +81,7 @@ function drawNametag(x, y, health, armour, text, ping, alpha, distance, colour,
|
||||
// Health Bar
|
||||
|
||||
if(getMultiplayerMod() == VRR_MPMOD_GTAC) {
|
||||
if(game.game == VRR_GAME_GTA_III) {
|
||||
if(getGame() == VRR_GAME_GTA_III) {
|
||||
// Mickey Hamfists is ridiculously tall. Raise the nametag for him a bit
|
||||
if(skin == 109) {
|
||||
y -= 20;
|
||||
@@ -214,7 +214,7 @@ function getClientFromPlayer(player) {
|
||||
// ===========================================================================
|
||||
|
||||
function processNameTagRendering(event) {
|
||||
//if(game.game >= GAME_GTA_IV) {
|
||||
//if(getGame() >= GAME_GTA_IV) {
|
||||
// return false;
|
||||
//}
|
||||
|
||||
@@ -231,4 +231,10 @@ function createColour(alpha, red, green, blue) {
|
||||
return alpha << 24 | red << 16 | green << 8 | blue;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setNameTagDistance(distance) {
|
||||
nametagDistance = distance;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -7,6 +7,23 @@
|
||||
// TYPE: Server (JavaScript)
|
||||
// ===========================================================================
|
||||
|
||||
let disconnectReasons = [
|
||||
"Lost Connection",
|
||||
"Disconnected",
|
||||
"Unsupported Client",
|
||||
"Wrong Game",
|
||||
"Incorrect Password",
|
||||
"Unsupported Executable",
|
||||
"Disconnected",
|
||||
"Banned",
|
||||
"Failed",
|
||||
"Invalid Name",
|
||||
"Crashed",
|
||||
"Modified Game"
|
||||
];
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function sendNetworkEventToPlayer(networkEvent, client, ...args) {
|
||||
triggerNetworkEvent.apply(null, networkEvent, client, args);
|
||||
}
|
||||
@@ -29,28 +46,38 @@ function setPlayerPosition(position) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getElementPosition(element) {
|
||||
return element.position;
|
||||
function getElementPosition(elementId) {
|
||||
return getElementFromId(elementId).position;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setElementPosition(element, position) {
|
||||
if(!element.isSyncer) {
|
||||
return false;
|
||||
}
|
||||
|
||||
element.position = position;
|
||||
function getElementHeading(elementId) {
|
||||
return getElementFromId(elementId).heading;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function deleteGameElement(element, position) {
|
||||
if(!element.isOwner) {
|
||||
function setElementPosition(elementId, position) {
|
||||
if(getElementFromId(elementId) == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
destroyGameElement(element);
|
||||
if(!getElementFromId(elementId).isSyncer) {
|
||||
return false;
|
||||
}
|
||||
|
||||
getElementFromId(elementId).position = position;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function deleteGameElement(elementId, position) {
|
||||
if(!getElementFromId(elementId).isOwner) {
|
||||
return false;
|
||||
}
|
||||
|
||||
destroyGameElement(getElementFromId(elementId));
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -105,7 +132,7 @@ function getClientsInRange(position, distance) {
|
||||
// ===========================================================================
|
||||
|
||||
function getCiviliansInRange(position, distance) {
|
||||
return getElementsByType(ELEMENT_PED).filter(x => !x.isType(ELEMENT_PLAYER) && getElementPosition(x).position.distance(position) <= distance);
|
||||
return getElementsByType(ELEMENT_PED).filter(x => !x.isType(ELEMENT_PLAYER) && x.position.distance(position) <= distance);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -117,7 +144,7 @@ function getPlayersInRange(position, distance) {
|
||||
// ===========================================================================
|
||||
|
||||
function getElementsByTypeInRange(elementType, position, distance) {
|
||||
return getElementsByType(elementType).filter(x => getElementPosition(x).position.distance(position) <= distance);
|
||||
return getElementsByType(elementType).filter(x => x.position.distance(position) <= distance);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -172,6 +199,91 @@ function setEntityData(entity, dataName, dataValue, syncToClients = true) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setVehicleEngine(vehicleId, state) {
|
||||
getElementFromId(vehicleId).engine = state;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setVehicleLights(vehicleId, state) {
|
||||
getElementFromId(vehicleId).lights = state;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function repairVehicle(syncId) {
|
||||
getVehicleFromSyncId(syncId).fix();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function syncVehicleProperties(vehicle) {
|
||||
if(doesEntityDataExist(vehicle, "vrr.lights")) {
|
||||
let lightStatus = getEntityData(vehicle, "vrr.lights");
|
||||
vehicle.lights = lightStatus;
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(vehicle, "vrr.invincible")) {
|
||||
let invincible = getEntityData(vehicle, "vrr.invincible");
|
||||
element.setProofs(invincible, invincible, invincible, invincible, invincible);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(vehicle, "vrr.panelStatus")) {
|
||||
let panelsStatus = getEntityData(vehicle, "vrr.panelStatus");
|
||||
for(let i in panelsStatus) {
|
||||
vehicle.setPanelStatus(i, panelsStatus[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(vehicle, "vrr.wheelStatus")) {
|
||||
let wheelsStatus = getEntityData(vehicle, "vrr.wheelStatus");
|
||||
for(let i in wheelsStatus) {
|
||||
vehicle.setWheelStatus(i, wheelsStatus[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(vehicle, "vrr.lightStatus")) {
|
||||
let lightStatus = getEntityData(vehicle, "vrr.lightStatus");
|
||||
for(let i in lightStatus) {
|
||||
vehicle.setLightStatus(i, lightStatus[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(vehicle, "vrr.suspensionHeight")) {
|
||||
let suspensionHeight = getEntityData(vehicle, "vrr.suspensionHeight");
|
||||
vehicle.setSuspensionHeight(suspensionHeight);
|
||||
}
|
||||
|
||||
if(getGame() == VRR_GAME_GTA_SA) {
|
||||
let allUpgrades = getGameConfig().vehicleUpgrades[getGame()];
|
||||
for(let i in allUpgrades) {
|
||||
vehicle.removeUpgrade(i);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(vehicle, "vrr.upgrades")) {
|
||||
let upgrades = getEntityData(vehicle, "vrr.upgrades");
|
||||
for(let i in upgrades) {
|
||||
if(upgrades[i] != 0) {
|
||||
vehicle.addUpgrade(upgrades[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(getGame() == VRR_GAME_GTA_SA || getGame() == VRR_GAME_GTA_IV) {
|
||||
if(doesEntityDataExist(vehicle, "vrr.livery")) {
|
||||
let livery = getEntityData(vehicle, "vrr.livery");
|
||||
if(getGame() == VRR_GAME_GTA_SA) {
|
||||
vehicle.setPaintJob(livery);
|
||||
} else if(getGame() == VRR_GAME_GTA_IV) {
|
||||
vehicle.livery = livery;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function removeEntityData(entity, dataName) {
|
||||
if(entity != null) {
|
||||
return entity.removeData(dataName);
|
||||
@@ -188,4 +300,378 @@ function doesEntityDataExist(entity, dataName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function syncCivilianProperties(civilian) {
|
||||
if(getGame() == VRR_GAME_GTA_III) {
|
||||
if(doesEntityDataExist(civilian, "vrr.scale")) {
|
||||
let scaleFactor = getEntityData(civilian, "vrr.scale");
|
||||
let tempMatrix = civilian.matrix;
|
||||
tempMatrix.setScale(toVector3(scaleFactor.x, scaleFactor.y, scaleFactor.z));
|
||||
let tempPosition = civilian.position;
|
||||
civilian.matrix = tempMatrix;
|
||||
tempPosition.z += scaleFactor.z;
|
||||
civilian.position = tempPosition;
|
||||
}
|
||||
}
|
||||
|
||||
if(getGame() == VRR_GAME_GTA_SA) {
|
||||
if(doesEntityDataExist(civilian, "vrr.fightStyle")) {
|
||||
let fightStyle = getEntityData(civilian, "vrr.fightStyle");
|
||||
civilian.setFightStyle(fightStyle[0], fightStyle[1]);
|
||||
}
|
||||
}
|
||||
|
||||
if(getGame() == VRR_GAME_GTA_III) {
|
||||
if(doesEntityDataExist(civilian, "vrr.walkStyle")) {
|
||||
let walkStyle = getEntityData(civilian, "vrr.walkStyle");
|
||||
civilian.walkStyle = walkStyle;
|
||||
}
|
||||
}
|
||||
|
||||
if(getGame() == VRR_GAME_GTA_IV) {
|
||||
if(doesEntityDataExist(civilian, "vrr.bodyPropHair")) {
|
||||
let bodyPropHair = getEntityData(civilian, "vrr.bodyPropHair");
|
||||
civilian.changeBodyProp(0, bodyPropHair[0], bodyPropHair[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(civilian, "vrr.bodyPropHead")) {
|
||||
let bodyPropHead = getEntityData(civilian, "vrr.bodyPropHead");
|
||||
civilian.changeBodyProp(1, bodyPropHead[0], bodyPropHead[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(civilian, "vrr.bodyPropEyes")) {
|
||||
let bodyPropEyes = getEntityData(civilian, "vrr.bodyPropEyes");
|
||||
civilian.changeBodyProp(1, bodyPropEyes[0], bodyPropEyes[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(civilian, "vrr.bodyPropLeftHand")) {
|
||||
let bodyPropLeftHand = getEntityData(civilian, "vrr.bodyPropLeftHand");
|
||||
civilian.changeBodyProp(1, bodyPropLeftHand[0], bodyPropLeftHand[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(civilian, "vrr.bodyPropRightHand")) {
|
||||
let bodyPropRightHand = getEntityData(civilian, "vrr.bodyPropRightHand");
|
||||
civilian.changeBodyProp(1, bodyPropRightHand[0], bodyPropRightHand[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(civilian, "vrr.bodyPropLeftWrist")) {
|
||||
let bodyPropLeftWrist = getEntityData(civilian, "vrr.bodyPropLeftWrist");
|
||||
civilian.changeBodyProp(1, bodyPropLeftWrist[0], bodyPropLeftWrist[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(civilian, "vrr.bodyPropRightWrist")) {
|
||||
let bodyPropRightWrist = getEntityData(civilian, "vrr.bodyPropRightWrist");
|
||||
civilian.changeBodyProp(1, bodyPropRightWrist[0], bodyPropRightWrist[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(civilian, "vrr.bodyPropRightWrist")) {
|
||||
let bodyPropRightWrist = getEntityData(civilian, "vrr.bodyPropRightWrist");
|
||||
civilian.changeBodyProp(1, bodyPropRightWrist[0], bodyPropRightWrist[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(civilian, "vrr.bodyPropHip")) {
|
||||
let bodyPropHip = getEntityData(civilian, "vrr.bodyPropHip");
|
||||
civilian.changeBodyProp(1, bodyPropHip[0], bodyPropHip[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(civilian, "vrr.bodyPropLeftFoot")) {
|
||||
let bodyPropLeftFoot = getEntityData(civilian, "vrr.bodyPropLeftFoot");
|
||||
civilian.changeBodyProp(1, bodyPropLeftFoot[0], bodyPropLeftFoot[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(civilian, "vrr.bodyPropRightFoot")) {
|
||||
let bodyPropRightFoot = getEntityData(civilian, "vrr.bodyPropRightFoot");
|
||||
civilian.changeBodyProp(1, bodyPropRightFoot[0], bodyPropRightFoot[1]);
|
||||
}
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(civilian, "vrr.anim")) {
|
||||
let animData = getEntityData(vehicle, "vrr.anim");
|
||||
civilian.addAnimation(animData[0], animData[1]);
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function preventDefaultEventAction(event) {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function syncPlayerProperties(player) {
|
||||
if(getGame() == VRR_GAME_GTA_III) {
|
||||
if(doesEntityDataExist(player, "vrr.scale")) {
|
||||
let scaleFactor = getEntityData(player, "vrr.scale");
|
||||
let tempMatrix = player.matrix;
|
||||
tempMatrix.setScale(toVector3(scaleFactor.x, scaleFactor.y, scaleFactor.z));
|
||||
let tempPosition = player.position;
|
||||
player.matrix = tempMatrix;
|
||||
tempPosition.z += scaleFactor.z;
|
||||
player.position = tempPosition;
|
||||
}
|
||||
}
|
||||
|
||||
if(getGame() == VRR_GAME_GTA_SA) {
|
||||
if(doesEntityDataExist(player, "vrr.fightStyle")) {
|
||||
let fightStyle = getEntityData(player, "vrr.fightStyle");
|
||||
player.setFightStyle(fightStyle[0], fightStyle[1]);
|
||||
}
|
||||
}
|
||||
|
||||
//if(getGame() == VRR_GAME_GTA_SA) {
|
||||
// if(doesEntityDataExist(player, "vrr.walkStyle")) {
|
||||
// let walkStyle = getEntityData(player, "vrr.walkStyle");
|
||||
// player.walkStyle = walkStyle;
|
||||
// }
|
||||
//}
|
||||
|
||||
if(getGame() == VRR_GAME_GTA_IV) {
|
||||
if(doesEntityDataExist(player, "vrr.bodyPartHair")) {
|
||||
let bodyPartHead = getEntityData(player, "vrr.bodyPartHair");
|
||||
player.changeBodyPart(0, bodyPartHead[0], bodyPartHair[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(player, "vrr.bodyPartHead")) {
|
||||
let bodyPartHead = getEntityData(player, "vrr.bodyPartHead");
|
||||
player.changeBodyPart(1, bodyPartHead[0], bodyPartHead[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(player, "vrr.bodyPartUpper")) {
|
||||
let bodyPartUpper = getEntityData(player, "vrr.bodyPartUpper");
|
||||
player.changeBodyPart(1, bodyPartUpper[0], bodyPartUpper[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(player, "vrr.bodyPartLower")) {
|
||||
let bodyPartLower = getEntityData(player, "vrr.bodyPartLower");
|
||||
player.changeBodyPart(1, bodyPartLower[0], bodyPartLower[1]);
|
||||
}
|
||||
}
|
||||
|
||||
if(getGame() == VRR_GAME_GTA_IV) {
|
||||
if(doesEntityDataExist(player, "vrr.bodyPropHair")) {
|
||||
let bodyPropHair = getEntityData(player, "vrr.bodyPropHair");
|
||||
player.changeBodyProp(0, bodyPropHair[0], bodyPropHair[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(player, "vrr.bodyPropHead")) {
|
||||
let bodyPropHead = getEntityData(player, "vrr.bodyPropHead");
|
||||
player.changeBodyProp(1, bodyPropHead[0], bodyPropHead[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(player, "vrr.bodyPropEyes")) {
|
||||
let bodyPropEyes = getEntityData(player, "vrr.bodyPropEyes");
|
||||
player.changeBodyProp(1, bodyPropEyes[0], bodyPropEyes[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(player, "vrr.bodyPropLeftHand")) {
|
||||
let bodyPropLeftHand = getEntityData(player, "vrr.bodyPropLeftHand");
|
||||
player.changeBodyProp(1, bodyPropLeftHand[0], bodyPropLeftHand[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(player, "vrr.bodyPropRightHand")) {
|
||||
let bodyPropRightHand = getEntityData(player, "vrr.bodyPropRightHand");
|
||||
player.changeBodyProp(1, bodyPropRightHand[0], bodyPropRightHand[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(player, "vrr.bodyPropLeftWrist")) {
|
||||
let bodyPropLeftWrist = getEntityData(player, "vrr.bodyPropLeftWrist");
|
||||
player.changeBodyProp(1, bodyPropLeftWrist[0], bodyPropLeftWrist[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(player, "vrr.bodyPropRightWrist")) {
|
||||
let bodyPropRightWrist = getEntityData(player, "vrr.bodyPropRightWrist");
|
||||
player.changeBodyProp(1, bodyPropRightWrist[0], bodyPropRightWrist[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(player, "vrr.bodyPropRightWrist")) {
|
||||
let bodyPropRightWrist = getEntityData(player, "vrr.bodyPropRightWrist");
|
||||
player.changeBodyProp(1, bodyPropRightWrist[0], bodyPropRightWrist[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(player, "vrr.bodyPropHip")) {
|
||||
let bodyPropHip = getEntityData(player, "vrr.bodyPropHip");
|
||||
player.changeBodyProp(1, bodyPropHip[0], bodyPropHip[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(player, "vrr.bodyPropLeftFoot")) {
|
||||
let bodyPropLeftFoot = getEntityData(player, "vrr.bodyPropLeftFoot");
|
||||
player.changeBodyProp(1, bodyPropLeftFoot[0], bodyPropLeftFoot[1]);
|
||||
}
|
||||
|
||||
if(doesEntityDataExist(player, "vrr.bodyPropRightFoot")) {
|
||||
let bodyPropRightFoot = getEntityData(player, "vrr.bodyPropRightFoot");
|
||||
player.changeBodyProp(1, bodyPropRightFoot[0], bodyPropRightFoot[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function syncObjectProperties(object) {
|
||||
if(getGame() == VRR_GAME_GTA_III || getGame() == VRR_GAME_GTA_VC) {
|
||||
if(doesEntityDataExist(object, "vrr.scale")) {
|
||||
let scaleFactor = getEntityData(object, "vrr.scale");
|
||||
let tempMatrix = object.matrix;
|
||||
tempMatrix.setScale(toVector3(scaleFactor.x, scaleFactor.y, scaleFactor.z));
|
||||
let tempPosition = object.position;
|
||||
object.matrix = tempMatrix;
|
||||
tempPosition.z += scaleFactor.z;
|
||||
object.position = tempPosition;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function consolePrint(text) {
|
||||
console.log(text);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function consoleWarn(text) {
|
||||
console.warn(text);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function consoleError(text) {
|
||||
console.error(text);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerName(client) {
|
||||
return client.name;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getGame() {
|
||||
return game.game;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerId(client) {
|
||||
return client.index;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function syncElementProperties(element) {
|
||||
if(doesEntityDataExist(element, "vrr.interior")) {
|
||||
if(typeof element.interior != "undefined") {
|
||||
element.interior = getEntityData(element, "vrr.interior");
|
||||
}
|
||||
}
|
||||
|
||||
switch(element.type) {
|
||||
case ELEMENT_VEHICLE:
|
||||
syncVehicleProperties(element);
|
||||
break;
|
||||
|
||||
case ELEMENT_PED:
|
||||
syncCivilianProperties(element);
|
||||
break;
|
||||
|
||||
case ELEMENT_PLAYER:
|
||||
syncPlayerProperties(element);
|
||||
break;
|
||||
|
||||
case ELEMENT_OBJECT:
|
||||
syncObjectProperties(element);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerPed(client) {
|
||||
return client.player;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getScreenWidth() {
|
||||
return game.width;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getScreenHeight() {
|
||||
return game.height;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function openAllGarages() {
|
||||
switch(getGame()) {
|
||||
case VRR_GAME_GTA_III:
|
||||
for(let i=0;i<=26;i++) {
|
||||
openGarage(i);
|
||||
game.NO_SPECIAL_CAMERA_FOR_THIS_GARAGE(i);
|
||||
}
|
||||
break;
|
||||
|
||||
case VRR_GAME_GTA_VC:
|
||||
for(let i=0;i<=32;i++) {
|
||||
openGarage(i);
|
||||
game.NO_SPECIAL_CAMERA_FOR_THIS_GARAGE(i);
|
||||
}
|
||||
break;
|
||||
|
||||
case VRR_GAME_GTA_SA:
|
||||
for(let i=0;i<=44;i++) {
|
||||
openGarage(i);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function closeAllGarages() {
|
||||
switch(getGame()) {
|
||||
case VRR_GAME_GTA_III:
|
||||
for(let i=0;i<=26;i++) {
|
||||
closeGarage(i);
|
||||
game.NO_SPECIAL_CAMERA_FOR_THIS_GARAGE(i);
|
||||
}
|
||||
break;
|
||||
|
||||
case VRR_GAME_GTA_VC:
|
||||
for(let i=0;i<=32;i++) {
|
||||
closeGarage(i);
|
||||
game.NO_SPECIAL_CAMERA_FOR_THIS_GARAGE(i);
|
||||
}
|
||||
break;
|
||||
|
||||
case VRR_GAME_GTA_SA:
|
||||
for(let i=0;i<=44;i++) {
|
||||
closeGarage(i);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setPedInvincible(ped, state) {
|
||||
ped.invincible = state;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -85,6 +85,7 @@ function addAllNetworkHandlers() {
|
||||
addNetworkEventHandler("vrr.showRegistration", showRegistrationGUI);
|
||||
addNetworkEventHandler("vrr.showNewCharacter", showNewCharacterGUI);
|
||||
addNetworkEventHandler("vrr.showLogin", showLoginGUI);
|
||||
addNetworkEventHandler("vrr.2fa", showTwoFactorAuthGUI);
|
||||
|
||||
// Business
|
||||
addNetworkEventHandler("vrr.business", receiveBusinessFromServer);
|
||||
@@ -92,8 +93,12 @@ function addAllNetworkHandlers() {
|
||||
// House
|
||||
addNetworkEventHandler("vrr.house", receiveHouseFromServer);
|
||||
|
||||
// GPS
|
||||
addNetworkEventHandler("vrr.showGPSBlip", showGPSLocation);
|
||||
|
||||
// Locale
|
||||
addNetworkEventHandler("vrr.localeString", receiveLocaleStringFromServer);
|
||||
addNetworkEventHandler("vrr.locale", setLocale);
|
||||
addNetworkEventHandler("vrr.localeChooser", toggleLocaleChooserGUI);
|
||||
|
||||
// Misc
|
||||
addNetworkEventHandler("vrr.mouseCursor", toggleMouseCursor);
|
||||
@@ -114,6 +119,7 @@ function addAllNetworkHandlers() {
|
||||
addNetworkEventHandler("vrr.logLevel", setLogLevel);
|
||||
addNetworkEventHandler("vrr.hideAllGUI", hideAllGUI);
|
||||
addNetworkEventHandler("vrr.nametag", updatePlayerNameTag);
|
||||
addNetworkEventHandler("vrr.nametagDistance", setNameTagDistance);
|
||||
addNetworkEventHandler("vrr.ping", updatePlayerPing);
|
||||
addNetworkEventHandler("vrr.pedAnim", makePedPlayAnimation);
|
||||
addNetworkEventHandler("vrr.pedStopAnim", makePedStopAnimation);
|
||||
@@ -256,20 +262,6 @@ function forceSyncElementProperties(elementId) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setElementPosition(elementId, position) {
|
||||
if(getElementFromId(elementId) == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!getElementFromId(elementId).isSyncer) {
|
||||
return false;
|
||||
}
|
||||
|
||||
getElementFromId(elementId).position = position;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setElementCollisionsEnabled(elementId, state) {
|
||||
if(getElementFromId(elementId) == null) {
|
||||
return false;
|
||||
@@ -311,15 +303,9 @@ function setLocalPlayerInfiniteRun(state) {
|
||||
// ===========================================================================
|
||||
|
||||
function setLocalPlayerSkin(skinId) {
|
||||
logToConsole(LOG_INFO, skinId);
|
||||
logToConsole(LOG_INFO, `[VRR.Server] Setting locale player skin to ${skinId}`);
|
||||
if(getGame() == VRR_GAME_GTA_IV) {
|
||||
if(natives.isModelInCdimage(skinId)) {
|
||||
natives.requestModel(skinId);
|
||||
natives.loadAllObjectsNow();
|
||||
if(natives.hasModelLoaded(skinId)) {
|
||||
natives.changePlayerModel(natives.getPlayerId(), skinId);
|
||||
}
|
||||
}
|
||||
natives.changePlayerModel(natives.getPlayerId(), skinId);
|
||||
} else {
|
||||
localPlayer.skin = skinId;
|
||||
}
|
||||
@@ -392,4 +378,10 @@ function serverRequestedLocalPlayerSpawn(skinId, position) {
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function sendLocaleSelectToServer(localeId) {
|
||||
sendNetworkEventToServer("vrr.localeSelect", localeId);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -26,7 +26,7 @@ function initClientScripts() {
|
||||
|
||||
function setUpInitialGame() {
|
||||
switch(getGame()) {
|
||||
case VRR_GAME_GTA_III:
|
||||
case [VRR_GAME_GTA_III]: {
|
||||
game.SET_PLAYER_NEVER_GETS_TIRED(game.GET_PLAYER_ID(), 0);
|
||||
game.setGameStat(STAT_PROGRESSMADE, 9999);
|
||||
game.setGameStat(STAT_TOTALPROGRESSINGAME, 9999);
|
||||
@@ -35,8 +35,9 @@ function setUpInitialGame() {
|
||||
game.onMission = true; // Disables taxi/vigilante/etc and other start mission triggers
|
||||
SetStandardControlsEnabled(true); // Provided by mouse camera script (mousecam.js)
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_GAME_GTA_VC:
|
||||
case [VRR_GAME_GTA_VC]: {
|
||||
game.SET_PLAYER_NEVER_GETS_TIRED(game.GET_PLAYER_ID(), 0);
|
||||
game.setGameStat(STAT_PROGRESSMADE, 9999);
|
||||
game.setGameStat(STAT_TOTALPROGRESSINGAME, 9999);
|
||||
@@ -69,8 +70,9 @@ function setUpInitialGame() {
|
||||
game.onMission = true; // Disables taxi/vigilante/etc and other start mission triggers
|
||||
SetStandardControlsEnabled(true); // Provided by mouse camera script (mousecam.js)
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_GAME_GTA_SA:
|
||||
case [VRR_GAME_GTA_SA]: {
|
||||
game.setGameStat(STAT_WEAPONTYPE_PISTOL_SKILL, 400);
|
||||
game.setGameStat(STAT_WEAPONTYPE_PISTOL_SILENCED_SKILL, 400);
|
||||
game.setGameStat(STAT_WEAPONTYPE_DESERT_EAGLE_SKILL, 400);
|
||||
@@ -99,8 +101,9 @@ function setUpInitialGame() {
|
||||
game.setDefaultInteriors(false); // Disables default yellow cone at doors for entering places in singleplayer
|
||||
game.onMission = true; // Disables taxi/vigilante/etc and other start mission triggers
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_GAME_GTA_IV:
|
||||
case [VRR_GAME_GTA_IV]: {
|
||||
natives.allowEmergencyServices(false);
|
||||
natives.setCreateRandomCops(true);
|
||||
natives.setMaxWantedLevel(0);
|
||||
@@ -151,8 +154,8 @@ function setUpInitialGame() {
|
||||
natives.switchMadDrivers(false);
|
||||
|
||||
// Singleplayer Cellphone
|
||||
natives.requestScript("spcellphone");
|
||||
natives.startNewScript("spcellphone", 0);
|
||||
//natives.requestScript("spcellphone");
|
||||
//natives.startNewScript("spcellphone", 0);
|
||||
// Script "v-blockedscripts" blocks the mpcellphone scripts
|
||||
natives.setMessagesWaiting(false); // Seems to have no effect
|
||||
natives.setMobilePhoneRadioState(false);
|
||||
@@ -161,18 +164,29 @@ function setUpInitialGame() {
|
||||
natives.requestAnims("DANCING");
|
||||
|
||||
// Some last steps
|
||||
natives.loadAllObjectsNow();
|
||||
//natives.loadAllObjectsNow();
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_GAME_MAFIA_ONE:
|
||||
case VRR_GAME_MAFIA_ONE: {
|
||||
game.mapEnabled = false;
|
||||
game.setTrafficEnabled(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function initClient() {
|
||||
loadLocaleConfig();
|
||||
loadAllLocaleStrings();
|
||||
|
||||
setUpInitialGame();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
initClientScripts();
|
||||
|
||||
// ===========================================================================
|
||||
// ===========================================================================
|
||||
|
||||
@@ -27,12 +27,21 @@ function processSync(event, deltaTime) {
|
||||
sendNetworkEventToServer("vrr.playerDeath");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(streamingRadioElement) {
|
||||
streamingRadio.position = getElementPosition(streamingRadioElement);
|
||||
//streamingRadio.volume = getStreamingRadioVolumeForPosition(streamingRadio.position);
|
||||
if(localPlayer.health <= 0) {
|
||||
if(!calledDeathEvent) {
|
||||
logToConsole(LOG_DEBUG, `Local player died`);
|
||||
localPlayer.clearWeapons();
|
||||
calledDeathEvent = true;
|
||||
sendNetworkEventToServer("vrr.playerDeath");
|
||||
}
|
||||
}
|
||||
|
||||
if(streamingRadioElement) {
|
||||
streamingRadio.position = getElementPosition(streamingRadioElement.id);
|
||||
//streamingRadio.volume = getStreamingRadioVolumeForPosition(streamingRadio.position);
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -44,8 +53,6 @@ function setVehicleEngine(vehicleId, state) {
|
||||
// ===========================================================================
|
||||
|
||||
function setVehicleLights(vehicleId, state) {
|
||||
|
||||
|
||||
if(getGame() != VRR_GAME_MAFIA_ONE) {
|
||||
if(!state) {
|
||||
getElementFromId(vehicleId).lightStatus = 2;
|
||||
@@ -432,8 +439,6 @@ function syncElementProperties(element) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function receiveHouseFromServer(houseId, entrancePosition, blipModel, pickupModel, hasInterior) {
|
||||
|
||||
@@ -7,173 +7,6 @@
|
||||
// TYPE: Client (JavaScript)
|
||||
// ===========================================================================
|
||||
|
||||
let weaponSlots = [
|
||||
false,
|
||||
[
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
11
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
3,
|
||||
3,
|
||||
4,
|
||||
4,
|
||||
4,
|
||||
5,
|
||||
5,
|
||||
5,
|
||||
5,
|
||||
6,
|
||||
6,
|
||||
8,
|
||||
8,
|
||||
7,
|
||||
7,
|
||||
7,
|
||||
7,
|
||||
9,
|
||||
-1,
|
||||
9,
|
||||
],
|
||||
[
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
8,
|
||||
8,
|
||||
8,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
3,
|
||||
3,
|
||||
3,
|
||||
4,
|
||||
4,
|
||||
5,
|
||||
5,
|
||||
4,
|
||||
6,
|
||||
6,
|
||||
7,
|
||||
7,
|
||||
7,
|
||||
7,
|
||||
8,
|
||||
12,
|
||||
9,
|
||||
9,
|
||||
9,
|
||||
9,
|
||||
9,
|
||||
11,
|
||||
9,
|
||||
9,
|
||||
9,
|
||||
],
|
||||
];
|
||||
|
||||
function openAllGarages() {
|
||||
switch(game.game) {
|
||||
case VRR_GAME_GTA_III:
|
||||
for(let i=0;i<=26;i++) {
|
||||
openGarage(i);
|
||||
game.NO_SPECIAL_CAMERA_FOR_THIS_GARAGE(i);
|
||||
}
|
||||
break;
|
||||
|
||||
case VRR_GAME_GTA_VC:
|
||||
for(let i=0;i<=32;i++) {
|
||||
openGarage(i);
|
||||
game.NO_SPECIAL_CAMERA_FOR_THIS_GARAGE(i);
|
||||
}
|
||||
break;
|
||||
|
||||
case VRR_GAME_GTA_SA:
|
||||
for(let i=0;i<=44;i++) {
|
||||
openGarage(i);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function closeAllGarages() {
|
||||
switch(game.game) {
|
||||
case VRR_GAME_GTA_III:
|
||||
for(let i=0;i<=26;i++) {
|
||||
closeGarage(i);
|
||||
game.NO_SPECIAL_CAMERA_FOR_THIS_GARAGE(i);
|
||||
}
|
||||
break;
|
||||
|
||||
case VRR_GAME_GTA_VC:
|
||||
for(let i=0;i<=32;i++) {
|
||||
closeGarage(i);
|
||||
game.NO_SPECIAL_CAMERA_FOR_THIS_GARAGE(i);
|
||||
}
|
||||
break;
|
||||
|
||||
case VRR_GAME_GTA_SA:
|
||||
for(let i=0;i<=44;i++) {
|
||||
closeGarage(i);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setLocalPlayerFrozenState(state) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Utilities] Setting frozen state to ${state}`);
|
||||
gui.showCursor(state, !state);
|
||||
@@ -185,12 +18,10 @@ function setLocalPlayerControlState(controlState, cursorState = false) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Utilities] Setting control state to ${controlState} (Cursor: ${cursorState})`);
|
||||
controlsEnabled = controlState;
|
||||
if(getGame() == VRR_GAME_GTA_III || getGame() == VRR_GAME_GTA_VC) {
|
||||
game.SET_PLAYER_CONTROL(localClient.index, boolToInt(controlState));
|
||||
}
|
||||
|
||||
if(getGame() != VRR_GAME_GTA_IV) {
|
||||
localPlayer.collisionsEnabled = controlState;
|
||||
localPlayer.invincible = true;
|
||||
game.SET_PLAYER_CONTROL(game.GET_PLAYER_ID(), boolToInt(controlState));
|
||||
} else if(getGame() != VRR_GAME_GTA_IV) {
|
||||
setElementCollisionsEnabled(localPlayer, controlState);
|
||||
setPedInvincible(localPlayer, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,7 +77,7 @@ function setCityAmbienceState(state, clearElements = false) {
|
||||
|
||||
if(getMultiplayerMod() == VRR_MPMOD_GTAC) {
|
||||
game.setGenerateCarsAroundCamera(state);
|
||||
if(game.game != VRR_GAME_GTA_SA) {
|
||||
if(getGame() != VRR_GAME_GTA_SA) {
|
||||
game.setCiviliansEnabled(state);
|
||||
}
|
||||
|
||||
@@ -264,10 +95,16 @@ function runClientCode(code, returnTo) {
|
||||
try {
|
||||
returnValue = eval("(" + code + ")");
|
||||
} catch(error) {
|
||||
sendNetworkEventToServer("vrr.runCodeFail", returnTo, code);
|
||||
sendNetworkEventToServer("vrr.runCodeFail", returnTo, error.toString());
|
||||
return false;
|
||||
}
|
||||
sendNetworkEventToServer("vrr.runCodeSuccess", returnTo, code, returnValue);
|
||||
let returnValueString = returnValue;
|
||||
if(returnValue != null && returnValue != undefined) {
|
||||
returnValueString = `${returnValue.toString()} (${typeof returnValue})`;
|
||||
} else {
|
||||
returnValueString = "null/undefined";
|
||||
}
|
||||
sendNetworkEventToServer("vrr.runCodeSuccess", returnTo, returnValueString);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -314,12 +151,14 @@ function giveLocalPlayerWeapon(weaponId, ammo, active) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function clearLocalPlayerWeapons() {
|
||||
function clearLocalPlayerWeapons(clearData) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Utilities] Clearing weapons`);
|
||||
localPlayer.clearWeapons();
|
||||
forceWeapon = 0;
|
||||
forceWeaponAmmo = 0;
|
||||
forceWeaponClipAmmo = 0;
|
||||
if(clearData == true) {
|
||||
forceWeapon = 0;
|
||||
forceWeaponAmmo = 0;
|
||||
forceWeaponClipAmmo = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -358,21 +197,23 @@ function setLocalPlayerInterior(interior) {
|
||||
if(!isGTAIV()) {
|
||||
localPlayer.interior = interior;
|
||||
game.cameraInterior = interior;
|
||||
} else {
|
||||
if(getGameConfig().mainWorldInterior != interior) {
|
||||
let interiorId = natives.getInteriorAtCoords(localPlayer.position);
|
||||
natives.activateInterior(interiorId, true);
|
||||
natives.loadAllObjectsNow();
|
||||
}
|
||||
}
|
||||
} //else {
|
||||
//if(getGameConfig().mainWorldInterior != interior) {
|
||||
// let interiorId = natives.getInteriorAtCoords(localPlayer.position);
|
||||
// natives.activateInterior(interiorId, true);
|
||||
// natives.loadAllObjectsNow();
|
||||
//}
|
||||
//let interiorId = natives.getInteriorAtCoords(localPlayer.position);
|
||||
//natives.activateInterior(interiorId, true);
|
||||
//}
|
||||
}
|
||||
|
||||
//let vehicles = getElementsByType(ELEMENT_VEHICLE);
|
||||
//for(let i in vehicles) {
|
||||
// if(getEntityData(vehicles[i], "vrr.interior")) {
|
||||
// vehicles[i].interior = getEntityData(vehicles[i], "vrr.interior");
|
||||
// }
|
||||
//}
|
||||
let vehicles = getElementsByType(ELEMENT_VEHICLE);
|
||||
for(let i in vehicles) {
|
||||
if(getEntityData(vehicles[i], "vrr.interior")) {
|
||||
vehicles[i].interior = getEntityData(vehicles[i], "vrr.interior");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -394,8 +235,11 @@ function setLocalPlayerHealth(health) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function isSnowEnabled() {
|
||||
return (typeof snowing != "undefined");
|
||||
function playPedSpeech(pedName, speechId) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Utilities] Making ${pedName}'s ped talk (${speechId})`);
|
||||
if(getMultiplayerMod() == VRR_MPMOD_GTAC) {
|
||||
game.SET_CHAR_SAY(int, int);
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -408,18 +252,14 @@ function clearLocalPedState() {
|
||||
// ===========================================================================
|
||||
|
||||
function getWeaponSlot(weaponId) {
|
||||
if(getGame() == VRR_GAME_GTA_IV) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return weaponSlots[getGame()][weaponId];
|
||||
return getGameConfig().weaponSlots[getGame()][weaponId];
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setLocalPlayerDrunkEffect(amount, duration) {
|
||||
if(getMultiplayerMod() == VRR_MPMOD_GTAC) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Utilities] Drunk effect set to ${amount} for ${duration}ms`);
|
||||
logToConsole(LOG_DEBUG, `[VRR.Utilities] Drunk effect set to ${amount} for ${duration} ms`);
|
||||
drunkEffectAmount = 0;
|
||||
drunkEffectDurationTimer = setInterval(function() {
|
||||
drunkEffectAmount = drunkEffectAmount;
|
||||
@@ -564,24 +404,20 @@ function processWantedLevelReset() {
|
||||
function processLocalPlayerVehicleControlState() {
|
||||
if(areServerElementsSupported()) {
|
||||
if(inVehicle && localPlayer.vehicle != null) {
|
||||
if(getEntityData(localPlayer.vehicle, "vrr.engine") == false) {
|
||||
localPlayer.vehicle.engine = false;
|
||||
}
|
||||
if(doesEntityDataExist(localPlayer.vehicle, "vrr.engine")) {
|
||||
if(getEntityData(localPlayer.vehicle, "vrr.engine") == false) {
|
||||
localPlayer.vehicle.engine = false;
|
||||
if(!localPlayer.vehicle.engine) {
|
||||
if(typeof localPlayer.vehicle.velocity != "undefined") {
|
||||
localPlayer.vehicle.velocity = toVector3(0.0, 0.0, 0.0);
|
||||
localPlayer.vehicle.turnVelocity = toVector3(0.0, 0.0, 0.0);
|
||||
}
|
||||
|
||||
if(!localPlayer.vehicle.engine) {
|
||||
if(typeof localPlayer.vehicle.velocity != "undefined") {
|
||||
localPlayer.vehicle.velocity = toVector3(0.0, 0.0, 0.0);
|
||||
localPlayer.vehicle.turnVelocity = toVector3(0.0, 0.0, 0.0);
|
||||
}
|
||||
|
||||
if(parkedVehiclePosition) {
|
||||
localPlayer.vehicle.position = parkedVehiclePosition;
|
||||
localPlayer.vehicle.heading = parkedVehicleHeading;
|
||||
}
|
||||
} else {
|
||||
if(parkedVehiclePosition) {
|
||||
parkedVehiclePosition = false;
|
||||
parkedVehicleHeading = false;
|
||||
//if(parkedVehiclePosition) {
|
||||
// localPlayer.vehicle.position = parkedVehiclePosition;
|
||||
// localPlayer.vehicle.heading = parkedVehicleHeading;
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -613,7 +449,7 @@ function processLocalPlayerSphereEntryExitHandling() {
|
||||
// ===========================================================================
|
||||
|
||||
function processJobRouteSphere() {
|
||||
if(game.game == VRR_GAME_GTA_SA) {
|
||||
if(getGame() == VRR_GAME_GTA_SA) {
|
||||
let position = getLocalPlayerPosition();
|
||||
if(jobRouteLocationSphere != null) {
|
||||
if(getDistance(position, jobRouteLocationSphere.position) <= 2.0) {
|
||||
@@ -635,10 +471,10 @@ function forceLocalPlayerEquippedWeaponItem() {
|
||||
localPlayer.setWeaponAmmunition(getWeaponSlot(forceWeapon), forceWeaponAmmo);
|
||||
}
|
||||
} else {
|
||||
if(getGame() < VRR_GAME_GTA_IV) {
|
||||
forceWeaponClipAmmo = localPlayer.getWeaponClipAmmunition(getWeaponSlot(forceWeapon));
|
||||
forceWeaponAmmo = localPlayer.getWeaponAmmunition(getWeaponSlot(forceWeapon));
|
||||
}
|
||||
//if(getGame() < VRR_GAME_GTA_IV) {
|
||||
// forceWeaponClipAmmo = localPlayer.getWeaponClipAmmunition(getWeaponSlot(forceWeapon));
|
||||
// forceWeaponAmmo = localPlayer.getWeaponAmmunition(getWeaponSlot(forceWeapon));
|
||||
//}
|
||||
}
|
||||
} else {
|
||||
if(localPlayer.weapon > 0) {
|
||||
@@ -683,7 +519,7 @@ function getVehicleForNetworkEvent(vehicle) {
|
||||
if(getGame() == VRR_GAME_GTA_IV) {
|
||||
return natives.getNetworkIdFromVehicle(vehicle);
|
||||
}
|
||||
return vehicle;
|
||||
return vehicle.id;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -763,7 +599,7 @@ function processNearbyPickups() {
|
||||
// ===========================================================================
|
||||
|
||||
function processGameSpecifics() {
|
||||
if(game.game < VRR_GAME_GTA_IV) {
|
||||
if(getGame() < VRR_GAME_GTA_IV) {
|
||||
game.clearMessages();
|
||||
}
|
||||
|
||||
@@ -772,57 +608,6 @@ function processGameSpecifics() {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function processVehiclePurchasing() {
|
||||
if(vehiclePurchaseState == VRR_VEHBUYSTATE_TESTDRIVE) {
|
||||
if(inVehicle == false) {
|
||||
vehiclePurchaseState = VRR_VEHBUYSTATE_EXITVEH;
|
||||
sendNetworkEventToServer("vrr.vehBuyState", VRR_VEHBUYSTATE_EXITVEH);
|
||||
return false;
|
||||
} else {
|
||||
if(vehiclePurchasing == inVehicle) {
|
||||
if(getDistance(inVehicle.position, vehiclePurchasePosition) >= 25) {
|
||||
vehiclePurchaseState = VRR_VEHBUYSTATE_FARENOUGH;
|
||||
sendNetworkEventToServer("vrr.vehBuyState", VRR_VEHBUYSTATE_FARENOUGH);
|
||||
}
|
||||
} else {
|
||||
vehiclePurchaseState = VRR_VEHBUYSTATE_WRONGVEH;
|
||||
sendNetworkEventToServer("vrr.vehBuyState", VRR_VEHBUYSTATE_WRONGVEH);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setVehiclePurchaseState(state, vehicleId, position) {
|
||||
vehiclePurchaseState = state;
|
||||
|
||||
if(vehicleId != null) {
|
||||
vehiclePurchasing = getElementFromId(vehicleId);
|
||||
} else {
|
||||
vehiclePurchasing = null;
|
||||
}
|
||||
|
||||
vehiclePurchasePosition = position;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function processVehicleFires() {
|
||||
let vehicles = getElementsByType(ELEMENT_VEHICLE);
|
||||
for(let i in vehicles) {
|
||||
if(vehicles[i].isSyncer) {
|
||||
if(!doesEntityDataExist(vehicles[i], "vrr.fire")) {
|
||||
triggerNetworkEvent("vrr.vehFire", vehicles[i].id);
|
||||
} else {
|
||||
vehicles[i].health = 249;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getServerData() {
|
||||
return serverData;
|
||||
}
|
||||
|
||||
@@ -15,4 +15,48 @@ function receiveVehicleFromServer(vehicleId, position, model, colour1, colour2,
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function processVehiclePurchasing() {
|
||||
if(vehiclePurchaseState == VRR_VEHBUYSTATE_TESTDRIVE) {
|
||||
if(getLocalPlayerVehicle() == false) {
|
||||
vehiclePurchaseState = VRR_VEHBUYSTATE_EXITVEH;
|
||||
sendNetworkEventToServer("vrr.vehBuyState", VRR_VEHBUYSTATE_EXITVEH);
|
||||
return false;
|
||||
} else {
|
||||
if(vehiclePurchasing == getLocalPlayerVehicle()) {
|
||||
if(getDistance(getLocalPlayerVehicle().position, vehiclePurchasePosition) >= 25) {
|
||||
vehiclePurchaseState = VRR_VEHBUYSTATE_FARENOUGH;
|
||||
sendNetworkEventToServer("vrr.vehBuyState", VRR_VEHBUYSTATE_FARENOUGH);
|
||||
}
|
||||
} else {
|
||||
vehiclePurchaseState = VRR_VEHBUYSTATE_WRONGVEH;
|
||||
sendNetworkEventToServer("vrr.vehBuyState", VRR_VEHBUYSTATE_WRONGVEH);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function processVehicleBurning() {
|
||||
getElementsByType(ELEMENT_VEHICLE).filter(vehicle => vehicle.isSyncer && vehicle.health < 250).forEach((vehicle) => {
|
||||
vehicle.health = 250;
|
||||
});
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setVehiclePurchaseState(state, vehicleId, position) {
|
||||
vehiclePurchaseState = state;
|
||||
|
||||
if(vehicleId != null) {
|
||||
vehiclePurchasing = getElementFromId(vehicleId);
|
||||
} else {
|
||||
vehiclePurchasing = null;
|
||||
}
|
||||
|
||||
vehiclePurchasePosition = position;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -63,7 +63,7 @@ function listAccentsCommand(command, params, client) {
|
||||
|
||||
let chunkedList = splitArrayIntoChunks(accentList, 8);
|
||||
|
||||
messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "AccentList")));
|
||||
messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "AccentsListHeader")));
|
||||
for(let i in chunkedList) {
|
||||
messagePlayerInfo(client, chunkedList[i].join(", "));
|
||||
}
|
||||
@@ -91,7 +91,7 @@ function getAccentFromParams(params) {
|
||||
|
||||
function reloadAccentConfigurationCommand(command, params, client) {
|
||||
getGlobalConfig().accents = loadAccentConfig();
|
||||
messageAdmins(`${client.name} {MAINCOLOUR}has reloaded the accent list`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)} {MAINCOLOUR}has reloaded the accent list`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -111,7 +111,7 @@ function addAccentCommand(command, params, client) {
|
||||
|
||||
getGlobalConfig().accents.push(newAccentName);
|
||||
saveAccentConfig();
|
||||
messageAdmins(`${client.name}{MAINCOLOUR} added a new accent: ${newAccentName}`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} added a new accent: {ALTCOLOUR}${newAccentName}{MAINCOLOUR}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -131,7 +131,7 @@ function removeAccentCommand(command, params, client) {
|
||||
|
||||
getGlobalConfig().accents.push(newAccentName);
|
||||
saveAccentConfig();
|
||||
messageAdmins(`${client.name}{MAINCOLOUR} added a new accent: ${newAccentName}`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} removed an accent: {ALTCOLOUR}${newAccentName}{MAINCOLOUR}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -92,14 +92,15 @@ function toggleAutoSelectLastCharacterCommand(command, params, client) {
|
||||
// ===========================================================================
|
||||
|
||||
function toggleAccountGUICommand(command, params, client) {
|
||||
// Remember, the flag is BACKWARD. Enabled = NO GUI!
|
||||
let flagValue = getAccountSettingsFlagValue("NoGUI");
|
||||
|
||||
if(doesPlayerHaveGUIEnabled(client)) {
|
||||
getPlayerData(client).accountData.settings = removeBitFlag(getPlayerData(client).accountData.settings, flagValue);
|
||||
messagePlayerNormal(client, getLocaleString(client, "GUIAccountSettingToggle", `{softRed}${toUpperCase(getLocaleString(client, "Off"))}{MAINCOLOUR}`));
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has toggled GUI for their account ON.`);
|
||||
} else {
|
||||
getPlayerData(client).accountData.settings = addBitFlag(getPlayerData(client).accountData.settings, flagValue);
|
||||
messagePlayerNormal(client, getLocaleString(client, "GUIAccountSettingToggle", `{softRed}${toUpperCase(getLocaleString(client, "Off"))}{MAINCOLOUR}`));
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has toggled GUI for their account OFF.`);
|
||||
} else {
|
||||
getPlayerData(client).accountData.settings = removeBitFlag(getPlayerData(client).accountData.settings, flagValue);
|
||||
messagePlayerNormal(client, getLocaleString(client, "GUIAccountSettingToggle", `{softGreen}${toUpperCase(getLocaleString(client, "On"))}{MAINCOLOUR}`));
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has toggled GUI for their account ON.`);
|
||||
}
|
||||
@@ -111,7 +112,7 @@ function toggleAccountGUICommand(command, params, client) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the login GUI`);
|
||||
} else {
|
||||
hideAllPlayerGUI(client);
|
||||
messagePlayerNormal(client, `👋 Welcome back to ${getServerName()}, ${getPlayerName(client)}! Please /login to continue.`, getColourByName("softGreen"));
|
||||
messagePlayerNormal(client, getLocaleString(client, "WelcomeBack", getServerName(), getPlayerName(client), "{ALTCOLOUR}/login{MAINCOLOUR}"));
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled)`);
|
||||
}
|
||||
} else {
|
||||
@@ -120,7 +121,7 @@ function toggleAccountGUICommand(command, params, client) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the register GUI`);
|
||||
} else {
|
||||
hideAllPlayerGUI(client);
|
||||
messagePlayerNormal(client, `👋 Welcome to ${getServerName()}, ${getPlayerName(client)}! Please /register to continue.`, getColourByName("softGreen"));
|
||||
messagePlayerNormal(client, getLocaleString(client, "WelcomeNewPlayer", getServerName(), getPlayerName(client), "{ALTCOLOUR}/register{MAINCOLOUR}"));
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the register message (GUI disabled)`);
|
||||
}
|
||||
}
|
||||
@@ -133,13 +134,13 @@ function toggleAccountGUICommand(command, params, client) {
|
||||
function toggleAccountLoginAttemptNotificationsCommand(command, params, client) {
|
||||
let flagValue = getAccountSettingsFlagValue("AuthAttemptAlert");
|
||||
|
||||
if(hasBitFlag(getPlayerData(client).accountData.settings, flagValue)) {
|
||||
if(doesPlayerHaveLoginAlertsEnabled(client)) {
|
||||
getPlayerData(client).accountData.settings = removeBitFlag(getPlayerData(client).accountData.settings, flagValue);
|
||||
messagePlayerNormal(client, `⚙️ You will ${getBoolRedGreenInlineColour(true)}now {MAINCOLOUR}be notified by email when somebody tries to login to your account`);
|
||||
messagePlayerNormal(client, `⚙️ You turned ${getBoolRedGreenInlineColour(false)}OFF{MAINCOLOUR} notification by email when somebody tries to login to your account`);
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has toggled the login attempt email notifications OFF for their account`);
|
||||
} else {
|
||||
getPlayerData(client).accountData.settings = addBitFlag(getPlayerData(client).accountData.settings, flagValue);
|
||||
messagePlayerNormal(client, `⚙️ You will ${getBoolRedGreenInlineColour(false)}not {MAINCOLOUR}be notified by email when somebody tries to login to your account`);
|
||||
messagePlayerNormal(client, `⚙️ You turned ${getBoolRedGreenInlineColour(true)}ON{MAINCOLOUR} notification by email when somebody tries to login to your account`);
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has toggled the login attempt email notifications OFF for their account`);
|
||||
}
|
||||
|
||||
@@ -153,14 +154,14 @@ function toggleAccountServerLogoCommand(command, params, client) {
|
||||
|
||||
if(!doesPlayerHaveLogoEnabled(client)) {
|
||||
getPlayerData(client).accountData.settings = removeBitFlag(getPlayerData(client).accountData.settings, flagValue);
|
||||
messagePlayerNormal(client, `⚙️ You will ${getBoolRedGreenInlineColour(true)}now {MAINCOLOUR}be shown the server logo (if enabled on current server)`);
|
||||
messagePlayerSuccess(client, getLocaleString(client, "AccountServerLogoSet", `${getBoolRedGreenInlineColour(true)}${getLocaleString(client, "On")}{MAINCOLOUR}`));
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has toggled the server logo ON for their account`);
|
||||
if(getServerConfig().showLogo) {
|
||||
updatePlayerShowLogoState(client, true);
|
||||
}
|
||||
} else {
|
||||
getPlayerData(client).accountData.settings = addBitFlag(getPlayerData(client).accountData.settings, flagValue);
|
||||
messagePlayerNormal(client, `⚙️ You will ${getBoolRedGreenInlineColour(false)}not {MAINCOLOUR}be shown the server logo.`);
|
||||
messagePlayerSuccess(client, getLocaleString(client, "AccountServerLogoSet", `${getBoolRedGreenInlineColour(false)}${getLocaleString(client, "Off")}{MAINCOLOUR}`));
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has toggled the server logo OFF for their account`);
|
||||
updatePlayerShowLogoState(client, false);
|
||||
}
|
||||
@@ -189,11 +190,11 @@ function toggleAccountTwoFactorAuthCommand(command, params, client) {
|
||||
|
||||
if(!doesPlayerHaveTwoFactorAuthEnabled(client)) {
|
||||
getPlayerData(client).accountData.settings = addBitFlag(getPlayerData(client).accountData.settings, flagValue);
|
||||
messagePlayerSuccess(client, `{MAINCOLOUR}You have turned ${getBoolRedGreenInlineColour(false)}ON {MAINCOLOUR} two factor authentication!{ALTCOLOUR}${addtoAuthenticatorCode}`);
|
||||
messagePlayerSuccess(client, getLocaleString(client, "TwoFactorAuthSet", `${getBoolRedGreenInlineColour(true)}${getLocaleString(client, "On")}{MAINCOLOUR}`));
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has toggled two-factor authentication ON for their account`);
|
||||
} else {
|
||||
getPlayerData(client).accountData.settings = removeBitFlag(getPlayerData(client).accountData.settings, flagValue);
|
||||
messagePlayerSuccess(client, `You have turned ${getBoolRedGreenInlineColour(false)}OFF {MAINCOLOUR}two-factor authentication for login.`);
|
||||
messagePlayerSuccess(client, getLocaleString(client, "TwoFactorAuthSet", `${getBoolRedGreenInlineColour(false)}${toUpperCase(getLocaleString(client, "Off"))}{MAINCOLOUR}`));
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has toggled two-factor authentication OFF for their account`);
|
||||
}
|
||||
return true;
|
||||
@@ -203,7 +204,7 @@ function toggleAccountTwoFactorAuthCommand(command, params, client) {
|
||||
|
||||
function registerCommand(command, params, client) {
|
||||
if(isPlayerRegistered(client)) {
|
||||
messagePlayerError(client, `Your name is already registered!`);
|
||||
messagePlayerError(client, getLocaleString(client, "AccountNameAlreadyRegistered"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -235,8 +236,8 @@ function changeAccountPasswordCommand(command, params, client) {
|
||||
}
|
||||
|
||||
if(!doesPasswordMeetRequirements(newPassword)) {
|
||||
messagePlayerError(client, `The new password must meet the requirements!`);
|
||||
messagePlayerInfo(client, `Passwords must have at least one capital letter, one lowercase letter, and one number!`);
|
||||
messagePlayerError(client, getLocaleString(client, "PasswordNotGoodEnough"));
|
||||
messagePlayerInfo(client, getLocaleString(client, "PasswordNeedsBase", `${getLocaleString(client, "PasswordNeedsCapitals", getGlobalConfig().passwordRequiredCapitals)}, ${getLocaleString(client, "PasswordNeedsSymbols", getGlobalConfig().passwordRequiredSymbols)}`));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -253,12 +254,12 @@ function setAccountChatScrollLinesCommand(command, params, client) {
|
||||
}
|
||||
|
||||
if(isNaN(params)) {
|
||||
messagePlayerError(client, `The line amount must be a number!`);
|
||||
messagePlayerError(client, getLocaleString(client, "ChatScrollLinesNotNumber"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(toInteger(params) < 1 || toInteger(params) > 6) {
|
||||
messagePlayerError(client, `The line amount must be between 1 and 6!`);
|
||||
messagePlayerError(client, getLocaleString(client, "ChatScrollLinesMustBeBetween", getGlobalConfig().minChatLines, getGlobalConfig().maxChatLines));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -266,7 +267,7 @@ function setAccountChatScrollLinesCommand(command, params, client) {
|
||||
|
||||
getPlayerData(client).accountData.chatScrollLines = lines;
|
||||
sendPlayerChatScrollLines(client, lines);
|
||||
messagePlayerSuccess(client, `Your chatbox will now scroll ${toInteger(lines)} lines at a time!`);
|
||||
messagePlayerSuccess(client, getLocaleString(client, "ChatScrollLinesSet", lines));
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -300,7 +301,7 @@ function setAccountEmailCommand(command, params, client) {
|
||||
let emailAddress = getParam(params, " ", 1);
|
||||
|
||||
if(!isValidEmailAddress(emailAddress)) {
|
||||
messagePlayerError(client, `The email '${emailAddress} is not valid!`);
|
||||
messagePlayerError(client, getLocaleString(client, "RegistrationFailedInvalidEmail"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -310,7 +311,7 @@ function setAccountEmailCommand(command, params, client) {
|
||||
//}
|
||||
|
||||
if(getPlayerData(client).accountData.emailAddress != "" && isAccountEmailVerified(getPlayerData(client).accountData)) {
|
||||
messagePlayerError(client, `You already set your email and verified it!`);
|
||||
messagePlayerError(client, getLocaleString(client, "AccountEmailAlreadySetAndVerified"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -320,9 +321,9 @@ function setAccountEmailCommand(command, params, client) {
|
||||
setAccountEmailVerificationCode(getPlayerData(client).accountData, emailVerificationCode);
|
||||
sendEmailVerificationEmail(client, emailVerificationCode);
|
||||
|
||||
messagePlayerSuccess(client, `Your email has been set!`);
|
||||
messagePlayerAlert(client, `Please verify your email to enable extra account security and recovery features.`);
|
||||
messagePlayerAlert(client, `A verification code and instructions have been sent to your email.`);
|
||||
messagePlayerSuccess(client, getLocaleString(client, "EmailSet"));
|
||||
messagePlayerAlert(client, getLocaleString(client, "RegistrationEmailVerifyReminder"));
|
||||
messagePlayerAlert(client, getLocaleString(client, "EmailVerificationCodeSent"));
|
||||
saveAccountToDatabase(getPlayerData(client).accountData);
|
||||
}
|
||||
|
||||
@@ -342,7 +343,7 @@ function verifyAccountEmailCommand(command, params, client) {
|
||||
}
|
||||
|
||||
if(module.hashing.sha512(verificationCode) != getPlayerData(client).accountData.emailVerificationCode) {
|
||||
messagePlayerError(client, `Invalid email verification code! A new one has been created and sent to your email.`);
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidEmailVerificationCode"));
|
||||
let emailVerificationCode = generateEmailVerificationCode();
|
||||
setAccountEmailVerificationCode(getPlayerData(client).accountData, emailVerificationCode);
|
||||
sendEmailVerificationEmail(client, emailVerificationCode);
|
||||
@@ -352,8 +353,8 @@ function verifyAccountEmailCommand(command, params, client) {
|
||||
getPlayerData(client).accountData.flags.moderation = addBitFlag(getPlayerData(client).accountData.flags.moderation, getModerationFlagValue("EmailVerified"));
|
||||
getPlayerData(client).accountData.emailVerificationCode = "";
|
||||
|
||||
messagePlayerSuccess(client, `Your email has been verified!`);
|
||||
messagePlayerAlert(client, `You can now use your email for password resets, two-factor authentication, alerts, and more!`);
|
||||
messagePlayerSuccess(client, getLocaleString(client, "EmailVerified"));
|
||||
messagePlayerAlert(client, getLocaleString(client, "EmailVerifiedTip"));
|
||||
saveAccountToDatabase(getPlayerData(client).accountData);
|
||||
}
|
||||
|
||||
@@ -583,14 +584,14 @@ function loginSuccess(client) {
|
||||
|
||||
if(doesPlayerHaveStaffPermission(client, "Developer") || doesPlayerHaveStaffPermission(client, "ManageServer")) {
|
||||
logToConsole(LOG_WARN, `[VRR.Account] ${getPlayerDisplayForConsole(client)} has needed permissions and is being given administrator access`);
|
||||
client.administrator = true;
|
||||
setPlayerNativeAdminState(client, true);
|
||||
}
|
||||
|
||||
if(doesServerHaveTesterOnlyEnabled()) {
|
||||
if(!hasBitFlag(getPlayerData(client).accountData.flags.moderation, getModerationFlagValue("IsTester"))) {
|
||||
setTimeout(function() {
|
||||
getPlayerData(client).customDisconnectReason = "Kicked - Not a tester";
|
||||
client.disconnect();
|
||||
disconnectPlayer(client);
|
||||
}, 3500);
|
||||
|
||||
if(doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) {
|
||||
@@ -607,7 +608,7 @@ function loginSuccess(client) {
|
||||
|
||||
if(getPlayerData(client).subAccounts.length == 0) {
|
||||
if(doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) {
|
||||
showPlayerPromptGUI(client, getLocaleString(client, "NoCharactersGUIMessage"), getLocaleString(client, "NoCharactersGUIWindowTitle"), getLocaleString(client, "Yes"), getLocaleString(client, "No"));
|
||||
showPlayerPrompt(client, getLocaleString(client, "NoCharactersGUIMessage"), getLocaleString(client, "NoCharactersGUIWindowTitle"), getLocaleString(client, "Yes"), getLocaleString(client, "No"));
|
||||
getPlayerData(client).promptType = VRR_PROMPT_CREATEFIRSTCHAR;
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the no characters prompt GUI`);
|
||||
} else {
|
||||
@@ -618,11 +619,20 @@ function loginSuccess(client) {
|
||||
showCharacterSelectToClient(client);
|
||||
}
|
||||
|
||||
getPlayerData(client).accountData.ipAddress = client.ip;
|
||||
|
||||
getPlayerData(client).accountData.ipAddress = getPlayerIP(client);
|
||||
sendPlayerChatScrollLines(client, getPlayerData(client).accountData.chatScrollLines);
|
||||
messagePlayerNormal(null, `👋 ${getPlayerName(client)} has joined the server`, getColourByName("softYellow"));
|
||||
|
||||
messageDiscordChatChannel(`👋 ${getPlayerName(client)} has joined the server`);
|
||||
|
||||
//let countryName = "Unknown";
|
||||
//if(getCountryNameFromIP(getPlayerIP(client))) {
|
||||
// countryName = getCountryNameFromIP(getPlayerIP(client));
|
||||
//}
|
||||
|
||||
//let clients = getClients();
|
||||
//for(let i in clients) {
|
||||
// messagePlayerNormal(clients[i], getLocaleString(clients[i], "PlayerJoinedServer", `{ALTCOLOUR}${getPlayerName(client)}{MAINCOLOUR}`, `{ALTCOLOUR}${countryName}{MAINCOLOUR}`), getColourByName("softYellow"));
|
||||
//}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -794,7 +804,7 @@ function createAccount(name, password, email = "") {
|
||||
function checkLogin(client, password) {
|
||||
getPlayerData(client).loginAttemptsRemaining = getPlayerData(client).loginAttemptsRemaining-1;
|
||||
if(getPlayerData(client).loginAttemptsRemaining <= 0) {
|
||||
client.disconnect();
|
||||
disconnectPlayer(client);
|
||||
}
|
||||
|
||||
if(isPlayerLoggedIn(client)) {
|
||||
@@ -830,8 +840,8 @@ function checkLogin(client, password) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled) with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`);
|
||||
}
|
||||
|
||||
if(isAccountEmailVerified(getPlayerData(client).accountData) && isAccountSettingFlagEnabled(getPlayerData(client).accountData, getAccountSettingsFlagValue("AuthAttemptAlert"))) {
|
||||
sendAccountLoginFailedNotification(getPlayerData(client).accountData.emailAddress, client.name, client.ip, getServerGame());
|
||||
if(isAccountEmailVerified(getPlayerData(client).accountData) && !isAccountSettingFlagEnabled(getPlayerData(client).accountData, getAccountSettingsFlagValue("AuthAttemptAlert"))) {
|
||||
sendAccountLoginFailedNotification(getPlayerData(client).accountData.emailAddress, getPlayerName(client), getPlayerIP(client), getGame());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -846,17 +856,18 @@ function checkLogin(client, password) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the login message (GUI disabled) with ${getPlayerData(client).loginAttemptsRemaining} login attempts remaining alert.`);
|
||||
}
|
||||
|
||||
if(isAccountEmailVerified(getPlayerData(client).accountData) && isAccountSettingFlagEnabled(getPlayerData(client).accountData, getAccountSettingsFlagValue("AuthAttemptAlert"))) {
|
||||
sendAccountLoginFailedNotification(getPlayerData(client).accountData.emailAddress, client.name, client.ip, getServerGame());
|
||||
if(isAccountEmailVerified(getPlayerData(client).accountData) && !isAccountSettingFlagEnabled(getPlayerData(client).accountData, getAccountSettingsFlagValue("AuthAttemptAlert"))) {
|
||||
sendAccountLoginFailedNotification(getPlayerData(client).accountData.emailAddress, getPlayerName(client), getPlayerIP(client), getGame());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//if(doesPlayerHaveTwoFactorAuthEnabled(client)) {
|
||||
// getPlayerData(client).twoFactorAuthCode = toUpperCase(generateRandomString(6));
|
||||
// showPlayerTwoFactorAuthenticationGUI(client);
|
||||
// return true;
|
||||
//}
|
||||
if(doesPlayerHaveTwoFactorAuthEnabled(client) && checkForSMTPModule() && getEmailConfig().enabled) {
|
||||
getPlayerData(client).twoFactorAuthCode = toUpperCase(generateRandomString(6));
|
||||
showPlayerTwoFactorAuthenticationGUI(client);
|
||||
sendAccountTwoFactorAuthCode(getPlayerData(client).accountData.emailAddress, getPlayerName(client), getPlayerData(client).twoFactorAuthCode);
|
||||
return true;
|
||||
}
|
||||
|
||||
if(doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) {
|
||||
showPlayerLoginSuccessGUI(client);
|
||||
@@ -864,8 +875,8 @@ function checkLogin(client, password) {
|
||||
|
||||
loginSuccess(client);
|
||||
|
||||
if(isAccountEmailVerified(getPlayerData(client).accountData) && isAccountSettingFlagEnabled(getPlayerData(client).accountData, getAccountSettingsFlagValue("AuthAttemptAlert"))) {
|
||||
sendAccountLoginSuccessNotification(getPlayerData(client).accountData.emailAddress, client.name, client.ip, getServerGame());
|
||||
if(isAccountEmailVerified(getPlayerData(client).accountData) && !isAccountSettingFlagEnabled(getPlayerData(client).accountData, getAccountSettingsFlagValue("AuthAttemptAlert"))) {
|
||||
sendAccountLoginSuccessNotification(getPlayerData(client).accountData.emailAddress, getPlayerName(client), getPlayerIP(client), getGame());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -973,7 +984,7 @@ function checkRegistration(client, password, confirmPassword = "", emailAddress
|
||||
|
||||
if(doesServerHaveTesterOnlyEnabled() && !isPlayerATester(client)) {
|
||||
setTimeout(function() {
|
||||
client.disconnect();
|
||||
disconnectPlayer(client);
|
||||
}, 5000);
|
||||
|
||||
if(doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) {
|
||||
@@ -990,7 +1001,7 @@ function checkRegistration(client, password, confirmPassword = "", emailAddress
|
||||
|
||||
if(doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) {
|
||||
showPlayerRegistrationSuccessGUI(client);
|
||||
showPlayerPromptGUI(client, getLocaleString(client, "NoCharactersMessage"), getLocaleString(client, "NoCharactersWindowTitle"), getLocaleString(client, "Yes"), getLocaleString(client, "No"));
|
||||
showPlayerPrompt(client, getLocaleString(client, "NoCharactersMessage"), getLocaleString(client, "NoCharactersWindowTitle"), getLocaleString(client, "Yes"), getLocaleString(client, "No"));
|
||||
getPlayerData(client).promptType = VRR_PROMPT_CREATEFIRSTCHAR;
|
||||
} else {
|
||||
messagePlayerAlert(client, getLocaleString(client, "NoCharactersChatMessage"), `{ALTCOLOUR}/newchar{MAINCOLOUR}`);
|
||||
@@ -1024,7 +1035,7 @@ function checkAccountResetPasswordRequest(client, inputText) {
|
||||
logToConsole(LOG_DEBUG, `${getPlayerDisplayForConsole(client)} entered the correct reset password verification code. Awaiting new password input ...`);
|
||||
} else {
|
||||
getPlayerData(client).passwordResetState = VRR_RESETPASS_STATE_NONE;
|
||||
client.disconnect();
|
||||
disconnectPlayer(client);
|
||||
logToConsole(LOG_DEBUG|LOG_WARN, `${getPlayerDisplayForConsole(client)} failed to reset their password (verification code not correct)`);
|
||||
}
|
||||
}
|
||||
@@ -1038,7 +1049,7 @@ function checkAccountChangePassword(client, newPassword, confirmNewPassword) {
|
||||
if(!isPlayerLoggedIn(client)) {
|
||||
if(getPlayerData(client).passwordResetState != VRR_RESETPASS_STATE_SETPASS) {
|
||||
//getPlayerData(client).passwordResetState = VRR_RESETPASS_STATE_NONE;
|
||||
//client.disconnect();
|
||||
//disconnectPlayer(client);
|
||||
logToConsole(LOG_DEBUG|LOG_WARN, `${getPlayerDisplayForConsole(client)} failed to change their password (not logged in or not using reset password)`);
|
||||
return false;
|
||||
}
|
||||
@@ -1089,7 +1100,7 @@ function isValidEmailAddress(emailAddress) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function savePlayersToDatabase() {
|
||||
function saveAllPlayersToDatabase() {
|
||||
logToConsole(LOG_DEBUG, "[VRR.Account]: Saving all clients to database ...");
|
||||
getClients().forEach(function(client) {
|
||||
savePlayerToDatabase(client);
|
||||
@@ -1115,7 +1126,7 @@ function savePlayerToDatabase(client) {
|
||||
//let subAccountData = getPlayerCurrentSubAccount(client);
|
||||
|
||||
if(getPlayerPed(client) != null) {
|
||||
if(getPlayerData(client).returnToPosition != null) {
|
||||
if(getPlayerData(client).returnToPosition != null && getPlayerData(client).returnToType != VRR_RETURNTO_TYPE_ADMINGET) {
|
||||
getPlayerCurrentSubAccount(client).spawnPosition = getPlayerData(client).returnToPosition;
|
||||
getPlayerCurrentSubAccount(client).spawnHeading = getPlayerData(client).returnToHeading.z;
|
||||
getPlayerCurrentSubAccount(client).interior = getPlayerData(client).returnToInterior;
|
||||
@@ -1141,11 +1152,11 @@ function initClient(client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(client.getData("vrr.isInitialized") != null || client.getData("vrr.isInitialized") == true) {
|
||||
if(doesEntityDataExist(client, "vrr.isInitialized") || getEntityData(client, "vrr.isInitialized") == true) {
|
||||
return false;
|
||||
}
|
||||
|
||||
client.setData("vrr.isInitialized", true, false);
|
||||
setEntityData(client, "vrr.isInitialized", true, false);
|
||||
|
||||
sendPlayerGUIColours(client);
|
||||
sendPlayerGUIInit(client);
|
||||
@@ -1157,19 +1168,19 @@ function initClient(client) {
|
||||
|
||||
setTimeout(function() {
|
||||
if(client != null) {
|
||||
|
||||
clearChatBox(client);
|
||||
let tempAccountData = loadAccountFromName(getPlayerName(client), true);
|
||||
let tempSubAccounts = loadSubAccountsFromAccount(tempAccountData.databaseId);
|
||||
|
||||
getServerData().clients[client.index] = new ClientData(client, tempAccountData, tempSubAccounts);
|
||||
getServerData().clients[getPlayerId(client)] = new ClientData(client, tempAccountData, tempSubAccounts);
|
||||
|
||||
getServerData().clients[client.index].sessionId = saveConnectionToDatabase(client);
|
||||
getServerData().clients[client.index].connectTime = getCurrentUnixTimestamp();
|
||||
getServerData().clients[getPlayerId(client)].sessionId = saveConnectionToDatabase(client);
|
||||
getServerData().clients[getPlayerId(client)].connectTime = getCurrentUnixTimestamp();
|
||||
requestClientInfo(client);
|
||||
|
||||
if(tempAccountData != false) {
|
||||
if(isAccountAutoIPLoginEnabled(tempAccountData) && getPlayerData(client).accountData.ipAddress == client.ip) {
|
||||
sendPlayerLocaleId(client, getPlayerData(client).accountData.locale);
|
||||
if(isAccountAutoIPLoginEnabled(tempAccountData) && getPlayerData(client).accountData.ipAddress == getPlayerIP(client)) {
|
||||
messagePlayerAlert(client, getLocaleString(client, "AutoLoggedInIP"));
|
||||
loginSuccess(client);
|
||||
playRadioStreamForPlayer(client, getServerIntroMusicURL(), true, getPlayerStreamingRadioVolume(client));
|
||||
@@ -1182,7 +1193,7 @@ function initClient(client) {
|
||||
messagePlayerNormal(client, getLocaleString(client, "WelcomeBack", getServerName(), getPlayerName(client), "/login"),getColourByName("softGreen"));
|
||||
|
||||
//if(checkForGeoIPModule()) {
|
||||
// let iso = module.geoip.getCountryISO(client.ip);
|
||||
// let iso = module.geoip.getCountryISO(getPlayerIP(client));
|
||||
// let localeId = getLocaleFromCountryISO(iso);
|
||||
//}
|
||||
//showGameMessage(client, getLocaleString(client, "LocaleOffer", `/lang ${getLocaleData(localeId)[2]}`), getColourByName("white"), 10000, "Roboto");
|
||||
@@ -1190,6 +1201,7 @@ function initClient(client) {
|
||||
playRadioStreamForPlayer(client, getServerIntroMusicURL(), true, getPlayerStreamingRadioVolume(client));
|
||||
}
|
||||
} else {
|
||||
sendPlayerLocaleId(client, 0);
|
||||
if(doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the register GUI.`);
|
||||
showPlayerRegistrationGUI(client);
|
||||
@@ -1200,9 +1212,12 @@ function initClient(client) {
|
||||
playRadioStreamForPlayer(client, getServerIntroMusicURL(), true, getPlayerStreamingRadioVolume(client));
|
||||
}
|
||||
|
||||
getServerData().clients[client.index].keyBinds = loadAccountKeybindsFromDatabase(getServerData().clients[client.index].accountData.databaseId);
|
||||
getServerData().clients[getPlayerId(client)].keyBinds = loadAccountKeybindsFromDatabase(getServerData().clients[getPlayerId(client)].accountData.databaseId);
|
||||
sendAccountKeyBindsToClient(client);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}, 2500);
|
||||
}
|
||||
|
||||
@@ -1212,7 +1227,7 @@ function saveConnectionToDatabase(client) {
|
||||
let dbConnection = connectToDatabase();
|
||||
if(dbConnection) {
|
||||
let safeName = escapeDatabaseString(dbConnection, getPlayerName(client));
|
||||
let dbQueryString = `INSERT INTO conn_main (conn_when_connect, conn_server, conn_script_version, conn_game_version, conn_client_version, conn_name, conn_ip) VALUES (NOW(), ${getServerConfig().databaseId}, '${scriptVersion}', '${client.gameVersion}', '0.0.0', '${safeName}', '${client.ip}')`;
|
||||
let dbQueryString = `INSERT INTO conn_main (conn_when_connect, conn_server, conn_script_version, conn_game_version, conn_client_version, conn_name, conn_ip) VALUES (NOW(), ${getServerConfig().databaseId}, '${scriptVersion}', '${getPlayerGameVersion(client)}', '0.0.0', '${safeName}', '${getPlayerIP(client)}')`;
|
||||
queryDatabase(dbConnection, dbQueryString);
|
||||
return getDatabaseInsertId(dbConnection);
|
||||
}
|
||||
@@ -1406,7 +1421,13 @@ function isAccountTwoFactorAuthenticationVerified(accountData) {
|
||||
// ===========================================================================
|
||||
|
||||
function doesPlayerHaveTwoFactorAuthEnabled(client) {
|
||||
return hasBitFlag(getPlayerData(client).accountData.flags.settings, getAccountSettingsFlagValue("TwoFactorAuth"));
|
||||
return hasBitFlag(getPlayerData(client).accountData.settings, getAccountSettingsFlagValue("TwoFactorAuth"));
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function doesPlayerHaveLoginAlertsEnabled(client) {
|
||||
return hasBitFlag(getPlayerData(client).accountData.settings, getAccountSettingsFlagValue("AuthAttemptAlert"));
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -1464,7 +1485,7 @@ function verifyAccountEmail(accountData, verificationCode) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function sendAccountLoginFailedNotification(emailAddress, name, ip, game = getServerGame()) {
|
||||
function sendAccountLoginFailedNotification(emailAddress, name, ip, game = getGame()) {
|
||||
let countryName = module.geoip.getCountryName(getGlobalConfig().geoIPCountryDatabaseFilePath, ip);
|
||||
let subDivisionName = module.geoip.getSubdivisionName(getGlobalConfig().geoIPCityDatabaseFilePath, ip);
|
||||
let cityName = module.geoip.getCityName(getGlobalConfig().geoIPCityDatabaseFilePath, ip);
|
||||
@@ -1472,7 +1493,7 @@ function sendAccountLoginFailedNotification(emailAddress, name, ip, game = getSe
|
||||
let emailBodyText = getEmailConfig().bodyContent.accountAuthFailAlert;
|
||||
emailBodyText = emailBodyText.replace("{GAMENAME}", getGameName(game));
|
||||
emailBodyText = emailBodyText.replace("{IPADDRESS}", ip);
|
||||
emailBodyText = emailBodyText.replace("{LOCATION}", `${cityName}, ${countryName}, ${countryName}`);
|
||||
emailBodyText = emailBodyText.replace("{LOCATION}", `${cityName}, ${subDivisionName}, ${countryName}`);
|
||||
emailBodyText = emailBodyText.replace("{SERVERNAME}", getServerName());
|
||||
emailBodyText = emailBodyText.replace("{TIMESTAMP}", date.toLocaleString('en-US'));
|
||||
|
||||
@@ -1482,7 +1503,7 @@ function sendAccountLoginFailedNotification(emailAddress, name, ip, game = getSe
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function sendAccountLoginSuccessNotification(emailAddress, name, ip, game = getServerGame()) {
|
||||
function sendAccountLoginSuccessNotification(emailAddress, name, ip, game = getGame()) {
|
||||
let countryName = module.geoip.getCountryName(getGlobalConfig().geoIPCountryDatabaseFilePath, ip);
|
||||
let subDivisionName = module.geoip.getSubdivisionName(getGlobalConfig().geoIPCityDatabaseFilePath, ip);
|
||||
let cityName = module.geoip.getCityName(getGlobalConfig().geoIPCityDatabaseFilePath, ip);
|
||||
@@ -1520,7 +1541,7 @@ function checkPlayerTwoFactorAuthentication(client, authCode) {
|
||||
}
|
||||
}
|
||||
|
||||
client.disconnect();
|
||||
disconnectPlayer(client);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1530,4 +1551,16 @@ function isPlayerATester(client) {
|
||||
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function sendAccountTwoFactorAuthCode(emailAddress, name, twoFactorAuthCode) {
|
||||
let emailBodyText = getEmailConfig().bodyContent.twoFactorAuthentication;
|
||||
emailBodyText = emailBodyText.replace("{2FACODE}", twoFactorAuthCode);
|
||||
emailBodyText = emailBodyText.replace("{GAMENAME}", getGameName(getGame()));
|
||||
emailBodyText = emailBodyText.replace("{SERVERNAME}", getServerName());
|
||||
|
||||
sendEmail(emailAddress, name, `Login code for ${getServerName()}`, emailBodyText);
|
||||
return true;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -25,7 +25,7 @@ function playPlayerAnimationCommand(command, params, client) {
|
||||
|
||||
if(!animationSlot) {
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidAnimation"));
|
||||
messagePlayerInfo(client, getLocaleString(client, "AnimationHelpTip"), `{ALTCOLOUR}/animlist{MAINCOLOUR}`);
|
||||
messagePlayerInfo(client, getLocaleString(client, "AnimationCommandTip", `{ALTCOLOUR}/animlist{MAINCOLOUR}`));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -64,13 +64,13 @@ function stopPlayerAnimationCommand(command, params, client) {
|
||||
getPlayerData(client).animationStart = 0;
|
||||
getPlayerData(client).animationForced = false;
|
||||
|
||||
setPlayerMouseCameraState(client, false);
|
||||
//setPlayerMouseCameraState(client, false);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showAnimationListCommand(command, params, client) {
|
||||
let animList = getGameConfig().animations[getServerGame()].map(function(x) { return x.name; });
|
||||
let animList = getGameConfig().animations[getGame()].map(function(x) { return x.name; });
|
||||
|
||||
let chunkedList = splitArrayIntoChunks(animList, 10);
|
||||
|
||||
@@ -87,7 +87,7 @@ function showAnimationListCommand(command, params, client) {
|
||||
* @param {number} animationSlot - The slot index of the animation
|
||||
* @return {Array} The animation's data (array)
|
||||
*/
|
||||
function getAnimationData(animationSlot, gameId = getServerGame()) {
|
||||
function getAnimationData(animationSlot, gameId = getGame()) {
|
||||
return getGameConfig().animations[gameId][animationSlot];
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ function makePlayerStopAnimation(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function getAnimationFromParams(params) {
|
||||
let animations = getGameConfig().animations[getServerGame()];
|
||||
let animations = getGameConfig().animations[getGame()];
|
||||
if(isNaN(params)) {
|
||||
for(let i in animations) {
|
||||
if(toLowerCase(animations[i].name).indexOf(toLowerCase(params)) != -1) {
|
||||
@@ -152,7 +152,7 @@ function getAnimationFromParams(params) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(typeof getGameConfig().animations[getServerGame()][params] != "undefined") {
|
||||
if(typeof getGameConfig().animations[getGame()][params] != "undefined") {
|
||||
return toInteger(params);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
// TYPE: Server (JavaScript)
|
||||
// ===========================================================================
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function initBanScript() {
|
||||
logToConsole(LOG_INFO, "[VRR.Ban]: Initializing ban script ...");
|
||||
logToConsole(LOG_INFO, "[VRR.Ban]: Ban script initialized!");
|
||||
@@ -39,7 +37,7 @@ function accountBanCommand(command, params, client) {
|
||||
|
||||
logToConsole(LOG_WARN, `[VRR.Ban]: ${getPlayerDisplayForConsole(targetClient)} (${getPlayerData(targetClient).accountData.name}) account was banned by ${getPlayerDisplayForConsole(client)}. Reason: ${reason}`);
|
||||
|
||||
announceAdminAction(`PlayerAccountBanned`, `{ALTCOLOUR}${targetClient.name}{MAINCOLOUR}`);
|
||||
announceAdminAction(`PlayerAccountBanned`, `{ALTCOLOUR}${getPlayerName(client)}{MAINCOLOUR}`);
|
||||
banAccount(getPlayerData(targetClient).accountData.databaseId, getPlayerData(client).accountData.databaseId, reason);
|
||||
disconnectPlayer(client);
|
||||
}
|
||||
@@ -69,7 +67,7 @@ function subAccountBanCommand(command, params, client, fromDiscord) {
|
||||
|
||||
logToConsole(LOG_WARN, `[VRR.Ban]: ${getPlayerDisplayForConsole(targetClient)} (${getPlayerData(targetClient).accountData.name})'s subaccount was banned by ${getPlayerDisplayForConsole(client)}. Reason: ${reason}`);
|
||||
|
||||
announceAdminAction(`PlayerCharacterBanned`, `{ALTCOLOUR}${targetClient.name}{MAINCOLOUR}`);
|
||||
announceAdminAction(`PlayerCharacterBanned`, `{ALTCOLOUR}${getPlayerName(client)}{MAINCOLOUR}`);
|
||||
banSubAccount(getPlayerData(targetClient).currentSubAccountData.databaseId, getPlayerData(client).accountData.databaseId, reason);
|
||||
|
||||
disconnectPlayer(client);
|
||||
@@ -98,11 +96,11 @@ function ipBanCommand(command, params, client, fromDiscord) {
|
||||
return false;
|
||||
}
|
||||
|
||||
announceAdminAction(`PlayerIPBanned`, `{ALTCOLOUR}${targetClient.name}{MAINCOLOUR}`);
|
||||
banIPAddress(targetClient.ip, getPlayerData(client).accountData.databaseId, reason);
|
||||
announceAdminAction(`PlayerIPBanned`, `{ALTCOLOUR}${getPlayerName(targetClient)}{MAINCOLOUR}`);
|
||||
banIPAddress(getPlayerIP(targetClient), getPlayerData(client).accountData.databaseId, reason);
|
||||
|
||||
server.banIP(targetClient.ip);
|
||||
targetClient.disconnect();
|
||||
serverBanIP(getPlayerIP(targetClient));
|
||||
disconnectPlayer(targetClient);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -129,10 +127,10 @@ function subNetBanCommand(command, params, client, fromDiscord) {
|
||||
return false;
|
||||
}
|
||||
|
||||
announceAdminAction(`PlayerSubNetBanned`, `{ALTCOLOUR}${targetClient.name}{MAINCOLOUR}`);
|
||||
banSubNet(targetClient.ip, getSubNet(targetClient.ip, octetAmount), getPlayerData(client).accountData.databaseId, reason);
|
||||
announceAdminAction(`PlayerSubNetBanned`, `{ALTCOLOUR}${getPlayerName(client)}{MAINCOLOUR}`);
|
||||
banSubNet(getPlayerIP(targetClient), getSubNet(getPlayerIP(targetClient), octetAmount), getPlayerData(client).accountData.databaseId, reason);
|
||||
|
||||
server.banIP(targetClient.ip);
|
||||
serverBanIP(getPlayerIP(targetClient));
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -254,13 +252,9 @@ function unbanSubNet(ipAddressStart, ipAddressEnd, adminAccountId) {
|
||||
// ===========================================================================
|
||||
|
||||
function isAccountBanned(accountId) {
|
||||
let bans = getServerData().bans;
|
||||
for(let i in bans) {
|
||||
if(bans[i].type == VRR_BANTYPE_ACCOUNT) {
|
||||
if(bans[i].detail == accountId) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
let bans = getServerData().bans.filter(ban => ban.type === VRR_BANTYPE_ACCOUNT && ban.detail === accountId);
|
||||
if(bans.length > 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -269,13 +263,9 @@ function isAccountBanned(accountId) {
|
||||
// ===========================================================================
|
||||
|
||||
function isSubAccountBanned(subAccountId) {
|
||||
let bans = getServerData().bans;
|
||||
for(let i in bans) {
|
||||
if(bans[i].type == VRR_BANTYPE_SUBACCOUNT) {
|
||||
if(bans[i].detail == subAccountId) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
let bans = getServerData().bans.filter(ban => ban.type === VRR_BANTYPE_SUBACCOUNT && ban.detail === subAccountId);
|
||||
if(bans.length > 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -284,13 +274,9 @@ function isSubAccountBanned(subAccountId) {
|
||||
// ===========================================================================
|
||||
|
||||
function isIpAddressBanned(ipAddress) {
|
||||
let bans = getServerData().bans;
|
||||
for(let i in bans) {
|
||||
if(bans[i].type == VRR_BANTYPE_IPADDRESS) {
|
||||
if(bans[i].detail == ipAddress) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
let bans = getServerData().bans.filter(ban => ban.type === VRR_BANTYPE_IPADDRESS && ban.detail === ipAddress);
|
||||
if(bans.length > 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
// TYPE: Server (JavaScript)
|
||||
// ===========================================================================
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
let serverBitFlags = {
|
||||
staffFlags: {},
|
||||
moderationFlags: {},
|
||||
@@ -244,40 +242,6 @@ function initBitFlagScript() {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function createBitFlagTable(keyNames) {
|
||||
let bitVal = 0;
|
||||
let bitTable = {};
|
||||
let incVal = 1;
|
||||
|
||||
for(let i in keyNames) {
|
||||
let key = keyNames[i];
|
||||
bitTable[key] = bitVal;
|
||||
bitVal = 1 << incVal;
|
||||
incVal++;
|
||||
}
|
||||
return bitTable;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function hasBitFlag(allFlags, checkForFlag) {
|
||||
if(allFlags == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(allFlags == -1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if((allFlags & checkForFlag) == checkForFlag) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function doesPlayerHaveStaffPermission(client, requiredFlags) {
|
||||
if(isConsole(client)) {
|
||||
return true;
|
||||
@@ -415,18 +379,6 @@ function takePlayerStaffFlag(client, flagName) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function addBitFlag(allFlags, flagValue) {
|
||||
return allFlags | flagValue;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function removeBitFlag(allFlags, flagValue) {
|
||||
return allFlags ^ flagValue;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function takePlayerStaffFlag(client, flagName) {
|
||||
if(!getStaffFlagValue(flagName)) {
|
||||
return false;
|
||||
@@ -455,20 +407,4 @@ function getServerBitFlagKeys() {
|
||||
return serverBitFlagKeys;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function createBitwiseTable(tableKeys) {
|
||||
let bitVal = 0;
|
||||
let bitTable = {};
|
||||
let incVal = 1;
|
||||
|
||||
for(let i in tableKeys) {
|
||||
let key = tableKeys[i];
|
||||
bitTable[key] = bitVal;
|
||||
bitVal = 1 << incVal;
|
||||
incVal++;
|
||||
}
|
||||
return bitTable;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -173,7 +173,7 @@ function adminChatCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
messageAdmins(`{jobYellow}[Admin Chat] {ALTCOLOUR}${getPlayerName(client)} [#CCCCCC](${getPlayerStaffTitle(client)}){MAINCOLOUR}: ${params}`);
|
||||
messageAdmins(`{jobYellow}[Admin Chat] {ALTCOLOUR}${getPlayerName(client)}: ${params}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
@@ -9,11 +9,6 @@
|
||||
|
||||
function initClanScript() {
|
||||
logToConsole(LOG_INFO, "[VRR.Clan]: Initializing clans script ...");
|
||||
if(!getServerConfig().devServer) {
|
||||
getServerData().clans = loadClansFromDatabase();
|
||||
}
|
||||
|
||||
setAllClanDataIndexes();
|
||||
logToConsole(LOG_INFO, "[VRR.Clan]: Clan script initialized successfully!");
|
||||
return true;
|
||||
}
|
||||
@@ -36,7 +31,7 @@ function loadClansFromDatabase() {
|
||||
//tempClanData.members = loadClanMembersFromDatabase(tempClanData.databaseId);
|
||||
tempClanData.ranks = loadClanRanksFromDatabase(tempClanData.databaseId);
|
||||
tempClans.push(tempClanData);
|
||||
logToConsole(LOG_VERBOSE, `[VRR.Clan]: Clan '${tempClanData.name}' loaded from database successfully!`);
|
||||
logToConsole(LOG_DEBUG, `[VRR.Clan]: Clan '${tempClanData.name}' loaded from database successfully!`);
|
||||
}
|
||||
}
|
||||
freeDatabaseQuery(dbQuery);
|
||||
@@ -705,8 +700,7 @@ function showClanRankFlagsCommand(command, params, client) {
|
||||
|
||||
let chunkedList = splitArrayIntoChunks(flagList, 6);
|
||||
|
||||
messagePlayerInfo(client, `{clanOrange}== {jobYellow}Clan Rank Flags (${getClanRankData(clanId, rankId).name}){clanOrange}===================`);
|
||||
|
||||
makeChatBoxSectionHeader(client, getLocaleString(client, "ClanRankFlags"), getClanRankData(clanId, rankId).name);
|
||||
for(let i in chunkedList) {
|
||||
messagePlayerInfo(client, chunkedList[i].join("{MAINCOLOUR}, "));
|
||||
}
|
||||
@@ -847,7 +841,7 @@ function setClanMemberRankCommand(command, params, client) {
|
||||
let oldClanRank = getClanRankData(clanId, getPlayerClanRank(targetClient));
|
||||
getPlayerCurrentSubAccount(targetClient).clanRank = getClanRankData(clanId, rankId).databaseId;
|
||||
getPlayerCurrentSubAccount(targetClient).clanRankIndex = rankId;
|
||||
messagePlayerSuccess(client, `You changed {ALTCOLOUR}${getCharacterFullName(targetClient)}'s {MAINCOLOUR}rank from {ALTCOLOUR}${oldClanRank.name} {MAINCOLOUR}to {ALTCOLOUR}${getClanRankData(clanId, rankId).name}`);
|
||||
messagePlayerSuccess(client, `You changed {ALTCOLOUR}${getCharacterFullName(targetClient)}'s{MAINCOLOUR} rank from {ALTCOLOUR}${oldClanRank.name}{MAINCOLOUR} to {ALTCOLOUR}${getClanRankData(clanId, rankId).name}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -873,7 +867,7 @@ function createClan(name) {
|
||||
// ===========================================================================
|
||||
|
||||
function deleteClan(clanId) {
|
||||
saveClansToDatabase();
|
||||
//saveAllClansToDatabase();
|
||||
|
||||
let dbConnection = connectToDatabase();
|
||||
if(dbConnection) {
|
||||
@@ -1086,7 +1080,7 @@ function setClanRankTitle(clanId, rankId, title) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function saveClansToDatabase() {
|
||||
function saveAllClansToDatabase() {
|
||||
if(getServerConfig().devServer) {
|
||||
return false;
|
||||
}
|
||||
@@ -1214,7 +1208,7 @@ function showClanFlagListCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let rankId = getClanRankFromParams(clanId, getParam(params, " ", 1));
|
||||
let rankId = getClanRankFromParams(clanId, getParam(params, " ", 1));
|
||||
|
||||
if(!getClanRankData(clanId, rankId)) {
|
||||
messagePlayerError(client, getLocaleString(client, "ClanRankInvalid"));
|
||||
@@ -1237,6 +1231,8 @@ let rankId = getClanRankFromParams(clanId, getParam(params, " ", 1));
|
||||
}
|
||||
*/
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
/**
|
||||
* @param {String} params - The params to search for
|
||||
* @return {Number} The data index of a matching clan
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
// TYPE: Server (JavaScript)
|
||||
// ===========================================================================
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function initClassScript() {
|
||||
logToConsole(LOG_INFO, "[VRR.Class]: Initializing class script ...");
|
||||
logToConsole(LOG_INFO, "[VRR.Class]: Class script initialized successfully!");
|
||||
@@ -59,6 +57,7 @@ class ServerConfigData {
|
||||
this.inflationMultiplier = 1;
|
||||
this.testerOnly = false;
|
||||
this.devServer = false;
|
||||
this.nameTagDistance = 50.0;
|
||||
|
||||
this.antiCheat = {
|
||||
enabled: false,
|
||||
@@ -89,7 +88,7 @@ class ServerConfigData {
|
||||
this.discordConfig = {
|
||||
sendEvents: true,
|
||||
sendChat: true,
|
||||
sendAdminEvents: true,
|
||||
sendAdmin: true,
|
||||
};
|
||||
|
||||
if(dbAssoc) {
|
||||
@@ -109,27 +108,22 @@ class ServerConfigData {
|
||||
this.minute = toInteger(dbAssoc["svr_start_time_min"]);
|
||||
this.minuteDuration = toInteger(dbAssoc["svr_time_min_duration"]);
|
||||
this.weather = toInteger(dbAssoc["svr_start_weather"]);
|
||||
//this.fallingSnow = intToBool(toInteger(dbAssoc["svr_start_snow_falling"]));
|
||||
//this.groundSnow = intToBool(toInteger(dbAssoc["svr_start_snow_ground"]));
|
||||
//this.useGUI = intToBool(toInteger(dbAssoc["svr_gui_enabled"]));
|
||||
//this.showLogo = intToBool(toInteger(dbAssoc["svr_logo_enabled"]));
|
||||
//this.testerOnly = intToBool(toInteger(dbAssoc["svr_tester_only"]));
|
||||
|
||||
/*
|
||||
this.createJobPickups = intToBool(toInteger(dbAssoc["svr_job_pickups_enabled"]));
|
||||
this.createBusinessPickups = intToBool(toInteger(dbAssoc["svr_biz_pickups_enabled"]));
|
||||
this.createHousePickups = intToBool(toInteger(dbAssoc["svr_house_pickups_enabled"]));
|
||||
this.createJobBlips = intToBool(toInteger(dbAssoc["svr_job_blips_enabled"]));
|
||||
this.createBusinessBlips = intToBool(toInteger(dbAssoc["svr_biz_blips_enabled"]));
|
||||
this.createHouseBlips = intToBool(toInteger(dbAssoc["svr_house_blips_enabled"]));
|
||||
*/
|
||||
|
||||
this.fallingSnow = intToBool(toInteger(dbAssoc["svr_snow_falling"]));
|
||||
this.groundSnow = intToBool(toInteger(dbAssoc["svr_snow_ground"]));
|
||||
this.useGUI = intToBool(toInteger(dbAssoc["svr_gui"]));
|
||||
this.showLogo = intToBool(toInteger(dbAssoc["svr_logo"]));
|
||||
this.createJobPickups = intToBool(toInteger(dbAssoc["svr_job_pickups"]));
|
||||
this.createBusinessPickups = intToBool(toInteger(dbAssoc["svr_biz_pickups"]));
|
||||
this.createHousePickups = intToBool(toInteger(dbAssoc["svr_house_pickups"]));
|
||||
this.createJobBlips = intToBool(toInteger(dbAssoc["svr_job_blips"]));
|
||||
this.createBusinessBlips = intToBool(toInteger(dbAssoc["svr_biz_blips"]));
|
||||
this.createHouseBlips = intToBool(toInteger(dbAssoc["svr_house_blips"]));
|
||||
this.guiColourPrimary = [toInteger(dbAssoc["svr_gui_col1_r"]), toInteger(dbAssoc["svr_gui_col1_g"]), toInteger(dbAssoc["svr_gui_col1_b"])];
|
||||
this.guiColourSecondary = [toInteger(dbAssoc["svr_gui_col2_r"]), toInteger(dbAssoc["svr_gui_col2_g"]), toInteger(dbAssoc["svr_gui_col2_b"])];
|
||||
this.guiTextColourPrimary = [toInteger(dbAssoc["svr_gui_textcol1_r"]), toInteger(dbAssoc["svr_gui_textcol1_g"]), toInteger(dbAssoc["svr_gui_textcol1_b"])];
|
||||
//this.guiTextColourSecondary = [toInteger(dbAssoc["svr_gui_textcol2_r"]), toInteger(dbAssoc["svr_gui_textcol2_g"]), toInteger(dbAssoc["svr_gui_textcol2_b"])];
|
||||
this.inflationMultiplier = toFloat(dbAssoc["svr_inflation_multiplier"]);
|
||||
|
||||
this.nameTagDistance = toFloat(dbAssoc["svr_nametag_distance"]);
|
||||
this.discordBotToken = intToBool(dbAssoc["svr_discord_bot_token"]);
|
||||
this.introMusicURL = dbAssoc["svr_intro_music"];
|
||||
|
||||
@@ -137,9 +131,9 @@ class ServerConfigData {
|
||||
//this.realTimeZone = dbAssoc["svr_real_time_timezone"];
|
||||
|
||||
this.discord = {
|
||||
sendEvents: true,
|
||||
sendChat: true,
|
||||
sendAdmin: true,
|
||||
sendEvents: intToBool(dbAssoc["svr_discord_send_events"]),
|
||||
sendChat: intToBool(dbAssoc["svr_discord_send_chat"]),
|
||||
sendAdmin: intToBool(dbAssoc["svr_discord_send_admin"]),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -252,7 +246,7 @@ class ClientData {
|
||||
|
||||
this.customDisconnectReason = "";
|
||||
|
||||
this.interiorCutscene = "";
|
||||
this.interiorCutscene = -1;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -540,7 +534,7 @@ class BusinessData {
|
||||
this.entranceBlipModel = -1;
|
||||
this.entrancePickup = null;
|
||||
this.entranceBlip = null;
|
||||
this.entranceCutscene = "";
|
||||
this.entranceCutscene = -1;
|
||||
|
||||
this.exitPosition = false;
|
||||
this.exitRotation = 0.0;
|
||||
@@ -550,7 +544,7 @@ class BusinessData {
|
||||
this.exitBlipModel = -1;
|
||||
this.exitPickup = null;
|
||||
this.exitBlip = null;
|
||||
this.exitCutscene = "";
|
||||
this.exitCutscene = -1;
|
||||
|
||||
this.entranceFee = 0;
|
||||
this.till = 0;
|
||||
@@ -561,6 +555,8 @@ class BusinessData {
|
||||
|
||||
this.triggers = [];
|
||||
|
||||
this.customInterior = false;
|
||||
|
||||
if(dbAssoc) {
|
||||
this.databaseId = toInteger(dbAssoc["biz_id"]);
|
||||
this.name = toString(dbAssoc["biz_name"]);
|
||||
@@ -577,7 +573,7 @@ class BusinessData {
|
||||
this.entranceDimension = toInteger(dbAssoc["biz_entrance_vw"]);
|
||||
this.entrancePickupModel = toInteger(dbAssoc["biz_entrance_pickup"]);
|
||||
this.entranceBlipModel = toInteger(dbAssoc["biz_entrance_blip"]);
|
||||
this.entranceCutscene = toString(dbAssoc["biz_entrance_cutscene"]);
|
||||
this.entranceCutscene = toInteger(dbAssoc["biz_entrance_cutscene"]);
|
||||
|
||||
this.exitPosition = toVector3(dbAssoc["biz_exit_pos_x"], dbAssoc["biz_exit_pos_y"], dbAssoc["biz_exit_pos_z"]);
|
||||
this.exitRotation = toInteger(dbAssoc["biz_exit_rot_z"]);
|
||||
@@ -585,14 +581,14 @@ class BusinessData {
|
||||
this.exitDimension = toInteger(dbAssoc["biz_exit_vw"]);
|
||||
this.exitPickupModel = toInteger(dbAssoc["biz_exit_pickup"]);
|
||||
this.exitBlipModel = toInteger(dbAssoc["biz_exit_blip"]);
|
||||
this.exitCutscene = toString(dbAssoc["biz_exit_cutscene"]);
|
||||
this.exitCutscene = toInteger(dbAssoc["biz_exit_cutscene"]);
|
||||
|
||||
this.entranceFee = toInteger(dbAssoc["biz_entrance_fee"]);
|
||||
this.till = toInteger(dbAssoc["biz_till"]);
|
||||
|
||||
this.labelHelpType = toInteger(dbAssoc["biz_label_help_type"]);
|
||||
this.streamingRadioStation = toInteger(dbAssoc["biz_radiostation"]);
|
||||
|
||||
this.customInterior = intToBool(toInteger(dbAssoc["biz_custom_interior"]));
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -681,7 +677,6 @@ class HouseData {
|
||||
this.entranceBlipModel = -1;
|
||||
this.entrancePickup = null;
|
||||
this.entranceBlip = null;
|
||||
this.entranceCutscene = "";
|
||||
|
||||
this.exitPosition = false;
|
||||
this.exitRotation = 0.0;
|
||||
@@ -691,12 +686,13 @@ class HouseData {
|
||||
this.exitBlipModel = -1;
|
||||
this.exitPickup = null;
|
||||
this.exitBlip = null;
|
||||
this.exitCutscene = "";
|
||||
|
||||
this.streamingRadioStation = -1;
|
||||
|
||||
this.triggers = [];
|
||||
|
||||
this.customInterior = false;
|
||||
|
||||
if(dbAssoc) {
|
||||
this.databaseId = toInteger(dbAssoc["house_id"]);
|
||||
this.description = toString(dbAssoc["house_description"]);
|
||||
@@ -715,7 +711,7 @@ class HouseData {
|
||||
this.entranceDimension = toInteger(dbAssoc["house_entrance_vw"]);
|
||||
this.entrancePickupModel = toInteger(dbAssoc["house_entrance_pickup"]);
|
||||
this.entranceBlipModel = toInteger(dbAssoc["house_entrance_blip"]);
|
||||
this.entranceCutscene = toString(dbAssoc["house_entrance_cutscene"]);
|
||||
this.entranceCutscene = toInteger(dbAssoc["house_entrance_cutscene"]);
|
||||
|
||||
this.exitPosition = toVector3(toFloat(dbAssoc["house_exit_pos_x"]), toFloat(dbAssoc["house_exit_pos_y"]), toFloat(dbAssoc["house_exit_pos_z"]));
|
||||
this.exitRotation = toFloat(dbAssoc["house_exit_rot_z"]);
|
||||
@@ -723,7 +719,9 @@ class HouseData {
|
||||
this.exitDimension = toInteger(dbAssoc["house_exit_vw"]);
|
||||
this.exitPickupModel = toInteger(dbAssoc["house_exit_pickup"]);
|
||||
this.exitBlipModel = toInteger(dbAssoc["house_exit_blip"]);
|
||||
this.exitCutscene = toString(dbAssoc["house_exit_cutscene"]);
|
||||
this.exitCutscene = toInteger(dbAssoc["house_exit_cutscene"]);
|
||||
|
||||
this.customInterior = intToBool(toInteger(dbAssoc["house_custom_interior"]));
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1259,14 +1257,12 @@ class JobLocationData {
|
||||
this.routeCache = [];
|
||||
|
||||
if(dbAssoc) {
|
||||
this.databaseId = dbAssoc["job_loc_id"];
|
||||
this.jobId = dbAssoc["job_loc_job"];
|
||||
this.position = toVector3(dbAssoc["job_loc_pos_x"], dbAssoc["job_loc_pos_y"], dbAssoc["job_loc_pos_z"]);
|
||||
this.blip = false;
|
||||
this.pickup = false;
|
||||
this.enabled = dbAssoc["job_loc_enabled"];
|
||||
this.interior = dbAssoc["job_loc_int"];
|
||||
this.dimension = dbAssoc["job_loc_vw"];
|
||||
this.databaseId = toInteger(dbAssoc["job_loc_id"]);
|
||||
this.jobId = toInteger(dbAssoc["job_loc_job"]);
|
||||
this.position = toVector3(toFloat(dbAssoc["job_loc_pos_x"]), toFloat(dbAssoc["job_loc_pos_y"]), toFloat(dbAssoc["job_loc_pos_z"]));
|
||||
this.enabled = toInteger(dbAssoc["job_loc_enabled"]);
|
||||
this.interior = toInteger(dbAssoc["job_loc_int"]);
|
||||
this.dimension = toInteger(dbAssoc["job_loc_vw"]);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -1718,4 +1714,27 @@ class JobRouteLocationData {
|
||||
this.pay = toInteger(dbAssoc["job_route_loc_pay"]);
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class GateData {
|
||||
constructor(dbAssoc = false) {
|
||||
this.databaseId = 0;
|
||||
this.name = "";
|
||||
this.scriptName = "";
|
||||
this.enabled = false;
|
||||
this.position = toVector3(0.0, 0.0, 0.0);
|
||||
this.locked = true;
|
||||
this.ownerType = VRR_GATEOWNER_NONE;
|
||||
this.ownerId = 0;
|
||||
|
||||
if(dbAssoc) {
|
||||
this.databaseId = toInteger(dbAssoc["gate_id"]);
|
||||
this.name = toString(dbAssoc["gate_name"]);
|
||||
this.scriptName = toString(dbAssoc["gate_script_name"]);
|
||||
this.enabled = intToBool(toInteger(dbAssoc["gate_enabled"]));
|
||||
this.position = toVector3(toFloat(dbAssoc["gate_pos_x"]), toFloat(dbAssoc["gate_pos_y"]), toFloat(dbAssoc["gate_pos_z"]));
|
||||
this.ownerType = toInteger(dbAssoc["gate_owner_type"]);
|
||||
this.ownerId = toInteger(dbAssoc["gate_owner_id"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -67,6 +67,9 @@ function addAllNetworkHandlers() {
|
||||
addNetworkEventHandler("vrr.itemActionDelayComplete", playerItemActionDelayComplete);
|
||||
addNetworkEventHandler("vrr.weaponDamage", playerDamagedByPlayer);
|
||||
|
||||
// Locale
|
||||
addNetworkEventHandler("vrr.localeSelect", playerSelectedNewLocale);
|
||||
|
||||
// Misc
|
||||
addNetworkEventHandler("vrr.plr.pos", updatePositionInPlayerData);
|
||||
addNetworkEventHandler("vrr.plr.rot", updateHeadingInPlayerData);
|
||||
@@ -98,7 +101,7 @@ function updateAllPlayerNameTags() {
|
||||
|
||||
function updatePlayerPing(client) {
|
||||
//logToConsole(LOG_DEBUG, `[VRR.Client] Sending ${getPlayerDisplayForConsole(client)}'s ping to all players`);
|
||||
sendNetworkEventToPlayer("vrr.ping", null, getPlayerName(client), client.ping);
|
||||
sendNetworkEventToPlayer("vrr.ping", null, getPlayerName(client), getPlayerPing(client));
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -106,7 +109,7 @@ function updatePlayerPing(client) {
|
||||
function playerClientReady(client) {
|
||||
setEntityData(client, "vrr.isReady", true, false);
|
||||
logToConsole(LOG_DEBUG, `${getPlayerDisplayForConsole(client)}'s client resources are downloaded and ready!`);
|
||||
if(client.getData("vrr.isStarted") == true) {
|
||||
if(getEntityData(client, "vrr.isStarted") == true) {
|
||||
initClient(client);
|
||||
}
|
||||
}
|
||||
@@ -123,7 +126,7 @@ function playerGUIReady(client) {
|
||||
function playerClientStarted(client) {
|
||||
setEntityData(client, "vrr.isStarted", true, false);
|
||||
logToConsole(LOG_DEBUG, `${getPlayerDisplayForConsole(client)}'s client resources are started and running!`);
|
||||
if(client.getData("vrr.isReady") == true) {
|
||||
if(getEntityData(client, "vrr.isReady") == true) {
|
||||
initClient(client);
|
||||
}
|
||||
}
|
||||
@@ -132,14 +135,14 @@ function playerClientStarted(client) {
|
||||
|
||||
function playerClientStopped(client) {
|
||||
logToConsole(LOG_DEBUG, `${getPlayerDisplayForConsole(client)}'s client resources have stopped (possibly error?). Kicking them from the server ...`);
|
||||
client.disconnect();
|
||||
disconnectPlayer(client);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showGameMessage(client, text, colour, duration, fontName = "Pricedown") {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Client] Showing game message to ${getPlayerDisplayForConsole(client)} (${text}) for ${duration} milliseconds`);
|
||||
sendNetworkEventToPlayer("vrr.smallGameMessage", client, text, colour, duration);
|
||||
sendNetworkEventToPlayer("vrr.smallGameMessage", client, text, colour, duration, fontName);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -216,7 +219,7 @@ function syncPlayerProperties(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function updatePlayerSnowState(client) {
|
||||
if(isSnowSupported(getServerGame())) {
|
||||
if(isSnowSupported(getGame())) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Client] Setting ${getPlayerDisplayForConsole(client)}'s snow state (Falling: ${toUpperCase(getOnOffFromBool(getServerConfig().fallingSnow))}, Ground: ${toUpperCase(getOnOffFromBool(getServerConfig().groundSnow))})`);
|
||||
sendNetworkEventToPlayer("vrr.snow", client, getServerConfig().fallingSnow, getServerConfig().groundSnow);
|
||||
}
|
||||
@@ -381,8 +384,8 @@ function showPlayerCharacterSelectFailedGUI(client) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showPlayerPromptGUI(client, promptMessage, promptTitle, yesButtonText, noButtonText) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Client] Sending show prompt GUI signal to ${getPlayerDisplayForConsole(client)} (Title: ${promptTitle}, Message: ${promptMessage})`);
|
||||
function showPlayerPromptGUI(client, promptMessage, promptTitle, yesButtonText = "Yes", noButtonText = "No") {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Client] Sending show prompt GUI signal to ${getPlayerDisplayForConsole(client)} (Title: ${promptTitle}, Message: ${promptMessage}, YesButton: ${yesButtonText}, NoButton: ${noButtonText})`);
|
||||
sendNetworkEventToPlayer("vrr.showPrompt", client, promptMessage, promptTitle, yesButtonText, noButtonText);
|
||||
}
|
||||
|
||||
@@ -404,7 +407,7 @@ function showPlayerErrorGUI(client, errorMessage, errorTitle, buttonText = "OK")
|
||||
|
||||
function sendRunCodeToClient(client, code, returnTo) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Client] Sending runcode to ${getPlayerDisplayForConsole(client)} (returnTo: ${getPlayerDisplayForConsole(getClientFromIndex(returnTo))}, Code: ${code})`);
|
||||
sendNetworkEventToPlayer("vrr.runCode", client, code, returnTo);
|
||||
sendNetworkEventToPlayer("vrr.runCode", client, code, getPlayerId(returnTo));
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -500,9 +503,9 @@ function sendPlayerFrozenState(client, state) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function clearPlayerWeapons(client) {
|
||||
function clearPlayerWeapons(client, clearData = true) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Client] Sending signal to ${getPlayerDisplayForConsole(client)} to clear weapons`);
|
||||
sendNetworkEventToPlayer("vrr.clearWeapons", client);
|
||||
sendNetworkEventToPlayer("vrr.clearWeapons", client, clearData);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -729,17 +732,17 @@ function updateHeadingInVehicleData(client, vehicle, heading) {
|
||||
// ===========================================================================
|
||||
|
||||
function forcePlayerIntoSkinSelect(client) {
|
||||
if(getGameConfig().skinChangePosition[getServerGame()].length > 0) {
|
||||
if(typeof getGameConfig().skinChangePosition[getGame()] != "undefined") {
|
||||
getPlayerData(client).returnToPosition = getPlayerPosition(client);
|
||||
getPlayerData(client).returnToHeading = getPlayerHeading(client);
|
||||
getPlayerData(client).returnToInterior = getPlayerInterior(client);
|
||||
getPlayerData(client).returnToDimension = getPlayerDimension(client);
|
||||
getPlayerData(client).returnToType = VRR_RETURNTO_TYPE_SKINSELECT;
|
||||
|
||||
setPlayerPosition(client, getGameConfig().skinChangePosition[getServerGame()][0]);
|
||||
setPlayerHeading(client, getGameConfig().skinChangePosition[getServerGame()][1]);
|
||||
setPlayerInterior(client, getGameConfig().skinChangePosition[getServerGame()][2]);
|
||||
setPlayerDimension(client, client.index+500);
|
||||
setPlayerPosition(client, getGameConfig().skinChangePosition[getGame()][0]);
|
||||
setPlayerHeading(client, getGameConfig().skinChangePosition[getGame()][1]);
|
||||
setPlayerInterior(client, getGameConfig().skinChangePosition[getGame()][2]);
|
||||
setPlayerDimension(client, getPlayerId(client)+500);
|
||||
}
|
||||
|
||||
sendNetworkEventToPlayer("vrr.skinSelect", client, true);
|
||||
@@ -754,14 +757,14 @@ function updatePlayerCash(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function sendAllPoliceStationBlips(client) {
|
||||
if(getGameConfig().blipSprites[getServerGame()].policeStation != -1) {
|
||||
if(getGameConfig().blipSprites[getGame()].policeStation != -1) {
|
||||
let tempBlips = [];
|
||||
for(let i in getServerData().policeStations[getServerGame()]) {
|
||||
for(let i in getServerData().policeStations[getGame()]) {
|
||||
tempBlips.push([
|
||||
getGameConfig().blipSprites[getServerGame()].policeStation,
|
||||
getServerData().policeStations[getServerGame()][i].position.x,
|
||||
getServerData().policeStations[getServerGame()][i].position.y,
|
||||
getServerData().policeStations[getServerGame()][i].position.z,
|
||||
getGameConfig().blipSprites[getGame()].policeStation,
|
||||
getServerData().policeStations[getGame()][i].position.x,
|
||||
getServerData().policeStations[getGame()][i].position.y,
|
||||
getServerData().policeStations[getGame()][i].position.z,
|
||||
3,
|
||||
getColourByName("policeBlue"),
|
||||
]);
|
||||
@@ -773,14 +776,14 @@ function sendAllPoliceStationBlips(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function sendAllFireStationBlips(client) {
|
||||
if(getGameConfig().blipSprites[getServerGame()].fireStation != -1) {
|
||||
if(getGameConfig().blipSprites[getGame()].fireStation != -1) {
|
||||
let tempBlips = [];
|
||||
for(let i in getServerData().fireStations[getServerGame()]) {
|
||||
for(let i in getServerData().fireStations[getGame()]) {
|
||||
tempBlips.push([
|
||||
getGameConfig().blipSprites[getServerGame()].fireStation,
|
||||
getServerData().fireStations[getServerGame()][i].position.x,
|
||||
getServerData().fireStations[getServerGame()][i].position.y,
|
||||
getServerData().fireStations[getServerGame()][i].position.z,
|
||||
getGameConfig().blipSprites[getGame()].fireStation,
|
||||
getServerData().fireStations[getGame()][i].position.x,
|
||||
getServerData().fireStations[getGame()][i].position.y,
|
||||
getServerData().fireStations[getGame()][i].position.z,
|
||||
3,
|
||||
getColourByName("firefighterRed"),
|
||||
]);
|
||||
@@ -792,14 +795,14 @@ function sendAllFireStationBlips(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function sendAllHospitalBlips(client) {
|
||||
if(getGameConfig().blipSprites[getServerGame()].hospital != -1) {
|
||||
if(getGameConfig().blipSprites[getGame()].hospital != -1) {
|
||||
let tempBlips = [];
|
||||
for(let i in getServerData().hospitals[getServerGame()]) {
|
||||
for(let i in getServerData().hospitals[getGame()]) {
|
||||
tempBlips.push([
|
||||
getGameConfig().blipSprites[getServerGame()].hospital,
|
||||
getServerData().hospitals[getServerGame()][i].position.x,
|
||||
getServerData().hospitals[getServerGame()][i].position.y,
|
||||
getServerData().hospitals[getServerGame()][i].position.z,
|
||||
getGameConfig().blipSprites[getGame()].hospital,
|
||||
getServerData().hospitals[getGame()][i].position.x,
|
||||
getServerData().hospitals[getGame()][i].position.y,
|
||||
getServerData().hospitals[getGame()][i].position.z,
|
||||
3,
|
||||
getColourByName("medicPink"),
|
||||
]);
|
||||
@@ -811,14 +814,14 @@ function sendAllHospitalBlips(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function sendAllAmmunationBlips(client) {
|
||||
if(getGameConfig().blipSprites[getServerGame()].ammunation != -1) {
|
||||
if(getGameConfig().blipSprites[getGame()].ammunation != -1) {
|
||||
let tempBlips = [];
|
||||
for(let i in getServerData().ammunations[getServerGame()]) {
|
||||
for(let i in getServerData().ammunations[getGame()]) {
|
||||
tempBlips.push([
|
||||
getGameConfig().blipSprites[getServerGame()].ammunation,
|
||||
getServerData().ammunations[getServerGame()][i].position.x,
|
||||
getServerData().ammunations[getServerGame()][i].position.y,
|
||||
getServerData().ammunations[getServerGame()][i].position.z,
|
||||
getGameConfig().blipSprites[getGame()].ammunation,
|
||||
getServerData().ammunations[getGame()][i].position.x,
|
||||
getServerData().ammunations[getGame()][i].position.y,
|
||||
getServerData().ammunations[getGame()][i].position.z,
|
||||
3,
|
||||
0
|
||||
]);
|
||||
@@ -830,14 +833,14 @@ function sendAllAmmunationBlips(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function sendAllPayAndSprayBlips(client) {
|
||||
if(getGameConfig().blipSprites[getServerGame()].payAndSpray != -1) {
|
||||
if(getGameConfig().blipSprites[getGame()].payAndSpray != -1) {
|
||||
let tempBlips = [];
|
||||
for(let i in getServerData().payAndSprays[getServerGame()]) {
|
||||
for(let i in getServerData().payAndSprays[getGame()]) {
|
||||
tempBlips.push([
|
||||
getGameConfig().blipSprites[getServerGame()].payAndSpray,
|
||||
getServerData().payAndSprays[getServerGame()][i].position.x,
|
||||
getServerData().payAndSprays[getServerGame()][i].position.y,
|
||||
getServerData().payAndSprays[getServerGame()][i].position.z,
|
||||
getGameConfig().blipSprites[getGame()].payAndSpray,
|
||||
getServerData().payAndSprays[getGame()][i].position.x,
|
||||
getServerData().payAndSprays[getGame()][i].position.y,
|
||||
getServerData().payAndSprays[getGame()][i].position.z,
|
||||
3,
|
||||
0
|
||||
]);
|
||||
@@ -849,14 +852,14 @@ function sendAllPayAndSprayBlips(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function sendAllFuelStationBlips(client) {
|
||||
if(getGameConfig().blipSprites[getServerGame()].fuelStation != -1) {
|
||||
if(getGameConfig().blipSprites[getGame()].fuelStation != -1) {
|
||||
let tempBlips = [];
|
||||
for(let i in getServerData().fuelStations[getServerGame()]) {
|
||||
for(let i in getServerData().fuelStations[getGame()]) {
|
||||
tempBlips.push([
|
||||
getGameConfig().blipSprites[getServerGame()].fuelStation,
|
||||
getServerData().fuelStations[getServerGame()][i].position.x,
|
||||
getServerData().fuelStations[getServerGame()][i].position.y,
|
||||
getServerData().fuelStations[getServerGame()][i].position.z,
|
||||
getGameConfig().blipSprites[getGame()].fuelStation,
|
||||
getServerData().fuelStations[getGame()][i].position.x,
|
||||
getServerData().fuelStations[getGame()][i].position.y,
|
||||
getServerData().fuelStations[getGame()][i].position.z,
|
||||
3,
|
||||
getColourByName("burntOrange"),
|
||||
]);
|
||||
@@ -868,10 +871,9 @@ function sendAllFuelStationBlips(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function sendPlayerSetHealth(client, health) {
|
||||
sendNetworkEventToPlayer("vrr.health", client, health);
|
||||
sendNetworkEventToPlayer("vrr.health", client, toInteger(health));
|
||||
}
|
||||
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function sendPlayerSetArmour(client, armour) {
|
||||
@@ -899,7 +901,7 @@ function playerFinishedSkinSelection(client, allowedSkinIndex) {
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
getPlayerCurrentSubAccount(client).skin = getSkinIndexFromModel(allowedSkins[allowedSkinIndex][0]);
|
||||
getPlayerCurrentSubAccount(client).skin = getSkinIndexFromModel(getServerData().allowedSkins[allowedSkinIndex][0]);
|
||||
if(isPlayerWorking(client)) {
|
||||
messagePlayerAlert(client, "Your new skin has been saved but won't be shown until you stop working.");
|
||||
setPlayerSkin(client, getJobData(getPlayerCurrentSubAccount(client).job).uniforms[getPlayerData(client).jobUniform].skinId);
|
||||
@@ -926,7 +928,7 @@ function playerFinishedSkinSelection(client, allowedSkinIndex) {
|
||||
switchPlayerActiveHotBarSlot(client, -1);
|
||||
cachePlayerHotBarItems(client);
|
||||
|
||||
meActionToNearbyPlayers(client, `changes their skin to ${allowedSkins[allowedSkinIndex][1]}`);
|
||||
meActionToNearbyPlayers(client, `changes their skin to ${getServerData().allowedSkins[allowedSkinIndex][1]}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1068,7 +1070,7 @@ function setPlayerBuyingVehicleState(client, state, vehicleId, position) {
|
||||
|
||||
function receiveVehiclePurchaseStateUpdateFromClient(client, state) {
|
||||
if(getGlobalConfig().useServerSideVehiclePurchaseCheck == false) {
|
||||
checkVehicleBuying(client);
|
||||
checkVehiclePurchasing(client);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1170,11 +1172,33 @@ function tellPlayerToSpawn(client, skinId, position) {
|
||||
|
||||
// ==========================================================================
|
||||
|
||||
function sendPlayerLocaleStrings(client) {
|
||||
let strings = getGlobalConfig().locale.sendStringsToClient;
|
||||
for(let i in strings) {
|
||||
sendNetworkEventToPlayer("vrr.localeString", client, strings[i], getLocaleString(client, strings[i]));
|
||||
}
|
||||
function sendNameTagDistanceToClient(client, distance) {
|
||||
sendNetworkEventToPlayer("vrr.nameTagDistance", client, distance);
|
||||
}
|
||||
|
||||
// ==========================================================================
|
||||
|
||||
function sendGPSBlipToPlayer(client, position, colour) {
|
||||
sendNetworkEventToPlayer("vrr.showGPSBlip", client, position, colour);
|
||||
}
|
||||
|
||||
// ==========================================================================
|
||||
|
||||
function playerSelectedNewLocale(client, localeId) {
|
||||
getPlayerData(client).locale = localeId;
|
||||
sendPlayerLocaleId(client, localeId);
|
||||
}
|
||||
|
||||
// ==========================================================================
|
||||
|
||||
function sendPlayerLocaleId(client, localeId) {
|
||||
sendNetworkEventToPlayer("vrr.locale", client, localeId);
|
||||
}
|
||||
|
||||
// ==========================================================================
|
||||
|
||||
function showLocaleChooserForPlayer(client) {
|
||||
sendNetworkEventToPlayer("vrr.localeChooser", client);
|
||||
}
|
||||
|
||||
// ==========================================================================
|
||||
@@ -7,15 +7,8 @@
|
||||
// TYPE: Server (JavaScript)
|
||||
// ===========================================================================
|
||||
|
||||
let serverCommands = [];
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function initCommandScript() {
|
||||
logToConsole(LOG_INFO, "[VRR.Command]: Initializing commands script ...");
|
||||
serverCommands = loadCommands();
|
||||
cacheAllCommandsAliases(serverCommands);
|
||||
addAllCommandHandlers();
|
||||
logToConsole(LOG_INFO, "[VRR.Command]: Initialized commands script!");
|
||||
}
|
||||
|
||||
@@ -33,7 +26,6 @@ function loadCommands() {
|
||||
new CommandData("register", registerCommand, "<password>", getStaffFlagValue("None"), false, false, "Creates an account"),
|
||||
new CommandData("changepass", changeAccountPasswordCommand, "<old password> <new password>", getStaffFlagValue("None"), true, false, "Change an account password"),
|
||||
new CommandData("iplogin", toggleAutoLoginByIPCommand, "", getStaffFlagValue("None"), true, false, "Toggle whether to automatically login if you join with the same IP as your last join"),
|
||||
new CommandData("autolastchar", toggleAutoSelectLastCharacterCommand, "", getStaffFlagValue("None"), true, false, "Toggle whether to automatically spawn with the last character you played as"),
|
||||
new CommandData("gui", toggleAccountGUICommand, "", getStaffFlagValue("None"), false, false, "Toggle whether to use GUI. If GUI is disabled on the server, it won't show even if you have GUI enabled."),
|
||||
new CommandData("2fa", toggleAccountTwoFactorAuthCommand, "", getStaffFlagValue("None"), true, false, "Set up and use two-factor authentication."),
|
||||
new CommandData("setemail", setAccountEmailCommand, "<email address>", getStaffFlagValue("None"), true, false, "Sets your email. To reset your password, you must have a valid email set and verified."),
|
||||
@@ -75,8 +67,8 @@ function loadCommands() {
|
||||
//new CommandData("delbizloc", deleteBusinessLocationCommand, "[id]", getStaffFlagValue("ManageBusinesses"), true, false),
|
||||
new CommandData("bizreloadall", reloadAllBusinessesCommand, "", getStaffFlagValue("ManageBusinesses"), true, false, "Reloads all businesses from the database"),
|
||||
|
||||
new CommandData("bizlock", lockUnlockBusinessCommand, "", getStaffFlagValue("None"), true, true, "Locks a business"),
|
||||
new CommandData("bizlights", toggleBusinessInteriorLightsCommand, "", getStaffFlagValue("None"), true, true, "Turns on/off a business's interior lights"),
|
||||
//new CommandData("bizlock", lockUnlockBusinessCommand, "", getStaffFlagValue("None"), true, true, "Locks a business"),
|
||||
//new CommandData("bizlights", toggleBusinessInteriorLightsCommand, "", getStaffFlagValue("None"), true, true, "Turns on/off a business's interior lights"),
|
||||
new CommandData("bizbuy", buyBusinessCommand, "", getStaffFlagValue("None"), true, true, "Purchases a business"),
|
||||
new CommandData("bizfee", setBusinessEntranceFeeCommand, "<amount>", getStaffFlagValue("None"), true, true, "Sets a fee to charge players when they enter the business."),
|
||||
new CommandData("biztill", viewBusinessTillAmountCommand, "", getStaffFlagValue("None"), true, true, "Shows the business's till (cash register) amount"),
|
||||
@@ -131,15 +123,11 @@ function loadCommands() {
|
||||
new CommandData("clans", listClansCommand, "[search text]", getStaffFlagValue("None"), true, true, "List clans (search by partial name, if provided)"),
|
||||
new CommandData("clanranks", listClanRanksCommand, "[clan name]", getStaffFlagValue("None"), true, true, "Shows a list of a clan's ranks"),
|
||||
new CommandData("clanflags", showClanFlagListCommand, "", getStaffFlagValue("None"), true, true, "Shows a list of clan permission flags"),
|
||||
|
||||
new CommandData("addclan", createClanCommand, "<name>", getStaffFlagValue("ManageClans"), true, true, "Creates an new empty, unowned clan."),
|
||||
new CommandData("delclan", deleteClanCommand, "<clan id>", getStaffFlagValue("ManageClans"), true, true, "Deletes a clan by ID or name"),
|
||||
|
||||
new CommandData("clanaddrank", createClanRankCommand, "<rank id> <name>", getStaffFlagValue("None"), true, true, "Adds a clan rank"),
|
||||
new CommandData("clandelrank", deleteClanRankCommand, "<rank name>", getStaffFlagValue("None"), true, true, "Removes a clan rank"),
|
||||
|
||||
new CommandData("clansetrank", setClanMemberRankCommand, "<player name/id> <rank name>", getStaffFlagValue("None"), true, true, "Sets the rank of a clan member"),
|
||||
|
||||
new CommandData("clanowner", setClanOwnerCommand, "<player name/id>", getStaffFlagValue("None"), true, true, "Gives ownership of the clan to a player"),
|
||||
new CommandData("clantag", setClanTagCommand, "<tag>", getStaffFlagValue("None"), true, true, "Sets a clan's main tag"),
|
||||
new CommandData("clanranktag", setClanRankTagCommand, "<rank name/id> <tag>", getStaffFlagValue("None"), true, true, "Sets a clan rank's custom tag"),
|
||||
@@ -181,11 +169,14 @@ function loadCommands() {
|
||||
new CommandData("reloadaccentcfg", reloadAccentConfigurationCommand, "", getStaffFlagValue("Developer"), true, true, "Loads and applies the accent configuration and texts"),
|
||||
|
||||
new CommandData("setbizblips", toggleServerBusinessBlipsCommand, "<0/1 state>", getStaffFlagValue("ManageServer"), true, true, "Toggles all business blips on/off"),
|
||||
new CommandData("setbusinessblips", toggleServerBusinessBlipsCommand, "<0/1 state>", getStaffFlagValue("ManageServer"), true, true, "Toggles all business blips on/off"),
|
||||
new CommandData("sethouseblips", toggleServerHouseBlipsCommand, "<0/1 state>", getStaffFlagValue("ManageServer"), true, true, "Toggles all house blips on/off"),
|
||||
new CommandData("setjobblips", toggleServerJobBlipsCommand, "<0/1 state>", getStaffFlagValue("ManageServer"), true, true, "Toggles all job blips on/off"),
|
||||
new CommandData("setbizpickups", toggleServerBusinessPickupsCommand, "<0/1 state>", getStaffFlagValue("ManageServer"), true, true, "Toggles all business pickups on/off"),
|
||||
new CommandData("setbusinesspickups", toggleServerBusinessPickupsCommand, "<0/1 state>", getStaffFlagValue("ManageServer"), true, true, "Toggles all business pickups on/off"),
|
||||
new CommandData("sethousepickups", toggleServerHousePickupsCommand, "<0/1 state>", getStaffFlagValue("ManageServer"), true, true, "Toggles all house pickups on/off"),
|
||||
new CommandData("setjobpickups", toggleServerJobPickupsCommand, "<0/1 state>", getStaffFlagValue("ManageServer"), true, true, "Toggles all job pickups on/off"),
|
||||
new CommandData("nametagdistance", setServerNameTagDistanceCommand, "<distance>", getStaffFlagValue("ManageServer"), true, true, "Sets the distance at which name tags are displayed"),
|
||||
],
|
||||
core: [],
|
||||
database: [
|
||||
@@ -224,6 +215,20 @@ function loadCommands() {
|
||||
email: [
|
||||
new CommandData("testemail", testEmailCommand, "<email address>", getStaffFlagValue("Developer"), true, true),
|
||||
],
|
||||
gate: [
|
||||
new CommandData("gate", triggerGateCommand, "", getStaffFlagValue("None"), true, true, "Opens/closes the nearest gate"),
|
||||
new CommandData("opengate", triggerGateCommand, "", getStaffFlagValue("None"), true, true, "Opens/closes the nearest gate"),
|
||||
new CommandData("closegate", triggerGateCommand, "", getStaffFlagValue("None"), true, true, "Opens/closes the nearest gate"),
|
||||
new CommandData("housegate", triggerGateCommand, "", getStaffFlagValue("None"), true, true, "Opens/closes the nearest gate"),
|
||||
new CommandData("bizgate", triggerGateCommand, "", getStaffFlagValue("None"), true, true, "Opens/closes the nearest gate"),
|
||||
new CommandData("businessgate", triggerGateCommand, "", getStaffFlagValue("None"), true, true, "Opens/closes the nearest gate"),
|
||||
new CommandData("door", triggerGateCommand, "", getStaffFlagValue("None"), true, true, "Opens/closes the nearest gate"),
|
||||
new CommandData("opengate", triggerGateCommand, "", getStaffFlagValue("None"), true, true, "Opens/closes the nearest gate"),
|
||||
new CommandData("closegate", triggerGateCommand, "", getStaffFlagValue("None"), true, true, "Opens/closes the nearest gate"),
|
||||
new CommandData("opendoor", triggerGateCommand, "", getStaffFlagValue("None"), true, true, "Opens/closes the nearest gate"),
|
||||
new CommandData("closedoor", triggerGateCommand, "", getStaffFlagValue("None"), true, true, "Opens/closes the nearest gate"),
|
||||
new CommandData("garagedoor", triggerGateCommand, "", getStaffFlagValue("None"), true, true, "Opens/closes the nearest gate"),
|
||||
],
|
||||
help: [
|
||||
new CommandData("help", helpCommand, "", getStaffFlagValue("None"), false, false, "Shows help messages for information"),
|
||||
new CommandData("commands", helpCommand, "", getStaffFlagValue("None"), false, false, "Shows help messages for information"),
|
||||
@@ -250,8 +255,9 @@ function loadCommands() {
|
||||
new CommandData("housebuy", buyHouseCommand, "", getStaffFlagValue("None"), true, false, "Purchases a house"),
|
||||
new CommandData("houseclan", setHouseClanCommand, "", getStaffFlagValue("None"), true, false, "Gives a house to your clan"),
|
||||
new CommandData("housedesc", setHouseDescriptionCommand, "", getStaffFlagValue("ManageHouses"), true, false, "Sets a house's description"),
|
||||
new CommandData("houselock", lockUnlockHouseCommand, "", getStaffFlagValue("None"), true, false, "Locks/unlocks a house door"),
|
||||
new CommandData("houselights", toggleHouseInteriorLightsCommand, "", getStaffFlagValue("None"), true, false, "Turns on and off the lights inside a house"),
|
||||
//new CommandData("houselock", lockUnlockHouseCommand, "", getStaffFlagValue("None"), true, false, "Locks/unlocks a house door"),
|
||||
//new CommandData("houselights", toggleHouseInteriorLightsCommand, "", getStaffFlagValue("None"), true, false, "Turns on and off the lights inside a house"),
|
||||
new CommandData("housedelowner", removeHouseOwnerCommand, "", getStaffFlagValue("ManageHouse"), true, true, "Removes the owner of a house, making the house unowned"),
|
||||
new CommandData("houseowner", setHouseOwnerCommand, "", getStaffFlagValue("None"), true, false, "Gives a house to a player"),
|
||||
new CommandData("housebuyprice", setHouseBuyPriceCommand, "", getStaffFlagValue("None"), true, false, "Sets the purchase price of a house so people can buy it"),
|
||||
new CommandData("houserentprice", setHouseRentPriceCommand, "", getStaffFlagValue("None"), true, false, "Sets the rent price of a house so people can rent it"),
|
||||
@@ -279,6 +285,8 @@ function loadCommands() {
|
||||
new CommandData("houseitems", listHouseInventoryCommand, "", getStaffFlagValue("None"), true, false, "Shows the items in the house's storage"),
|
||||
new CommandData("bizstorage", listBusinessStorageInventoryCommand, "", getStaffFlagValue("None"), true, false, "Shows the items in the business's extra storage (not buyable)"),
|
||||
new CommandData("bizfloor", listBusinessFloorInventoryCommand, "", getStaffFlagValue("None"), true, false, "Shows the items that can be bought from the business"),
|
||||
new CommandData("businessstorage", listBusinessStorageInventoryCommand, "", getStaffFlagValue("None"), true, false, "Shows the items in the business's extra storage (not buyable)"),
|
||||
new CommandData("businessfloor", listBusinessFloorInventoryCommand, "", getStaffFlagValue("None"), true, false, "Shows the items that can be bought from the business"),
|
||||
new CommandData("buylist", listBusinessFloorInventoryCommand, "", getStaffFlagValue("None"), true, false, "Shows the items that can be bought from the business"),
|
||||
|
||||
new CommandData("power", toggleItemEnabledCommand, "", getStaffFlagValue("None"), true, false, "Turns on or off an item"),
|
||||
@@ -308,6 +316,10 @@ function loadCommands() {
|
||||
new CommandData("uniform", jobUniformCommand, "[uniform]", getStaffFlagValue("None"), true, false, "Use a job uniform"),
|
||||
new CommandData("equip", jobEquipmentCommand, "[equipment]", getStaffFlagValue("None"), true, false, "Get equipment for your job"),
|
||||
|
||||
new CommandData("jobs", jobListCommand, "", getStaffFlagValue("None"), true, false, "Shows a list of all jobs"),
|
||||
new CommandData("joblist", jobListCommand, "", getStaffFlagValue("None"), true, false, "Shows a list of all jobs"),
|
||||
new CommandData("alljobs", jobListCommand, "", getStaffFlagValue("None"), true, false, "Shows a list of all jobs"),
|
||||
|
||||
// Emergency Services (Police, Fire, EMS, etc)
|
||||
new CommandData("department", jobDepartmentRadioCommand, "", getStaffFlagValue("None"), true, false, "Communicate with all emergency services (radio must be on and able to transmit)"),
|
||||
new CommandData("d", jobDepartmentRadioCommand, "", getStaffFlagValue("None"), true, false, "Communicate with all emergency services (radio must be on and able to transmit)"),
|
||||
@@ -327,11 +339,18 @@ function loadCommands() {
|
||||
// Admin Job Stuff
|
||||
new CommandData("addjob", createJobCommand, "<name>", getStaffFlagValue("ManageJobs"), true, false),
|
||||
new CommandData("addjobloc", createJobLocationCommand, "<job name/id>", getStaffFlagValue("ManageJobs"), true, false),
|
||||
new CommandData("addjoblocation", createJobLocationCommand, "<job name/id>", getStaffFlagValue("ManageJobs"), true, false),
|
||||
new CommandData("addjobuniform", createJobUniformCommand, "<job name/id> <skin name/id>", getStaffFlagValue("ManageJobs"), true, false),
|
||||
new CommandData("deljobloc", deleteJobLocationCommand, "", getStaffFlagValue("ManageJobs"), true, false),
|
||||
new CommandData("deljoblocation", deleteJobLocationCommand, "", getStaffFlagValue("ManageJobs"), true, false),
|
||||
new CommandData("deljobuniform", deleteJobUniformCommand, "<job name/id> <skin name/id>", getStaffFlagValue("ManageJobs"), true, false),
|
||||
new CommandData("addjobroute", createJobRouteCommand, "<name>", getStaffFlagValue("ManageJobs"), true, false),
|
||||
new CommandData("addjobrouteloc", createJobRouteLocationCommand, "<name>", getStaffFlagValue("ManageJobs"), true, false),
|
||||
new CommandData("addjobroutelocation", createJobRouteLocationCommand, "<name>", getStaffFlagValue("ManageJobs"), true, false),
|
||||
new CommandData("deljobroute", deleteJobRouteCommand, "", getStaffFlagValue("ManageJobs"), true, false),
|
||||
new CommandData("deljobrouteloc", deleteJobRouteLocationCommand, "", getStaffFlagValue("ManageJobs"), true, false),
|
||||
new CommandData("deljobroutelocation", deleteJobRouteLocationCommand, "", getStaffFlagValue("ManageJobs"), true, false),
|
||||
new CommandData("jobroutelocpos", setJobRouteLocationPositionCommand, "", getStaffFlagValue("ManageJobs"), true, false),
|
||||
new CommandData("jobroutename", setJobRouteNameCommand, "<name>", getStaffFlagValue("ManageJobs"), true, false),
|
||||
new CommandData("jobroutepay", setJobRoutePayCommand, "<amount>", getStaffFlagValue("ManageJobs"), true, false),
|
||||
new CommandData("jobroutestartmsg", setJobRouteStartMessageCommand, "<new message>", getStaffFlagValue("ManageJobs"), true, false),
|
||||
@@ -341,7 +360,6 @@ function loadCommands() {
|
||||
new CommandData("jobrouteenabled", toggleJobRouteEnabledCommand, "", getStaffFlagValue("ManageJobs"), true, false),
|
||||
new CommandData("jobroutevehcolours", setJobRouteVehicleColoursCommand, "<colour 1> <colour 2>", getStaffFlagValue("ManageJobs"), true, false),
|
||||
new CommandData("jobroutedelays", setJobRouteAllLocationDelaysCommand, "<time in milliseconds>", getStaffFlagValue("ManageJobs"), true, false),
|
||||
|
||||
new CommandData("jobcolour", setJobColourCommand, "<job id/name> <red> <green> <blue>", getStaffFlagValue("ManageJobs"), true, false),
|
||||
new CommandData("jobblip", setJobBlipCommand, "<job id/name> <blip id/name>", getStaffFlagValue("ManageJobs"), true, false),
|
||||
new CommandData("jobpickup", setJobPickupCommand, "<job id/name> <pickup id/name>", getStaffFlagValue("ManageJobs"), true, false),
|
||||
@@ -354,8 +372,11 @@ function loadCommands() {
|
||||
new CommandData("jobaddplayerbl", addPlayerToJobBlackListCommand, "<player name/id> [job id]", getStaffFlagValue("ManageJobs"), true, false),
|
||||
new CommandData("jobdelplayerbl", removePlayerFromJobBlackListCommand, "<player name/id> [job id]", getStaffFlagValue("ManageJobs"), true, false),
|
||||
new CommandData("jobdelplayerbl", removePlayerFromJobWhiteListCommand, "<player name/id> [job id]", getStaffFlagValue("ManageJobs"), true, false),
|
||||
new CommandData("jobaddplrwl", addPlayerToJobWhiteListCommand, "<player name/id> [job id]", getStaffFlagValue("ManageJobs"), true, false),
|
||||
new CommandData("jobaddplayerbl", addPlayerToJobBlackListCommand, "<player name/id> [job id]", getStaffFlagValue("ManageJobs"), true, false),
|
||||
new CommandData("jobdelplayerbl", removePlayerFromJobBlackListCommand, "<player name/id> [job id]", getStaffFlagValue("ManageJobs"), true, false),
|
||||
new CommandData("jobdelplrbl", removePlayerFromJobWhiteListCommand, "<player name/id> [job id]", getStaffFlagValue("ManageJobs"), true, false),
|
||||
new CommandData("jobreloadall", reloadAllJobsCommand, "", getStaffFlagValue("ManageJobs"), true, false),
|
||||
|
||||
new CommandData("jobinfo", getJobInfoCommand, "", getStaffFlagValue("None"), true, true, "Get info for nearest or specified job"),
|
||||
new CommandData("joblocinfo", getJobLocationInfoCommand, "", getStaffFlagValue("None"), true, true, "Get info for nearest or specified job location"),
|
||||
],
|
||||
@@ -384,6 +405,8 @@ function loadCommands() {
|
||||
new CommandData("stuck", stuckPlayerCommand, "", getStaffFlagValue("None"), true, false, "Fixes your position and virtual world if bugged"),
|
||||
new CommandData("gps", gpsCommand, "[item or place name]", getStaffFlagValue("None"), true, false, "Shows you locations for special places or where to buy items"),
|
||||
new CommandData("speak", playerPedSpeakCommand, "<speech name>", getStaffFlagValue("None"), true, false, "Makes your ped say something in their game voice (IV only)"),
|
||||
new CommandData("lock", lockCommand, "", getStaffFlagValue("None"), true, false, "Locks and unlocks your vehicle, house, or business"),
|
||||
new CommandData("lights", lightsCommand, "", getStaffFlagValue("None"), true, false, "Turns on and off the lights for your vehicle, house, or business"),
|
||||
],
|
||||
npc: [
|
||||
new CommandData("addnpc", createNPCCommand, "<skin id/name>", getStaffFlagValue("ManageNPCs"), true, false, "Creates an NPC with the specified skin"),
|
||||
@@ -394,16 +417,17 @@ function loadCommands() {
|
||||
//new CommandData("npcrespawn", respawnNPCCommand, "", getStaffFlagValue("ManageNPCs"), true, false, "Respawns the nearest NPC"),
|
||||
],
|
||||
race: [
|
||||
new CommandData("addrace", createRaceCommand, "<name>", getStaffFlagValue("ManageRaces"), true, false, "Creates a race"),
|
||||
new CommandData("delrace", deleteRaceCommand, "", getStaffFlagValue("ManageRaces"), true, false, "Deletes a race by name"),
|
||||
new CommandData("addracecp", createRaceCheckPointCommand, "<name>", getStaffFlagValue("ManageRaces"), true, false, "Creates a race checkpoint"),
|
||||
new CommandData("addracestart", createRaceStartPositionCommand, "<name>", getStaffFlagValue("ManageRaces"), true, false, "Creates a starting position for a race"),
|
||||
new CommandData("delracestart", deleteRaceStartPositionCommand, "", getStaffFlagValue("ManageRaces"), true, false, "Deletes the closest starting position for a race"),
|
||||
new CommandData("delracecp", deleteRaceCheckPointCommand, "", getStaffFlagValue("ManageRaces"), true, false, "Deletes the closest race checkpoint"),
|
||||
new CommandData("racename", setRaceNameCommand, "<name>", getStaffFlagValue("ManageRaces"), true, false, "Sets a race's name"),
|
||||
new CommandData("startrace", startRaceCommand, "", getStaffFlagValue("None"), true, false, "Starts a race"),
|
||||
new CommandData("stoprace", stopRaceCommand, "", getStaffFlagValue("None"), true, false, "Stops racing (forfeits if in an active race)"),
|
||||
new CommandData("stopAllRacesCommand", stopAllRacesCommand, "", getStaffFlagValue("ManageRaces"), true, false, "Stops a race"),
|
||||
// Unfinished!
|
||||
//new CommandData("addrace", createRaceCommand, "<name>", getStaffFlagValue("ManageRaces"), true, false, "Creates a race"),
|
||||
//new CommandData("delrace", deleteRaceCommand, "", getStaffFlagValue("ManageRaces"), true, false, "Deletes a race by name"),
|
||||
//new CommandData("addracecp", createRaceCheckPointCommand, "<name>", getStaffFlagValue("ManageRaces"), true, false, "Creates a race checkpoint"),
|
||||
//new CommandData("addracestart", createRaceStartPositionCommand, "<name>", getStaffFlagValue("ManageRaces"), true, false, "Creates a starting position for a race"),
|
||||
//new CommandData("delracestart", deleteRaceStartPositionCommand, "", getStaffFlagValue("ManageRaces"), true, false, "Deletes the closest starting position for a race"),
|
||||
//new CommandData("delracecp", deleteRaceCheckPointCommand, "", getStaffFlagValue("ManageRaces"), true, false, "Deletes the closest race checkpoint"),
|
||||
//new CommandData("racename", setRaceNameCommand, "<name>", getStaffFlagValue("ManageRaces"), true, false, "Sets a race's name"),
|
||||
//new CommandData("startrace", startRaceCommand, "", getStaffFlagValue("None"), true, false, "Starts a race"),
|
||||
//new CommandData("stoprace", stopRaceCommand, "", getStaffFlagValue("None"), true, false, "Stops racing (forfeits if in an active race)"),
|
||||
//new CommandData("stopAllRacesCommand", stopAllRacesCommand, "", getStaffFlagValue("ManageRaces"), true, false, "Stops a race"),
|
||||
],
|
||||
radio: [
|
||||
new CommandData("radiostation", playStreamingRadioCommand, "<radio station id>", getStaffFlagValue("None"), true, false, "Plays a radio station in your vehicle, house, or business (depending on which one you're in)"),
|
||||
@@ -423,9 +447,12 @@ function loadCommands() {
|
||||
new CommandData("getveh", getVehicleCommand, "<vehicle id>", getStaffFlagValue("BasicModeration"), true, true, "Teleports a vehicle to you."),
|
||||
new CommandData("warpinveh", warpIntoVehicleCommand, "[vehicle id]", getStaffFlagValue("ManageVehicles"), true, false),
|
||||
new CommandData("returnplr", returnPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Returns a player to their previous position."),
|
||||
new CommandData("returnplayer", returnPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Returns a player to their previous position."),
|
||||
new CommandData("gotopos", gotoPositionCommand, "<x> <y> <z> [int] [vw]", getStaffFlagValue("BasicModeration"), true, true, "Teleports you to specific coordinates with optional interior and dimension."),
|
||||
new CommandData("gotoveh", gotoVehicleCommand, "<vehicle id>", getStaffFlagValue("BasicModeration"), true, true, "Teleports you to a vehicle by ID."),
|
||||
new CommandData("gotovehicle", gotoVehicleCommand, "<vehicle id>", getStaffFlagValue("BasicModeration"), true, true, "Teleports you to a vehicle by ID."),
|
||||
new CommandData("gotobiz", gotoBusinessCommand, "<business id/name>", getStaffFlagValue("BasicModeration"), true, true, "Teleports you to a business by ID or name."),
|
||||
new CommandData("gotobusiness", gotoBusinessCommand, "<business id/name>", getStaffFlagValue("BasicModeration"), true, true, "Teleports you to a business by ID or name."),
|
||||
new CommandData("gotohouse", gotoHouseCommand, "<house id/name>", getStaffFlagValue("BasicModeration"), true, true, "Teleports you to a house by ID or description."),
|
||||
new CommandData("gotojob", gotoJobLocationCommand, "<job id/name> <location id>", getStaffFlagValue("BasicModeration"), true, true, "Teleports you to a job location by name and location ID."),
|
||||
new CommandData("gotoloc", gotoGameLocationCommand, "<location name>", getStaffFlagValue("BasicModeration"), true, true, "Teleports you to a game location by name."),
|
||||
@@ -443,6 +470,7 @@ function loadCommands() {
|
||||
new CommandData("getstaffflags", getPlayerStaffFlagsCommand, "<player name/id>", getStaffFlagValue("ManageAdmins"), true, true, "Shows a list of all staff flags a player has (this server only)."),
|
||||
new CommandData("clearstaffflags", removePlayerStaffFlagsCommand, "<player name/id>", getStaffFlagValue("ManageAdmins"), true, true, "Removes all staff flags for a player (this server only)."),
|
||||
new CommandData("staffflags", getStaffFlagsCommand, "", getStaffFlagValue("ManageAdmins"), true, true, "Shows a list of all valid staff flag names."),
|
||||
new CommandData("stafftitle", setPlayerStaffTitleCommand, "", getStaffFlagValue("ManageAdmins"), true, true, "Sets a player's staff title."),
|
||||
new CommandData("givemoney", givePlayerMoneyCommand, "<player name/id> <amount>", getStaffFlagValue("serverManager"), true, true),
|
||||
new CommandData("nonrpname", forceCharacterNameChangeCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Forces a player to change their current character's name."),
|
||||
new CommandData("setname", setCharacterNameCommand, "<player name/id> <first name> <last name>", getStaffFlagValue("BasicModeration"), true, true, "Changes a character's name directly."),
|
||||
@@ -451,21 +479,33 @@ function loadCommands() {
|
||||
//new CommandData("setfightstyle", setPlayerFightStyleCommand, "<player name/id> <fight style name>", getStaffFlagValue("BasicModeration"), true, true, "Changes a character's fight style."),
|
||||
new CommandData("setstars", setPlayerWantedLevelCommand, "<player name/id> <wanted level>", getStaffFlagValue("BasicModeration"), true, true, "Forces a player to have a wanted level"),
|
||||
new CommandData("plrinfo", getPlayerInfoCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Shows basic info about the specified player"),
|
||||
new CommandData("getplrhouse", getHousesOwnedByPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Shows a list of all houses owned by the player"),
|
||||
new CommandData("getplrbiz", getBusinessesOwnedByPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Shows a list of all businesses owned by the player"),
|
||||
new CommandData("getplrveh", getVehiclesOwnedByPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Shows a list of all vehicles owned by the player"),
|
||||
new CommandData("playerinfo", getPlayerInfoCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Shows basic info about the specified player"),
|
||||
new CommandData("getplrhouses", getHousesOwnedByPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Shows a list of all houses owned by the player"),
|
||||
new CommandData("getplrbizs", getBusinessesOwnedByPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Shows a list of all businesses owned by the player"),
|
||||
new CommandData("getplrbusinesses", getBusinessesOwnedByPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Shows a list of all businesses owned by the player"),
|
||||
new CommandData("getplrvehs", getVehiclesOwnedByPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Shows a list of all vehicles owned by the player"),
|
||||
new CommandData("getplrvehicles", getVehiclesOwnedByPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Shows a list of all vehicles owned by the player"),
|
||||
new CommandData("getplayerhouses", getHousesOwnedByPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Shows a list of all houses owned by the player"),
|
||||
new CommandData("getplayerbizs", getBusinessesOwnedByPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Shows a list of all businesses owned by the player"),
|
||||
new CommandData("getplayerbusinesses", getBusinessesOwnedByPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Shows a list of all businesses owned by the player"),
|
||||
new CommandData("getplayervehs", getVehiclesOwnedByPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Shows a list of all vehicles owned by the player"),
|
||||
new CommandData("getplayervehicles", getVehiclesOwnedByPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Shows a list of all vehicles owned by the player"),
|
||||
new CommandData("geoip", getPlayerGeoIPInformationCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Retrieves GeoIP information on a player (country & city)"),
|
||||
new CommandData("ip", getPlayerIPInformationCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Retrieves IP information on a player"),
|
||||
new CommandData("plrsync", toggleSyncForElementsSpawnedByPlayerCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Sets whether elements spawned by a player are synced (traffic, peds, etc)"),
|
||||
new CommandData("health", setPlayerHealthCommand, "<player name/id> <health", getStaffFlagValue("BasicModeration"), true, true, "Sets a player's health"),
|
||||
new CommandData("armour", setPlayerArmourCommand, "<player name/id> <armour>", getStaffFlagValue("BasicModeration"), true, true, "Sets a player's armour"),
|
||||
new CommandData("infiniterun", setPlayerInfiniteRunCommand, "<player name/id> <state>", getStaffFlagValue("BasicModeration"), true, true, "Toggles a player's infinite sprint"),
|
||||
new CommandData("atbiz", getPlayerCurrentBusinessCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Gets which business a player is at/in"),
|
||||
new CommandData("atbusiness", getPlayerCurrentBusinessCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Gets which business a player is at/in"),
|
||||
new CommandData("athouse", getPlayerCurrentHouseCommand, "<player name/id>", getStaffFlagValue("BasicModeration"), true, true, "Gets which house a player is at/in"),
|
||||
],
|
||||
startup: [],
|
||||
subAccount: [
|
||||
new CommandData("switchchar", switchCharacterCommand, "", getStaffFlagValue("None"), true, false),
|
||||
new CommandData("newchar", newCharacterCommand, "<first name> <last name>", getStaffFlagValue("None"), true, false),
|
||||
new CommandData("usechar", useCharacterCommand, "<character id>", getStaffFlagValue("None"), true, false),
|
||||
new CommandData("autolastchar", toggleAutoSelectLastCharacterCommand, "", getStaffFlagValue("None"), true, false, "Toggle whether to automatically spawn with the last character you played as"),
|
||||
],
|
||||
translate: [],
|
||||
trigger: [
|
||||
@@ -492,11 +532,9 @@ function loadCommands() {
|
||||
new CommandData("oldcar", getLastVehicleInfoCommand, "", getStaffFlagValue("None"), true, false),
|
||||
new CommandData("lastcar", getLastVehicleInfoCommand, "", getStaffFlagValue("None"), true, false),
|
||||
|
||||
new CommandData("lock", vehicleLockCommand, "", getStaffFlagValue("None"), true, false),
|
||||
new CommandData("unlock", vehicleLockCommand, "", getStaffFlagValue("None"), true, false),
|
||||
//new CommandData("unlock", vehicleLockCommand, "", getStaffFlagValue("None"), true, false),
|
||||
new CommandData("engine", vehicleEngineCommand, "", getStaffFlagValue("None"), true, false),
|
||||
new CommandData("siren", vehicleSirenCommand, "", getStaffFlagValue("None"), true, false),
|
||||
new CommandData("lights", vehicleLightsCommand, "", getStaffFlagValue("None"), true, false),
|
||||
|
||||
new CommandData("vehowner", setVehicleOwnerCommand, "<player id/name>", getStaffFlagValue("ManageVehicles"), true, true),
|
||||
new CommandData("vehpublic", setVehiclePublicCommand, "", getStaffFlagValue("ManageVehicles"), true, true),
|
||||
@@ -547,10 +585,11 @@ function loadCommands() {
|
||||
|
||||
function addAllCommandHandlers() {
|
||||
let commandCount = 0;
|
||||
for(let i in serverCommands) {
|
||||
for(let j in serverCommands[i]) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Command] Adding command handler for ${i} - ${serverCommands[i][j].command}`);
|
||||
addCommandHandler(serverCommands[i][j].command, processPlayerCommand);
|
||||
let commands = getCommands();
|
||||
for(let i in commands) {
|
||||
for(let j in commands[i]) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Command] Adding command handler for ${i} - ${commands[i][j].command}`);
|
||||
addCommandHandler(commands[i][j].command, processPlayerCommand);
|
||||
commandCount++;
|
||||
}
|
||||
}
|
||||
@@ -583,7 +622,7 @@ function getCommandData(command) {
|
||||
// ===========================================================================
|
||||
|
||||
function getCommands() {
|
||||
return serverCommands;
|
||||
return getServerData().commands;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -723,43 +762,44 @@ function processPlayerCommand(command, params, client) {
|
||||
}
|
||||
|
||||
if(!doesCommandExist(toLowerCase(command))) {
|
||||
console.warn(`[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (invalid command): /${command} ${paramsDisplay}`);
|
||||
logToConsole(LOG_WARN, `[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (invalid command): /${command} ${paramsDisplay}`);
|
||||
|
||||
let possibleCommand = getCommandFromParams(command);
|
||||
if(possibleCommand != false && doesPlayerHaveStaffPermission(client, getCommandRequiredPermissions(toLowerCase(possibleCommand.command)))) {
|
||||
messagePlayerError(client, `The command {ALTCOLOUR}/${command} {MAINCOLOUR}does not exist! Did you mean {ALTCOLOUR}/${possibleCommand.command} ?`);
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidCommandPossibleMatchTip", `{ALTCOLOUR}/${command}{MAINCOLOUR}`, `{ALTCOLOUR}${toLowerCase(possibleCommand.command)}{MAINCOLOUR}`));
|
||||
} else {
|
||||
messagePlayerError(client, `The command {ALTCOLOUR}/${command} {MAINCOLOUR}does not exist! Use /help for commands and information.`);
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidCommandHelpTip", `{ALTCOLOUR}/${command}{MAINCOLOUR}`, `{ALTCOLOUR}/help{MAINCOLOUR}`));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!commandData.enabled) {
|
||||
console.warn(`[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (command is disabled): /${command} ${paramsDisplay}`);
|
||||
messagePlayerError(client, `The command {ALTCOLOUR}/${command} {MAINCOLOUR}is disabled!`);
|
||||
logToConsole(LOG_WARN, `[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (command is disabled): /${command} ${paramsDisplay}`);
|
||||
messagePlayerError(client, `The command {ALTCOLOUR}/${command}{MAINCOLOUR} is disabled!`);
|
||||
messagePlayerError(client, getLocaleString(client, "CommandDisabled", `{ALTCOLOUR}/${command}{MAINCOLOUR}`));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(doesCommandRequireLogin(toLowerCase(command))) {
|
||||
if(!isPlayerLoggedIn(client)) {
|
||||
console.warn(`[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (requires login first): /${command} ${paramsDisplay}`);
|
||||
messagePlayerError(client, `You must be logged in to use the {ALTCOLOUR}/${command} {MAINCOLOUR}command!`);
|
||||
logToConsole(LOG_WARN, `[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (requires login first): /${command} ${paramsDisplay}`);
|
||||
messagePlayerError(client, getLocaleString(client, "CommandRequiresLogin", `{ALTCOLOUR}/${command}{MAINCOLOUR}`));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//if(isClientFromDiscord(client)) {
|
||||
// if(!isCommandAllowedOnDiscord(command)) {
|
||||
// console.warn(`[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command from discord, but failed (not available on discord): /${command} ${paramsDisplay}`);
|
||||
// messagePlayerError(client, `The {ALTCOLOUR}/${command} {MAINCOLOUR} command isn't available on discord!`);
|
||||
// return false;
|
||||
// }
|
||||
//}
|
||||
if(isClientFromDiscord(client)) {
|
||||
if(!isCommandAllowedOnDiscord(command)) {
|
||||
logToConsole(LOG_WARN, `[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command from discord, but failed (not available on discord): /${command} ${paramsDisplay}`);
|
||||
messagePlayerError(client, `The {ALTCOLOUR}/${command}{MAINCOLOUR} command isn't available on discord!`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(!client.console) {
|
||||
if(!isConsole(client)) {
|
||||
if(!doesPlayerHaveStaffPermission(client, getCommandRequiredPermissions(toLowerCase(command)))) {
|
||||
console.warn(`[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (no permission): /${command} ${paramsDisplay}`);
|
||||
messagePlayerError(client, `You do not have permission to use the {ALTCOLOUR}/${toLowerCase(command)} {MAINCOLOUR}command!`);
|
||||
logToConsole(LOG_WARN, `[VRR.Command] ${getPlayerDisplayForConsole(client)} attempted to use command, but failed (no permission): /${command} ${paramsDisplay}`);
|
||||
messagePlayerError(client, "CommandNoPermissions", `{ALTCOLOUR}/${toLowerCase(command)}{MAINCOLOUR}`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -785,9 +825,10 @@ addCommandHandler("cmd", function(command, params, client) {
|
||||
// ===========================================================================
|
||||
|
||||
function listAllCommands() {
|
||||
for(let i in serverCommands) {
|
||||
for(let j in serverCommands[i]) {
|
||||
logToConsole(LOG_DEBUG, serverCommands[i][j].command);
|
||||
let commands = getCommands();
|
||||
for(let i in commands) {
|
||||
for(let j in commands[i]) {
|
||||
logToConsole(LOG_DEBUG, commands[i][j].command);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -796,9 +837,10 @@ function listAllCommands() {
|
||||
|
||||
function getAllCommandsInSingleArray() {
|
||||
let tempCommands = [];
|
||||
for(let i in serverCommands) {
|
||||
for(let j in serverCommands[i]) {
|
||||
tempCommands.push(serverCommands[i][j].command);
|
||||
let commands = getCommands();
|
||||
for(let i in commands) {
|
||||
for(let j in commands[i]) {
|
||||
tempCommands.push(commands[i][j].command);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -809,9 +851,10 @@ function getAllCommandsInSingleArray() {
|
||||
|
||||
function getAllCommandsInGroupInSingleArray(groupName, staffFlag = "None") {
|
||||
let tempCommands = [];
|
||||
for(let i in serverCommands[groupName]) {
|
||||
if(getCommandRequiredPermissions(serverCommands[groupName][i].command) == 0) {
|
||||
tempCommands.push(serverCommands[groupName][i].command);
|
||||
let commands = getCommands();
|
||||
for(let i in commands[groupName]) {
|
||||
if(getCommandRequiredPermissions(commands[groupName][i].command) == 0) {
|
||||
tempCommands.push(commands[groupName][i].command);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -822,11 +865,12 @@ function getAllCommandsInGroupInSingleArray(groupName, staffFlag = "None") {
|
||||
|
||||
function getAllCommandsForStaffFlagInSingleArray(staffFlagName) {
|
||||
let tempCommands = [];
|
||||
for(let i in serverCommands) {
|
||||
for(let j in serverCommands[i]) {
|
||||
if(getCommandRequiredPermissions(serverCommands[i][j].command) != 0) {
|
||||
if(hasBitFlag(getCommandRequiredPermissions(serverCommands[i][j].command), getStaffFlagValue(staffFlagName))) {
|
||||
tempCommands.push(serverCommands[i][j].command);
|
||||
let commands = getCommands();
|
||||
for(let i in commands) {
|
||||
for(let j in commands[i]) {
|
||||
if(getCommandRequiredPermissions(commands[i][j].command) != 0) {
|
||||
if(hasBitFlag(getCommandRequiredPermissions(commands[i][j].command), getStaffFlagValue(staffFlagName))) {
|
||||
tempCommands.push(commands[i][j].command);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -848,13 +892,14 @@ function doesCommandExist(command) {
|
||||
// ===========================================================================
|
||||
|
||||
function cacheAllCommandsAliases() {
|
||||
for(let i in serverCommands) {
|
||||
for(let j in serverCommands[i]) {
|
||||
for(let k in serverCommands) {
|
||||
for(let m in serverCommands[k]) {
|
||||
if(serverCommands[i][j].handlerFunction == serverCommands[k][m].handlerFunction) {
|
||||
serverCommands[i][j].aliases.push(serverCommands[k][m]);
|
||||
serverCommands[k][m].aliases.push(serverCommands[i][j]);
|
||||
let commands = getCommands();
|
||||
for(let i in commands) {
|
||||
for(let j in commands[i]) {
|
||||
for(let k in commands) {
|
||||
for(let m in commands[k]) {
|
||||
if(commands[i][j].handlerFunction == commands[k][m].handlerFunction) {
|
||||
commands[i][j].aliases.push(commands[k][m]);
|
||||
commands[k][m].aliases.push(commands[i][j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -904,10 +949,11 @@ function getParam(params, delimiter, index) {
|
||||
// ===========================================================================
|
||||
|
||||
function getCommandFromParams(params) {
|
||||
for(let i in serverCommands) {
|
||||
for(let j in serverCommands[i]) {
|
||||
if(toLowerCase(serverCommands[i][j].command).indexOf(toLowerCase(params)) != -1) {
|
||||
return serverCommands[i][j];
|
||||
let commands = getCommands();
|
||||
for(let i in commands) {
|
||||
for(let j in commands[i]) {
|
||||
if(toLowerCase(commands[i][j].command).indexOf(toLowerCase(params)) != -1) {
|
||||
return commands[i][j];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
// ===========================================================================
|
||||
|
||||
let serverConfig = false;
|
||||
let databaseConfig = false;
|
||||
let emailConfig = false;
|
||||
let gameConfig = false;
|
||||
|
||||
// ===========================================================================
|
||||
@@ -17,6 +15,11 @@ let gameConfig = false;
|
||||
let globalConfig = {
|
||||
keyBind: [],
|
||||
economy: {},
|
||||
database: {},
|
||||
locale: {},
|
||||
accents: {},
|
||||
discord: {},
|
||||
email: {},
|
||||
accountPasswordHash: "SHA512",
|
||||
npcFarProximity: 100,
|
||||
npcMediumProximity: 40,
|
||||
@@ -69,68 +72,97 @@ let globalConfig = {
|
||||
vehicleInactiveRespawnDelay: 1800000, // 20 minutes
|
||||
chatSectionHeaderLength: 96,
|
||||
useServerSideVehiclePurchaseCheck: true,
|
||||
useServerSideVehicleBurnCheck: false,
|
||||
businessPickupStreamInDistance: 100,
|
||||
businessPickupStreamOutDistance: 120,
|
||||
housePickupStreamInDistance: 100,
|
||||
housePickupStreamOutDistance: 120,
|
||||
jobPickupStreamInDistance: 100,
|
||||
jobPickupStreamOutDistance: 120,
|
||||
businessBlipStreamInDistance: 200,
|
||||
businessBlipStreamOutDistance: 220,
|
||||
houseBlipStreamInDistance: 200,
|
||||
houseBlipStreamOutDistance: 220,
|
||||
jobBlipStreamInDistance: 200,
|
||||
jobBlipStreamOutDistance: 220,
|
||||
businessBlipStreamInDistance: 150,
|
||||
businessBlipStreamOutDistance: 200,
|
||||
houseBlipStreamInDistance: 100,
|
||||
houseBlipStreamOutDistance: 120,
|
||||
jobBlipStreamInDistance: -1,
|
||||
jobBlipStreamOutDistance: -1,
|
||||
handcuffPlayerDistance: 3,
|
||||
firstAidKitPlayerDistance: 3,
|
||||
passwordRequiredCapitals: 0,
|
||||
passwordRequiredNumbers: 0,
|
||||
passwordRequiredSymbols: 0,
|
||||
minChatLines: 1,
|
||||
maxChatLines: 6,
|
||||
};
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function initConfigScript() {
|
||||
logToConsole(LOG_INFO, "[VRR.Config]: Initializing config script ...");
|
||||
logToConsole(LOG_DEBUG, "[VRR.Config]: Loading global config ...");
|
||||
loadGlobalConfig();
|
||||
|
||||
logToConsole(LOG_INFO, "[VRR.Config]: Loading server config ...");
|
||||
serverConfig = loadServerConfigFromGameAndPort(server.game, server.port, getMultiplayerMod());
|
||||
|
||||
logToConsole(LOG_INFO, "[VRR.Config]: Applying server config ...");
|
||||
getServerConfig().fallingSnow = intToBool(toInteger(server.getCVar("vrr_fallingsnow")));
|
||||
getServerConfig().groundSnow = intToBool(toInteger(server.getCVar("vrr_groundsnow")));
|
||||
getServerConfig().useGUI = intToBool(toInteger(server.getCVar("vrr_gui")));
|
||||
getServerConfig().showLogo = false;
|
||||
getServerConfig().testerOnly = intToBool(toInteger(server.getCVar("vrr_testeronly")));
|
||||
getServerConfig().discordEnabled = false;
|
||||
getServerConfig().createJobPickups = intToBool(toInteger(server.getCVar("vrr_jobpickups")));
|
||||
getServerConfig().createBusinessPickups = intToBool(toInteger(server.getCVar("vrr_businesspickups")));
|
||||
getServerConfig().createHousePickups = intToBool(toInteger(server.getCVar("vrr_housepickups")));
|
||||
getServerConfig().createJobBlips = intToBool(toInteger(server.getCVar("vrr_jobblips")));
|
||||
getServerConfig().createBusinessBlips = intToBool(toInteger(server.getCVar("vrr_businessblips")));
|
||||
getServerConfig().createHouseBlips = intToBool(toInteger(server.getCVar("vrr_houseblips")));
|
||||
getServerConfig().useRealTime = intToBool(toInteger(server.getCVar("vrr_realtime")));
|
||||
getServerConfig().antiCheat.enabled = intToBool(toInteger(server.getCVar("vrr_anticheat")));
|
||||
|
||||
applyConfigToServer(serverConfig);
|
||||
logToConsole(LOG_DEBUG, "[VRR.Config]: Server config applied successfully!");
|
||||
|
||||
logToConsole(LOG_INFO, "[VRR.Config]: Config script initialized!");
|
||||
}
|
||||
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function loadGlobalConfig() {
|
||||
getGlobalConfig().economy = loadEconomyConfig();
|
||||
getGlobalConfig().locale = loadLocaleConfig();
|
||||
getGlobalConfig().accents = loadAccentConfig();
|
||||
getGlobalConfig().discord = loadDiscordConfig();
|
||||
logToConsole(LOG_DEBUG, "[VRR.Config] Loading global configuration ...");
|
||||
try {
|
||||
getGlobalConfig().database = loadDatabaseConfig();
|
||||
} catch(error) {
|
||||
logToConsole(LOG_ERROR, `[VRR.Config] Failed to load global configuration. Error: ${error}`);
|
||||
thisResource.stop();
|
||||
}
|
||||
|
||||
try {
|
||||
getGlobalConfig().economy = loadEconomyConfig();
|
||||
} catch(error) {
|
||||
logToConsole(LOG_ERROR, `[VRR.Config] Failed to load economy configuration. Error: ${error}`);
|
||||
thisResource.stop();
|
||||
}
|
||||
|
||||
try {
|
||||
getGlobalConfig().locale = loadLocaleConfig();
|
||||
} catch(error) {
|
||||
logToConsole(LOG_ERROR, `[VRR.Config] Failed to load locale configuration. Error: ${error}`);
|
||||
thisResource.stop();
|
||||
}
|
||||
|
||||
try {
|
||||
getGlobalConfig().accents = loadAccentConfig();
|
||||
} catch(error) {
|
||||
logToConsole(LOG_ERROR, `[VRR.Config] Failed to load accent configuration. Error: ${error}`);
|
||||
thisResource.stop();
|
||||
}
|
||||
|
||||
try {
|
||||
getGlobalConfig().discord = loadDiscordConfig();
|
||||
} catch(error) {
|
||||
logToConsole(LOG_ERROR, `[VRR.Config] Failed to load discord configuration. Error: ${error}`);
|
||||
thisResource.stop();
|
||||
}
|
||||
|
||||
try {
|
||||
getGlobalConfig().keyBind = loadKeyBindConfig();
|
||||
} catch(error) {
|
||||
logToConsole(LOG_ERROR, `[VRR.Config] Failed to load keybind configuration. Error: ${error}`);
|
||||
thisResource.stop();
|
||||
}
|
||||
|
||||
try {
|
||||
getGlobalConfig().email = loadEmailConfig();
|
||||
} catch(error) {
|
||||
logToConsole(LOG_ERROR, `[VRR.Config] Failed to load email configuration. Error: ${error}`);
|
||||
thisResource.stop();
|
||||
}
|
||||
|
||||
logToConsole(LOG_DEBUG, "[VRR.Config] Loaded global configuration successfully!");
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function loadServerConfigFromGameAndPort(gameId, port, mpMod) {
|
||||
function loadServerConfigFromGameAndPort(gameId, port) {
|
||||
let dbConnection = connectToDatabase();
|
||||
if(dbConnection) {
|
||||
let dbQueryString = `SELECT * FROM svr_main WHERE svr_game = ${gameId} AND svr_port = ${port} AND svr_mpmod = ${mpMod} LIMIT 1;`;
|
||||
let dbQueryString = `SELECT * FROM svr_main WHERE svr_game = ${gameId} AND svr_port = ${port} LIMIT 1;`;
|
||||
let dbQuery = queryDatabase(dbConnection, dbQueryString);
|
||||
if(dbQuery) {
|
||||
if(dbQuery.numRows > 0) {
|
||||
@@ -168,6 +200,12 @@ function loadServerConfigFromId(tempServerId) {
|
||||
// ===========================================================================
|
||||
|
||||
function applyConfigToServer(tempServerConfig) {
|
||||
logToConsole(LOG_INFO, "[VRR.Config]: Applying server config ...");
|
||||
getServerConfig().devServer = intToBool(toInteger(server.getCVar("vrr_devserver")));
|
||||
getServerConfig().testerOnly = intToBool(toInteger(server.getCVar("vrr_testeronly")));
|
||||
|
||||
logToConsole(LOG_DEBUG, "[VRR.Config]: Server config applied successfully!");
|
||||
|
||||
if(isTimeSupported()) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Config]: Setting time to to ${tempServerConfig.hour}:${tempServerConfig.minute} with minute duration of ${tempServerConfig.minuteDuration}`);
|
||||
setGameTime(tempServerConfig.hour, tempServerConfig.minute, tempServerConfig.minuteDuration);
|
||||
@@ -225,6 +263,17 @@ function saveServerConfigToDatabase() {
|
||||
["svr_charselect_vw", getServerConfig().characterSelectDimension],
|
||||
["svr_inflation_multiplier", getServerConfig().inflationMultiplier],
|
||||
["svr_intro_music", getServerConfig().introMusicURL],
|
||||
["svr_gui", getServerConfig().useGUI],
|
||||
["svr_logo", getServerConfig().useLogo],
|
||||
["svr_snow_falling", getServerConfig().fallingSnow],
|
||||
["svr_snow_ground", getServerConfig().groundSnow],
|
||||
["svr_biz_blips", getServerConfig().createBusinessBlips],
|
||||
["svr_biz_pickups", getServerConfig().createBusinessPickups],
|
||||
["svr_house_blips", getServerConfig().createHouseBlips],
|
||||
["svr_house_pickups", getServerConfig().createHousePickups],
|
||||
["svr_job_blips", getServerConfig().createJobBlips],
|
||||
["svr_job_pickups", getServerConfig().createJobPickups],
|
||||
["svr_nametag_distance", getServerConfig().nameTagDistance],
|
||||
];
|
||||
|
||||
let dbQuery = null;
|
||||
@@ -372,7 +421,7 @@ function setWeatherCommand(command, params, client) {
|
||||
|
||||
getServerConfig().needsSaved = true;
|
||||
|
||||
announceAdminAction("ServerWeatherSet", getPlayerName(client), getGameConfig().weatherNames[getServerGame()][toInteger(weatherId)]);
|
||||
announceAdminAction("ServerWeatherSet", getPlayerName(client), getGameConfig().weatherNames[getGame()][toInteger(weatherId)]);
|
||||
updateServerRules();
|
||||
return true;
|
||||
}
|
||||
@@ -441,7 +490,7 @@ function setServerGUIColoursCommand(command, params, client) {
|
||||
|
||||
getServerConfig().needsSaved = true;
|
||||
|
||||
//announceAdminAction(`${getPlayerName(client)} ${getInlineChatColourByName("orange")}set the server ${getBoolRedGreenInlineColour(fallingSnow)}${getOnOffFromBool(fallingSnow)} ${getInlineChatColourByName("orange")}and ground snow ${getBoolRedGreenInlineColour(groundSnow)}${getOnOffFromBool(groundSnow)}`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} has set the server GUI colours to ${colourRed}, ${colourGreen}, ${colourBlue}`);
|
||||
//updateServerRules();
|
||||
return true;
|
||||
}
|
||||
@@ -463,7 +512,7 @@ function toggleServerLogoCommand(command, params, client) {
|
||||
|
||||
updatePlayerShowLogoState(null, getServerConfig().useLogo);
|
||||
|
||||
//announceAdminAction(`${getPlayerName(client)}{MAINCOLOUR}${getBoolRedGreenInlineColour(doesServerHaveServerLogoEnabled())}${toUpperCase(getOnOffFromBool(getServerConfig().useLogo))}`);
|
||||
announceAdminAction(`ServerLogoSet`, `{adminOrange}${getPlayerName(client)}{MAINCOLOUR}`, `${getBoolRedGreenInlineColour(getServerConfig().useLogo)}${toUpperCase(getOnOffFromBool(getServerConfig().useLogo))}`);
|
||||
updateServerRules();
|
||||
return true;
|
||||
}
|
||||
@@ -483,7 +532,7 @@ function toggleServerLogoCommand(command, params, client) {
|
||||
getServerConfig().createJobBlips = !getServerConfig().createJobBlips;
|
||||
getServerConfig().needsSaved = true;
|
||||
|
||||
announceAdminAction("ServerJobBlipsSet", `{adminRed}${getPlayerName(client)}{MAINCOLOUR}`, `${getBoolRedGreenInlineColour(getServerConfig().createJobBlips)}${toUpperCase(getOnOffFromBool(getServerConfig().createJobBlips))}{MAINCOLOUR}`);
|
||||
announceAdminAction("ServerJobBlipsSet", `{adminOrange}${getPlayerName(client)}{MAINCOLOUR}`, `${getBoolRedGreenInlineColour(getServerConfig().createJobBlips)}${toUpperCase(getOnOffFromBool(getServerConfig().createJobBlips))}{MAINCOLOUR}`);
|
||||
resetAllJobBlips();
|
||||
return true;
|
||||
}
|
||||
@@ -503,7 +552,7 @@ function toggleServerLogoCommand(command, params, client) {
|
||||
getServerConfig().createJobPickups = !getServerConfig().createJobPickups;
|
||||
getServerConfig().needsSaved = true;
|
||||
|
||||
announceAdminAction("ServerJobPickupsSet", `{adminRed}${getPlayerName(client)}{MAINCOLOUR}`, `${getBoolRedGreenInlineColour(getServerConfig().createJobPickups)}${toUpperCase(getOnOffFromBool(getServerConfig().createJobPickups))}{MAINCOLOUR}`);
|
||||
announceAdminAction("ServerJobPickupsSet", `{adminOrange}${getPlayerName(client)}{MAINCOLOUR}`, `${getBoolRedGreenInlineColour(getServerConfig().createJobPickups)}${toUpperCase(getOnOffFromBool(getServerConfig().createJobPickups))}{MAINCOLOUR}`);
|
||||
resetAllJobPickups();
|
||||
return true;
|
||||
}
|
||||
@@ -523,7 +572,7 @@ function toggleServerLogoCommand(command, params, client) {
|
||||
getServerConfig().createBusinessBlips = !getServerConfig().createBusinessBlips;
|
||||
getServerConfig().needsSaved = true;
|
||||
|
||||
announceAdminAction("ServerBusinessBlipsSet", `{adminRed}${getPlayerName(client)}{MAINCOLOUR}`, `${getBoolRedGreenInlineColour(getServerConfig().createBusinessBlips)}${toUpperCase(getOnOffFromBool(getServerConfig().createBusinessBlips))}{MAINCOLOUR}`);
|
||||
announceAdminAction("ServerBusinessBlipsSet", `{adminOrange}${getPlayerName(client)}{MAINCOLOUR}`, `${getBoolRedGreenInlineColour(getServerConfig().createBusinessBlips)}${toUpperCase(getOnOffFromBool(getServerConfig().createBusinessBlips))}{MAINCOLOUR}`);
|
||||
resetAllBusinessBlips();
|
||||
return true;
|
||||
}
|
||||
@@ -543,7 +592,7 @@ function toggleServerLogoCommand(command, params, client) {
|
||||
getServerConfig().createBusinessPickups = !getServerConfig().createBusinessPickups;
|
||||
getServerConfig().needsSaved = true;
|
||||
|
||||
announceAdminAction("ServerBusinessPickupsSet", `{adminRed}${getPlayerName(client)}{MAINCOLOUR}`, `${getBoolRedGreenInlineColour(getServerConfig().createBusinessPickups)}${toUpperCase(getOnOffFromBool(getServerConfig().createBusinessPickups))}{MAINCOLOUR}`);
|
||||
announceAdminAction("ServerBusinessPickupsSet", `{adminOrange}${getPlayerName(client)}{MAINCOLOUR}`, `${getBoolRedGreenInlineColour(getServerConfig().createBusinessPickups)}${toUpperCase(getOnOffFromBool(getServerConfig().createBusinessPickups))}{MAINCOLOUR}`);
|
||||
resetAllBusinessPickups();
|
||||
return true;
|
||||
}
|
||||
@@ -563,7 +612,7 @@ function toggleServerLogoCommand(command, params, client) {
|
||||
getServerConfig().createHouseBlips = !getServerConfig().createHouseBlips;
|
||||
getServerConfig().needsSaved = true;
|
||||
|
||||
announceAdminAction("ServerHouseBlipsSet", `{adminRed}${getPlayerName(client)}{MAINCOLOUR}`, `${getBoolRedGreenInlineColour(getServerConfig().createHouseBlips)}${toUpperCase(getOnOffFromBool(getServerConfig().createHouseBlips))}{MAINCOLOUR}`);
|
||||
announceAdminAction("ServerHouseBlipsSet", `{adminOrange}${getPlayerName(client)}{MAINCOLOUR}`, `${getBoolRedGreenInlineColour(getServerConfig().createHouseBlips)}${toUpperCase(getOnOffFromBool(getServerConfig().createHouseBlips))}{MAINCOLOUR}`);
|
||||
resetAllHouseBlips();
|
||||
return true;
|
||||
}
|
||||
@@ -583,7 +632,7 @@ function toggleServerLogoCommand(command, params, client) {
|
||||
getServerConfig().createHousePickups = !getServerConfig().createHousePickups;
|
||||
getServerConfig().needsSaved = true;
|
||||
|
||||
announceAdminAction("ServerHousePickupsSet", `{adminRed}${getPlayerName(client)}{MAINCOLOUR}`, `${getBoolRedGreenInlineColour(getServerConfig().createHousePickups)}${toUpperCase(getOnOffFromBool(getServerConfig().createHousePickups))}{MAINCOLOUR}`);
|
||||
announceAdminAction("ServerHousePickupsSet", `{adminOrange}${getPlayerName(client)}{MAINCOLOUR}`, `${getBoolRedGreenInlineColour(getServerConfig().createHousePickups)}${toUpperCase(getOnOffFromBool(getServerConfig().createHousePickups))}{MAINCOLOUR}`);
|
||||
resetAllHousePickups();
|
||||
return true;
|
||||
}
|
||||
@@ -604,7 +653,7 @@ function toggleServerGUICommand(command, params, client) {
|
||||
|
||||
getServerConfig().needsSaved = true;
|
||||
|
||||
announceAdminAction(`${getPlayerName(client)}{MAINCOLOUR} turned GUI ${toLowerCase(getOnOffFromBool(getServerConfig().useGUI))} for this server`);
|
||||
announceAdminAction(`ServerGUISet`, `${getPlayerName(client)}{MAINCOLOUR}`, `{adminOrange}${getPlayerName(client)}{MAINCOLOUR}`, `${getBoolRedGreenInlineColour(getServerConfig().useGUI)}${toUpperCase(getOnOffFromBool(getServerConfig().useGUI))}{MAINCOLOUR}`);
|
||||
updateServerRules();
|
||||
return true;
|
||||
}
|
||||
@@ -628,6 +677,7 @@ function toggleServerUseRealWorldTimeCommand(command, params, client) {
|
||||
//announceAdminAction(`${getPlayerName(client)}{MAINCOLOUR} turned real-world time ${getServerConfig().useRealTime} for this server (GMT ${addPositiveNegativeSymbol(getServerConfig().realTimeZone)})`);
|
||||
updateServerGameTime();
|
||||
updateServerRules();
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} turned real-world time ${getOnOffFromBool(getServerConfig().useRealTime)} for this server (GMT ${addPositiveNegativeSymbol(getServerConfig().realTimeZone)})`);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -654,6 +704,8 @@ function setServerRealWorldTimeZoneCommand(command, params, client) {
|
||||
//announceAdminAction(`${getPlayerName(client)} {MAINCOLOUR}set the time zone for in-game's real-world time to GMT ${addPositiveNegativeSymbol(getServerConfig().realTimeZone)}`);
|
||||
updateServerGameTime();
|
||||
updateServerRules();
|
||||
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} set the timezone for in-game real-world time to GMT ${addPositiveNegativeSymbol(getServerConfig().realTimeZone)}`);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -674,6 +726,7 @@ function reloadServerConfigurationCommand(command, params, client) {
|
||||
updateServerRules();
|
||||
|
||||
messagePlayerSuccess(client, `You reloaded the server configuration!`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} reloaded the server config`);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -689,8 +742,8 @@ function reloadServerConfigurationCommand(command, params, client) {
|
||||
*
|
||||
*/
|
||||
function reloadEmailConfigurationCommand(command, params, client) {
|
||||
emailConfig = loadEmailConfiguration();
|
||||
messagePlayerSuccess(client, `You reloaded the email configuration!`);
|
||||
getGlobalConfig().email = loadEmailConfig();
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} reloaded the email config`);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -706,19 +759,43 @@ function reloadEmailConfigurationCommand(command, params, client) {
|
||||
*
|
||||
*/
|
||||
function reloadDatabaseConfigurationCommand(command, params, client) {
|
||||
if(databaseConfig.usePersistentConnection && isDatabaseConnected(persistentDatabaseConnection)) {
|
||||
console.warn(`[VRR.Database] Closing persistent database connection`);
|
||||
if(getDatabaseConfig().usePersistentConnection && isDatabaseConnected(persistentDatabaseConnection)) {
|
||||
logToConsole(LOG_WARN, `[VRR.Database] Closing persistent database connection`);
|
||||
persistentDatabaseConnection.close();
|
||||
persistentDatabaseConnection = null;
|
||||
}
|
||||
databaseEnabled = false;
|
||||
databaseConfig = loadEmailConfig();
|
||||
messagePlayerSuccess(client, `You reloaded the database configuration!`);
|
||||
getGlobalConfig().database = loadDatabaseConfig();
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} reloaded the database config`);
|
||||
databaseEnabled = true;
|
||||
if(databaseConfig.usePersistentConnection) {
|
||||
if(getDatabaseConfig().usePersistentConnection) {
|
||||
connectToDatabase();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
/**
|
||||
* This is a command handler function.
|
||||
*
|
||||
* @param {string} command - The command name used by the player
|
||||
* @param {string} params - The parameters/args string used with the command by the player
|
||||
* @param {Client} client - The client/player that used the command
|
||||
* @return {bool} Whether or not the command was successful
|
||||
*
|
||||
*/
|
||||
function setServerNameTagDistanceCommand(command, params, client) {
|
||||
if(areParamsEmpty(params)) {
|
||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||
return false;
|
||||
}
|
||||
|
||||
getServerConfig().nameTagDistance = toFloat(params);
|
||||
getServerConfig().needsSaved = true;
|
||||
|
||||
sendNameTagDistanceToClient(null, getServerConfig().nameTagDistance);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} set the name tag distance to ${getServerConfig().nameTagDistance}`);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -731,6 +808,7 @@ function getServerIntroMusicURL() {
|
||||
// ===========================================================================
|
||||
|
||||
function loadLocaleConfig() {
|
||||
logToConsole(LOG_DEBUG, "[VRR.Config] Loading locale configuration");
|
||||
let localeConfig = JSON.parse(loadTextFile(`config/locale.json`));
|
||||
if(localeConfig != null) {
|
||||
return localeConfig;
|
||||
@@ -740,6 +818,7 @@ function loadLocaleConfig() {
|
||||
// ===========================================================================
|
||||
|
||||
function loadEconomyConfig() {
|
||||
logToConsole(LOG_DEBUG, "[VRR.Config] Loading economy configuration");
|
||||
let economyConfig = JSON.parse(loadTextFile(`config/economy.json`));
|
||||
if(economyConfig != null) {
|
||||
return economyConfig;
|
||||
@@ -749,6 +828,7 @@ function loadEconomyConfig() {
|
||||
// ===========================================================================
|
||||
|
||||
function loadAccentConfig() {
|
||||
logToConsole(LOG_DEBUG, "[VRR.Config] Loading accents configuration");
|
||||
let accentConfig = JSON.parse(loadTextFile(`config/accents.json`));
|
||||
if(accentConfig != null) {
|
||||
return accentConfig;
|
||||
@@ -758,10 +838,45 @@ function loadAccentConfig() {
|
||||
// ===========================================================================
|
||||
|
||||
function loadDiscordConfig() {
|
||||
logToConsole(LOG_DEBUG, "[VRR.Config] Loading discord configuration");
|
||||
let discordConfig = JSON.parse(loadTextFile(`config/discord.json`));
|
||||
if(discordConfig != null) {
|
||||
return discordConfig;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function loadDatabaseConfig() {
|
||||
logToConsole(LOG_DEBUG, "[VRR.Config] Loading database configuration");
|
||||
let databaseConfig = JSON.parse(loadTextFile("config/database.json"));
|
||||
if(databaseConfig != null) {
|
||||
return databaseConfig;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function loadKeyBindConfig() {
|
||||
logToConsole(LOG_DEBUG, "[VRR.Config] Loading keybind configuration");
|
||||
let keyBindConfig = JSON.parse(loadTextFile("config/keybind.json"));
|
||||
if(keyBindConfig != null) {
|
||||
return keyBindConfig;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function loadEmailConfig() {
|
||||
logToConsole(LOG_DEBUG, "[VRR.Config] Loading email configuration");
|
||||
let emailConfig = JSON.parse(loadTextFile("config/email.json"));
|
||||
if(emailConfig != null) {
|
||||
return emailConfig;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -830,4 +945,22 @@ function doesServerHaveGroundSnowEnabled() {
|
||||
return getServerConfig().groundSnow;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getDatabaseConfig() {
|
||||
return getGlobalConfig().database;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function loadServerConfig() {
|
||||
logToConsole(LOG_DEBUG, "[VRR.Config] Loading server configuration");
|
||||
try {
|
||||
serverConfig = loadServerConfigFromGameAndPort(getGame(), getServerPort());
|
||||
} catch(error) {
|
||||
logToConsole(LOG_ERROR, `[VRR.Config] Could not load server configuration for game ${getGame()} and port ${getServerPort}`);
|
||||
thisResource.stop();
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -11,7 +11,11 @@
|
||||
const VRR_PROMPT_NONE = 0;
|
||||
const VRR_PROMPT_CREATEFIRSTCHAR = 1;
|
||||
const VRR_PROMPT_BIZORDER = 2;
|
||||
const VRR_PROMPT_GIVEVEHTOCLAN = 3;
|
||||
const VRR_PROMPT_VEHGIVETOCLAN = 3;
|
||||
const VRR_PROMPT_HOUSEGIVETOCLAN = 4;
|
||||
const VRR_PROMPT_BIZGIVETOCLAN = 5;
|
||||
const VRR_PROMPT_HOUSEBUY = 6;
|
||||
const VRR_PROMPT_BIZBUY = 7;
|
||||
|
||||
// Job Types
|
||||
const VRR_JOB_NONE = 0;
|
||||
@@ -59,6 +63,7 @@ const VRR_HOUSEOWNER_JOB = 2; // Owned by a job
|
||||
const VRR_HOUSEOWNER_CLAN = 3; // Owned by a clan
|
||||
const VRR_HOUSEOWNER_FACTION = 4; // Owned by a faction
|
||||
const VRR_HOUSEOWNER_PUBLIC = 5; // Is a public house. Technically not owned. This probably won't be used.
|
||||
const VRR_HOUSEOWNER_BIZ = 6; // Owned by a business. Used for apartment buildings where rent goes to business.
|
||||
|
||||
// Gate Owner Types
|
||||
const VRR_GATEOWNER_NONE = 0; // Not owned
|
||||
@@ -205,8 +210,8 @@ const VRR_ITEM_USETYPE_ARMOUR = 28; //
|
||||
const VRR_ITEM_USETYPE_HEALTH = 29; //
|
||||
const VRR_ITEM_USETYPE_AED = 30; //
|
||||
const VRR_ITEM_USETYPE_WALKIETALKIE = 31; //
|
||||
const VRR_ITEM_USETYPE_BOOMBOX = 32; //
|
||||
const VRR_ITEM_USETYPE_EARBUDS = 33; //
|
||||
const VRR_ITEM_USETYPE_AREARADIO = 32; //
|
||||
const VRR_ITEM_USETYPE_PERSONALRADIO = 33; //
|
||||
const VRR_ITEM_USETYPE_BADGE = 34; //
|
||||
const VRR_ITEM_USETYPE_DRINK = 35; // Drinkable item. Action output shows "Player_Name drinks some (drink name)"
|
||||
const VRR_ITEM_USETYPE_EXTINGUISHER = 36; // Extinguisher item. Allows putting out fires
|
||||
@@ -227,6 +232,7 @@ const VRR_ITEM_USETYPE_PLANT = 50; // Plantable item. Pot plants,
|
||||
const VRR_ITEM_USETYPE_MEGAPHONE = 51; // Megaphone item. Allows shouting over greater distances. Also called a bullhorn
|
||||
const VRR_ITEM_USETYPE_INJECTDRUG = 52; // Injectable drug. Action output shows "Player_Name injects some (drug)"
|
||||
const VRR_ITEM_USETYPE_ALCOHOL = 53; // Alcohol. Applies an intoxication/drunkness effect
|
||||
const VRR_ITEM_USETYPE_LOTTOTICKET = 54; // Lotto ticket. Allows a character to enter the lottery
|
||||
|
||||
// Item Drop Types
|
||||
const VRR_ITEM_DROPTYPE_NONE = 0; // Can't be dropped
|
||||
|
||||
@@ -7,56 +7,64 @@
|
||||
// TYPE: Server (JavaScript)
|
||||
// ===========================================================================
|
||||
|
||||
let scriptVersion = "1.0";
|
||||
let scriptVersion = "1.1";
|
||||
let serverStartTime = 0;
|
||||
let logLevel = LOG_INFO|LOG_DEBUG|LOG_VERBOSE|LOG_WARN|LOG_ERROR;
|
||||
let logLevel = LOG_INFO|LOG_DEBUG|LOG_VERBOSE; // LOG_ERROR|LOG_WARN;
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
/**
|
||||
* @typedef {Object} ServerData
|
||||
* @property {Array.<VehicleData>} vehicles
|
||||
* @property {Array.<ClientData>} clients
|
||||
* @property {Array.<BusinessData>} businesses
|
||||
* @property {Array.<HouseData>} houses
|
||||
* @property {Array.<HouseData>} commands
|
||||
* @property {Array.<ItemData>} items
|
||||
* @property {Array.<ItemTypeData>} itemTypes
|
||||
* @property {Array.<ClanData>} clans
|
||||
* @property {Array} localeStrings
|
||||
* @property {Array.<NPCData>} npcs
|
||||
* @property {Array.<RaceData>} races
|
||||
* @property {Array.<JobData>} jobs
|
||||
* @property {Array.<Gates>} gates
|
||||
* @property {Array} groundItemCache
|
||||
* @property {Array} groundPlantCache
|
||||
* @property {Array} purchasingVehicleCache
|
||||
* @property {Array} rentingVehicleCache
|
||||
*/
|
||||
let serverData = {
|
||||
vehicles: [],
|
||||
clients: new Array(128),
|
||||
businesses: [],
|
||||
houses: [],
|
||||
commands: {},
|
||||
groundItemCache: [],
|
||||
groundPlantCache: [],
|
||||
items: [],
|
||||
itemTypes: [],
|
||||
clans: [],
|
||||
antiCheat: {
|
||||
//whiteListedGameScripts: [],
|
||||
//blackListedGameScripts: [],
|
||||
},
|
||||
localeStrings: {},
|
||||
cachedTranslations: [],
|
||||
cachedTranslationFrom: [],
|
||||
triggers: [],
|
||||
//triggers: [],
|
||||
npcs: [],
|
||||
locales: [],
|
||||
accents: [],
|
||||
races: [],
|
||||
jobs: [],
|
||||
gates: [],
|
||||
groundItemCache: [],
|
||||
groundPlantCache: [],
|
||||
purchasingVehicleCache: [],
|
||||
rentingVehicleCache: [],
|
||||
};
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
// Pre-cache allowed skins
|
||||
let allowedSkins = getAllowedSkins(getGame());
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function initServerData() {
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
/**
|
||||
*
|
||||
* @return {ServerData}
|
||||
*
|
||||
*/
|
||||
function getServerData() {
|
||||
return serverData;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getModNatives() {
|
||||
return modNatives;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -15,8 +15,60 @@ let persistentDatabaseConnection = null;
|
||||
|
||||
function initDatabaseScript() {
|
||||
logToConsole(LOG_INFO, "[VRR.Database]: Initializing database script ...");
|
||||
databaseConfig = loadDatabaseConfiguration();
|
||||
logToConsole(LOG_INFO, "[VRR.Database]: Database script initialized successfully!");
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function createDatabaseInsertQuery(tableName, data) {
|
||||
let fields = [];
|
||||
let values = [];
|
||||
|
||||
for(let i in data) {
|
||||
if(data[i][1] != "undefined" && data[i][1] != NaN && data[i][0] != 'NaN') {
|
||||
if(data[i][1] != "undefined" && data[i][1] != NaN && data[i][1] != 'NaN') {
|
||||
fields.push(data[i][0]);
|
||||
|
||||
if(typeof data[i][1] == "string") {
|
||||
if(data[i][1] == "{UNIXTIMESTAMP}") {
|
||||
values.push("UNIX_TIMESTAMP()");
|
||||
} else {
|
||||
values.push(`'${data[i][1]}'`);
|
||||
}
|
||||
} else {
|
||||
values.push(data[i][1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let queryString = `INSERT INTO ${tableName} (${fields.join(", ")}) VALUES (${values.join(", ")})`;
|
||||
return queryString;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function createDatabaseUpdateQuery(tableName, data, whereClause) {
|
||||
let values = [];
|
||||
|
||||
for(let i in data) {
|
||||
if(data[i][0] != "undefined" && data[i][0] != NaN && data[i][0] != 'NaN') {
|
||||
if(data[i][1] != "undefined" && data[i][1] != NaN && data[i][1] != 'NaN') {
|
||||
if(typeof data[i][1] == "string") {
|
||||
if(data[i][1] == "{UNIXTIMESTAMP}") {
|
||||
values.push(`${data[i][0]}=UNIX_TIMESTAMP()`);
|
||||
} else {
|
||||
values.push(`${data[i][0]}='${data[i][1]}'`);
|
||||
}
|
||||
} else {
|
||||
values.push(`${data[i][0]}=${data[i][1]}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let queryString = `UPDATE ${tableName} SET ${values.join(", ")} WHERE ${whereClause}`;
|
||||
return queryString;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -263,7 +263,7 @@ function simulateCommandForPlayerCommand(command, params, client) {
|
||||
}
|
||||
|
||||
getCommand(toLowerCase(tempCommand)).handlerFunction(tempCommand, tempParams, targetClient);
|
||||
messagePlayerSuccess(client, `The command string {ALTCOLOUR}/${tempCommand} ${tempParams}{MAINCOLOUR} has been simulated for {ALTCOLOUR}${targetgetPlayerName(client)}`);
|
||||
messagePlayerSuccess(client, `The command string {ALTCOLOUR}/${tempCommand} ${tempParams}{MAINCOLOUR} has been simulated for {ALTCOLOUR}${getPlayerName(targetClient)}`);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -324,8 +324,8 @@ function executeServerCodeCommand(command, params, client) {
|
||||
|
||||
messagePlayerSuccess(client, "Server code executed!");
|
||||
messagePlayerNormal(client, `Code: ${params}`, COLOUR_YELLOW);
|
||||
messagePlayerNormal(client, `Returns: ${returnValue}`, COLOUR_YELLOW);
|
||||
console.log(returnValue);
|
||||
messagePlayerNormal(client, `Returns: ${returnValue} (${typeof returnValue})`, COLOUR_YELLOW);
|
||||
logToConsole(LOG_INFO, `Server code executed by ${getPlayerDisplayForConsole(client)}: ${params}`);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -337,6 +337,7 @@ function executeClientCodeCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let splitParams = params.split(" ");
|
||||
let targetClient = getPlayerFromParams(getParam(params, " ", 1));
|
||||
let targetCode = splitParams.slice(1).join(" ");
|
||||
|
||||
@@ -350,10 +351,10 @@ function executeClientCodeCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
sendRunCodeToClient(client, targetClient, targetCode, client.index);
|
||||
sendRunCodeToClient(targetClient, targetCode, client);
|
||||
|
||||
messagePlayerSuccess(client, "Executing client code for " + toString(targetgetPlayerName(client)) + "!");
|
||||
messagePlayerNormal(client, "Code: " + targetCode);
|
||||
messagePlayerSuccess(client, `Executing client code for ${getPlayerName(targetClient)}`);
|
||||
messagePlayerNormal(client, `Code: ${targetCode}`);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -380,7 +381,7 @@ function setPlayerTesterStatusCommand(command, params, client) {
|
||||
|
||||
let enabled = hasBitFlag(getPlayerData(targetClient).accountData.flags.moderation, getModerationFlagValue("IsTester"));
|
||||
|
||||
messageAdmins(`{ALTCOLOUR}${client.name} ${getBoolRedGreenInlineColour(enabled)}${toUpperCase(getEnabledDisabledFromBool(enabled))} {ALTCOLOUR}${targetClient.name}'s {MAINCOLOUR}tester status`)
|
||||
messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} ${getBoolRedGreenInlineColour(enabled)}${toUpperCase(getEnabledDisabledFromBool(enabled))} {ALTCOLOUR}${getPlayerName(targetClient)}'s {MAINCOLOUR}tester status`)
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -399,7 +400,7 @@ function testPromptGUICommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
showPlayerPromptGUI(targetClient, "Testing the two button prompt GUI", "Testing", "Yes", "No")
|
||||
showPlayerPromptGUI(targetClient, "Testing the two button prompt GUI", "Testing", getLocaleString(client, "Yes"), getLocaleString(client, "No"))
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -444,16 +445,23 @@ function testErrorGUICommand(command, params, client) {
|
||||
// ===========================================================================
|
||||
|
||||
function saveServerDataCommand(command, params, client) {
|
||||
messageAdmins(`{clanOrange}Vortrex has forced a manual save of all data. Initiating ...`);
|
||||
messageAdmins(`{adminOrange}Vortrex{MAINCOLOUR} has forced a manual save of all data. Initiating ...`);
|
||||
saveServerDataToDatabase();
|
||||
messageAdmins(`{clanOrange}All server data saved to database successfully!`);
|
||||
messageAdmins(`{MAINCOLOUR}All server data saved to database successfully!`);
|
||||
return true;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function testEmailCommand(command, params, client) {
|
||||
sendEmail(params, "Player", "Test email", "Just testing the SMTP module for the server!");
|
||||
try {
|
||||
messagePlayerAlert(client, `Sending test email to ${params}`);
|
||||
sendEmail(params, "Player", "Test email", "Just testing the SMTP module for the server!");
|
||||
} catch(error) {
|
||||
messagePlayerError(client, "The email could not be sent! Error: ${error}");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -461,34 +469,32 @@ function testEmailCommand(command, params, client) {
|
||||
|
||||
function restartGameModeCommand(command, params, client) {
|
||||
messagePlayerNormal(null, `The server game mode is restarting!`, getColourByName("orange"));
|
||||
consoleCommand("/refresh");
|
||||
thisResource.restart();
|
||||
return true;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function clientRunCodeFail(client, returnTo, code) {
|
||||
function clientRunCodeFail(client, returnTo, error) {
|
||||
let returnClient = getClientFromIndex(returnTo);
|
||||
if(!returnClient) {
|
||||
return false;
|
||||
}
|
||||
|
||||
messagePlayerError(returnClient, `Client code failed to execute for ${getPlayerName(client)}!`);
|
||||
messagePlayerNormal(returnClient, `Code: ${code}`, getColourByName("yellow"));
|
||||
messagePlayerError(returnClient, `(${getPlayerName(client)}). Error: ${error}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function clientRunCodeSuccess(client, returnTo, returnVal, code) {
|
||||
function clientRunCodeSuccess(client, returnTo, returnVal) {
|
||||
let returnClient = getClientFromIndex(returnTo);
|
||||
if(!returnClient) {
|
||||
return false;
|
||||
}
|
||||
|
||||
messagePlayerSuccess(returnClient, `Client code executed for ${getPlayerName(client)}!`);
|
||||
messagePlayerNormal(returnClient, `Code: ${code}`, getColourByName("yellow"));
|
||||
messagePlayerNormal(returnClient, `Returns: ${returnVal}`, getColourByName("yellow"));
|
||||
//messagePlayerSuccess(returnClient, `Client code executed for ${getPlayerName(client)}!`);
|
||||
//messagePlayerNormal(returnClient, `Code: ${code}`, getColourByName("yellow"));
|
||||
messagePlayerNormal(returnClient, `(${getPlayerName(client)}) Code returns: ${returnVal}`, getColourByName("white"));
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -667,7 +673,44 @@ function resetAllServerAmbienceElementsCommand(command, params, client) {
|
||||
|
||||
function reloadEconomyConfigurationCommand(command, params, client) {
|
||||
getGlobalConfig().economy = loadEconomyConfig();
|
||||
messageAdmins(`${client.name} {MAINCOLOUR}has reloaded the economy settings`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)} {MAINCOLOUR}has reloaded the economy settings`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showLocalePickerTestCommand(command, params, client) {
|
||||
showLocaleChooserForPlayer(client);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function executeDatabaseQueryCommand(command, params, client) {
|
||||
if(areParamsEmpty(params)) {
|
||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!targetClient) {
|
||||
messagePlayerError(client, "That player was not found!");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(targetCode == "") {
|
||||
messagePlayerError(client, "You didn't enter any code!");
|
||||
return false;
|
||||
}
|
||||
|
||||
let success = quickDatabaseQuery(params);
|
||||
|
||||
if(!success) {
|
||||
messagePlayerAlert(client, `Database query failed to execute: {ALTCOLOUR}${query}`);
|
||||
} else if(typeof success != "boolean") {
|
||||
messagePlayeSuccess(client, `Database query successful: {ALTCOLOUR}${query}`);
|
||||
messagePlayerInfo(client, `Returns: ${success}`);
|
||||
} else {
|
||||
messagePlayerSuccess(client, `Database query successful: {ALTCOLOUR}${query}`);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -89,7 +89,11 @@ function getDiscordUserData(discordUserId) {
|
||||
// ===========================================================================
|
||||
|
||||
function messageDiscordChatChannel(messageString) {
|
||||
if(getServerConfig().devServer) {
|
||||
if(getServerConfig().devServer == true) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!getGlobalConfig().discord.sendChat) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -108,6 +112,10 @@ function messageDiscordEventChannel(messageString) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!getGlobalConfig().discord.sendEvents) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!getServerConfig().discord.sendEvents) {
|
||||
return false;
|
||||
}
|
||||
@@ -123,6 +131,10 @@ function messageDiscordAdminChannel(messageString) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!getGlobalConfig().discord.sendAdmin) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!getServerConfig().discord.sendAdmin) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ function forcePlayerPayDayCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
messageAdmins(`${client.name} gave ${targetClient.name} an instant payday`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} gave {ALTCOLOUR}${getPlayerName(targetClient)}{MAINCOLOUR} an instant payday`);
|
||||
playerPayDay(targetClient);
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ function setPayDayBonusMultiplier(command, params, client) {
|
||||
|
||||
getGlobalConfig().economy.grossIncomeMultiplier = newMultiplier;
|
||||
|
||||
announceAdminAction(`PaydayBonusSet`, `{adminRed}${client.name}{MAINCOLOUR}`, `{ALTCOLOUR}${newMultiplier*100}%{MAINCOLOUR}`);
|
||||
announceAdminAction(`PaydayBonusSet`, `{adminOrange}${getPlayerName(client)}{MAINCOLOUR}`, `{ALTCOLOUR}${newMultiplier*100}%{MAINCOLOUR}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -147,7 +147,7 @@ function taxInfoCommand(command, params, client) {
|
||||
|
||||
function wealthInfoCommand(command, params, client) {
|
||||
let wealth = calculateWealth(client);
|
||||
messagePlayerInfo(client, `Your wealth is: $${wealth}. Use {ALTCOLOUR}/help wealth {MAINCOLOUR}for more information.`);
|
||||
messagePlayerInfo(client, `Your wealth is: {ALTCOLOUR}$${wealth}{MAINCOLOUR}. Use {ALTCOLOUR}/help wealth {MAINCOLOUR}for more information.`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
@@ -8,12 +8,7 @@
|
||||
// ===========================================================================
|
||||
|
||||
function initEmailScript() {
|
||||
if(!checkForSMTPModule()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
logToConsole(LOG_INFO, "[VRR.Email]: Initializing email script ...");
|
||||
emailConfig = loadEmailConfiguration();
|
||||
logToConsole(LOG_INFO, "[VRR.Email]: Email script initialized successfully!");
|
||||
}
|
||||
|
||||
@@ -40,15 +35,8 @@ function sendEmail(toEmail, toName, subject, body) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function loadEmailConfiguration() {
|
||||
let emailConfigFile = loadTextFile("config/email.json");
|
||||
return JSON.parse(emailConfigFile);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getEmailConfig() {
|
||||
return emailConfig;
|
||||
return getGlobalConfig().email;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -15,35 +15,7 @@ function initEventScript() {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function addAllEventHandlers() {
|
||||
addEventHandler("onResourceStart", onResourceStart);
|
||||
addEventHandler("onResourceStop", onResourceStop);
|
||||
addEventHandler("onServerStop", onResourceStop);
|
||||
|
||||
addEventHandler("onProcess", onProcess);
|
||||
addEventHandler("onEntityProcess", onEntityProcess);
|
||||
|
||||
addEventHandler("onPlayerConnect", onPlayerConnect);
|
||||
addEventHandler("onPlayerJoin", onPlayerJoin);
|
||||
addEventHandler("onPlayerJoined", onPlayerJoined);
|
||||
addEventHandler("onPlayerChat", onPlayerChat);
|
||||
addEventHandler("onPlayerQuit", onPlayerQuit);
|
||||
addEventHandler("onElementStreamIn", onElementStreamIn);
|
||||
addEventHandler("onElementStreamOut", onElementStreamOut);
|
||||
|
||||
addEventHandler("onPedSpawn", onPedSpawn);
|
||||
addEventHandler("onPedEnterVehicle", onPedEnteringVehicle);
|
||||
addEventHandler("onPedExitVehicle", onPedExitingVehicle);
|
||||
|
||||
addEventHandler("onPedEnteringVehicle", onPedEnteringVehicle);
|
||||
addEventHandler("onPedExitingVehicle", onPedExitingVehicle);
|
||||
|
||||
//addEventHandler("OnPlayerCommand", onPlayerCommand);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function onPlayerConnect(event, ipAddress, port) {
|
||||
function onInitialConnectionToServer(ipAddress, port) {
|
||||
logToConsole(LOG_INFO, `[VRR.Event] Client connecting (IP: ${ipAddress})`);
|
||||
//if(isIpAddressBanned(ipAddress)) {
|
||||
// messagePlayerError(client, "You are banned from this server!");
|
||||
@@ -53,26 +25,33 @@ function onPlayerConnect(event, ipAddress, port) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function onPlayerJoin(event, client) {
|
||||
logToConsole(LOG_INFO, `[VRR.Event] Client ${client.name}[${client.index}] joining from ${client.ip}`);
|
||||
function onPlayerJoin(client) {
|
||||
logToConsole(LOG_INFO, `[VRR.Event] Client ${getPlayerName(client)}[${getPlayerId(client)}] joining from ${getPlayerIP(client)}`);
|
||||
|
||||
if(isFadeCameraSupported()) {
|
||||
fadeCamera(client, true, 1.0);
|
||||
}
|
||||
|
||||
messageDiscordEventChannel(`👋 ${client.name} is connecting to the server ...`);
|
||||
let messageText = `👋 ${getPlayerName(client)} is connecting to the server ...`;
|
||||
messageDiscordEventChannel(messageText);
|
||||
|
||||
let clients = getClients();
|
||||
for(let i in clients) {
|
||||
messagePlayerNormal(clients[i], getLocaleString(clients[i], "PlayerConnecting", getPlayerName(client)));
|
||||
}
|
||||
|
||||
//messageDiscordEventChannel(`👋 ${getPlayerDisplayForConsole(client)} has joined the server.`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function onPlayerJoined(event, client) {
|
||||
function onPlayerJoined(client) {
|
||||
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function onElementStreamIn(event, element, client) {
|
||||
function onElementStreamIn(element, client) {
|
||||
//if(getPlayerDimension(client) != getElementDimension(element)) {
|
||||
// event.preventDefault();
|
||||
//}
|
||||
@@ -87,29 +66,33 @@ function onElementStreamIn(event, element, client) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function onElementStreamOut(event, element, client) {
|
||||
function onElementStreamOut(element, client) {
|
||||
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function onPlayerQuit(event, client, quitReasonId) {
|
||||
function onPlayerQuit(client, quitReasonId) {
|
||||
logToConsole(LOG_INFO, `👋 Client ${getPlayerDisplayForConsole(client)} disconnected (${disconnectReasons[quitReasonId]}[${quitReasonId}])`);
|
||||
updateConnectionLogOnQuit(client, quitReasonId);
|
||||
|
||||
if(isPlayerLoggedIn(client)) {
|
||||
let reasonText = disconnectReasons[quitReasonId];
|
||||
if(getPlayerData(client).customDisconnectReason != "") {
|
||||
reasonText = getPlayerData(client).customDisconnectReason;
|
||||
}
|
||||
messagePlayerNormal(null, `👋 ${getPlayerName(client)} has left the server (${reasonText})`, getColourByName("softYellow"));
|
||||
messageDiscordEventChannel(`👋 ${client.name} has left the server (${reasonText})`);
|
||||
let reasonText = disconnectReasons[quitReasonId];
|
||||
if(getPlayerData(client).customDisconnectReason != "" && getPlayerData(client).customDisconnectReason != undefined && getPlayerData(client).customDisconnectReason != false && getPlayerData(client).customDisconnectReason != null) {
|
||||
reasonText = getPlayerData(client).customDisconnectReason;
|
||||
}
|
||||
|
||||
messageDiscordEventChannel(`👋 ${getPlayerName(client)} has left the server (${reasonText})`);
|
||||
|
||||
getClients().forEach(forClient => {
|
||||
let reasonText = getGroupedLocaleString(forClient, "DisconnectReasons", quitReasonId);
|
||||
messagePlayerNormal(forClient, getLocaleString(forClient, "PlayerLeftServer", getPlayerName(client), reasonText));
|
||||
});
|
||||
//messagePlayerNormal(null, `👋 ${getPlayerName(client)} has left the server (${reasonText})`, getColourByName("softYellow"));
|
||||
|
||||
if(isPlayerLoggedIn(client)) {
|
||||
savePlayerToDatabase(client);
|
||||
resetClientStuff(client);
|
||||
getServerData().clients[client.index] = null;
|
||||
} else {
|
||||
messageDiscordEventChannel(`👋 ${client.name} has left the server (${disconnectReasons[quitReasonId]}[${quitReasonId}])`);
|
||||
getServerData().clients[getPlayerId(client)] = null;
|
||||
}
|
||||
|
||||
clearTemporaryVehicles();
|
||||
@@ -118,14 +101,14 @@ function onPlayerQuit(event, client, quitReasonId) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
async function onPlayerChat(event, client, messageText) {
|
||||
async function onPlayerChat(client, messageText) {
|
||||
processPlayerChat(client, messageText);
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function onProcess(event, deltaTime) {
|
||||
function onProcess(deltaTime = 0) {
|
||||
updateServerGameTime();
|
||||
//checkPlayerSpawning();
|
||||
//checkPlayerPedState();
|
||||
@@ -136,12 +119,12 @@ function onProcess(event, deltaTime) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function onEntityProcess(event, entity) {
|
||||
function onEntityProcess(entity) {
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function onPedEnteringVehicle(event, ped, vehicle, seat) {
|
||||
function onPedEnteringVehicle(ped, vehicle, seat) {
|
||||
if(ped.isType(ELEMENT_PLAYER)) {
|
||||
let client = getClientFromPlayerElement(ped);
|
||||
getPlayerData(client).pedState = VRR_PEDSTATE_ENTERINGVEHICLE;
|
||||
@@ -161,8 +144,8 @@ function onPedEnteringVehicle(event, ped, vehicle, seat) {
|
||||
messagePlayerNormal(client, `🔒 This ${getVehicleName(vehicle)} is locked and you don't have the keys to unlock it`);
|
||||
}
|
||||
|
||||
getPlayerData(client).enteringVehicle = null;
|
||||
makePlayerStopAnimation(client);
|
||||
//getPlayerData(client).enteringVehicle = null;
|
||||
//makePlayerStopAnimation(client);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -172,7 +155,7 @@ function onPedEnteringVehicle(event, ped, vehicle, seat) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function onPedExitingVehicle(event, ped, vehicle) {
|
||||
function onPedExitingVehicle(ped, vehicle) {
|
||||
if(!getVehicleData(vehicle)) {
|
||||
return false;
|
||||
}
|
||||
@@ -191,40 +174,28 @@ function onPedExitingVehicle(event, ped, vehicle) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function onResourceStart(event, resource) {
|
||||
logToConsole(LOG_WARN, `[VRR.Event] ${resource.name} started!`);
|
||||
function onResourceStart(resource) {
|
||||
logToConsole(LOG_WARN, `[VRR.Event] Resource ${resource.name} started!`);
|
||||
|
||||
if(resource != thisResource) {
|
||||
messageAdmins(`{MAINCOLOUR}Resource {ALTCOLOUR}${resource.name} {MAINCOLOUR}started!`);
|
||||
messageAdmins(`{MAINCOLOUR}Resource {ALTCOLOUR}${resource.name}{MAINCOLOUR} started!`);
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function onResourceStop(event, resource) {
|
||||
logToConsole(LOG_WARN, `[VRR.Event] ${resource.name} stopped!`);
|
||||
function onResourceStop(resource) {
|
||||
logToConsole(LOG_WARN, `[VRR.Event] Resource ${resource.name} stopped!`);
|
||||
|
||||
if(resource != thisResource) {
|
||||
messageAdmins(`{MAINCOLOUR}Resource {ALTCOLOUR}${resource.name} {MAINCOLOUR}stopped!`);
|
||||
messageAdmins(`{MAINCOLOUR}Resource {ALTCOLOUR}${resource.name}{MAINCOLOUR} stopped!`);
|
||||
}
|
||||
|
||||
if(resource == thisResource) {
|
||||
saveServerDataToDatabase();
|
||||
clearArray(getServerData().vehicles);
|
||||
clearArray(getServerData().clients);
|
||||
clearArray(getServerData().businesses);
|
||||
clearArray(getServerData().houses);
|
||||
clearArray(getServerData().factions);
|
||||
clearArray(getServerData().jobs);
|
||||
clearArray(getServerData().clans);
|
||||
clearArray(getServerData().items);
|
||||
clearArray(getServerData().itemTypes);
|
||||
clearArray(getServerData().groundItemCache);
|
||||
clearArray(getServerData().groundPlantCache);
|
||||
kickAllClients();
|
||||
saveServerDataToDatabase();
|
||||
collectAllGarbage();
|
||||
}
|
||||
|
||||
collectAllGarbage();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -395,7 +366,7 @@ function onPlayerDeath(client, position) {
|
||||
setTimeout(function() {
|
||||
if(getPlayerCurrentSubAccount(client).inJail) {
|
||||
let closestJail = getClosestPoliceStation(getPlayerPosition(client));
|
||||
client.despawnPlayer();
|
||||
despawnPlayer(client);
|
||||
getPlayerCurrentSubAccount(client).interior = closestJail.interior;
|
||||
getPlayerCurrentSubAccount(client).dimension = closestJail.dimension;
|
||||
|
||||
@@ -417,7 +388,7 @@ function onPlayerDeath(client, position) {
|
||||
setPlayerControlState(client, true);
|
||||
} else {
|
||||
let closestHospital = getClosestHospital(getPlayerPosition(client));
|
||||
client.despawnPlayer();
|
||||
despawnPlayer(client);
|
||||
getPlayerCurrentSubAccount(client).interior = closestHospital.interior;
|
||||
getPlayerCurrentSubAccount(client).dimension = closestHospital.dimension;
|
||||
|
||||
@@ -441,6 +412,17 @@ function onPlayerDeath(client, position) {
|
||||
}
|
||||
}, 2000);
|
||||
}, 1000);
|
||||
|
||||
let queryData = [
|
||||
["log_death_server", getServerId()]
|
||||
["log_death_who_died", getPlayerCurrentSubAccount(client).databaseId],
|
||||
["log_death_when_died", "{UNIXTIMESTAMP}"],
|
||||
["log_death_pos_x", position.x],
|
||||
["log_death_pos_y", position.y],
|
||||
["log_death_pos_z", position.x],
|
||||
];
|
||||
let queryString = createDatabaseInsertQuery("log_death", data);
|
||||
addToQueryQueue(queryString);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -467,27 +449,27 @@ function onPlayerSpawn(client) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Event] Checking ${getPlayerDisplayForConsole(client)}'s player data`);
|
||||
if(!getPlayerData(client)) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)}'s player data is invalid. Kicking them from server.`);
|
||||
client.disconnect();
|
||||
disconnectPlayer(client);
|
||||
return false;
|
||||
}
|
||||
|
||||
logToConsole(LOG_DEBUG, `[VRR.Event] Checking ${getPlayerDisplayForConsole(client)}'s login status`);
|
||||
if(!isPlayerLoggedIn(client)) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)} is NOT logged in. Despawning their player.`);
|
||||
client.disconnect();
|
||||
disconnectPlayer(client);
|
||||
return false;
|
||||
}
|
||||
|
||||
logToConsole(LOG_DEBUG, `[VRR.Event] Checking ${getPlayerDisplayForConsole(client)}'s selected character status`);
|
||||
if(getPlayerData(client).currentSubAccount == -1) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)} has NOT selected a character. Despawning their player.`);
|
||||
client.disconnect();
|
||||
disconnectPlayer(client);
|
||||
return false;
|
||||
}
|
||||
|
||||
logToConsole(LOG_DEBUG, `[VRR.Event] ${getPlayerDisplayForConsole(client)}'s player data is valid. Continuing spawn processing ...`);
|
||||
|
||||
if(getServerGame() == VRR_GAME_GTA_IV) {
|
||||
if(getGame() == VRR_GAME_GTA_IV) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Event] Setting ${getPlayerDisplayForConsole(client)}'s ped body parts and props`);
|
||||
setEntityData(getPlayerPed(client), "vrr.bodyParts", getPlayerCurrentSubAccount(client).bodyParts, true);
|
||||
setEntityData(getPlayerPed(client), "vrr.bodyProps", getPlayerCurrentSubAccount(client).bodyProps, true);
|
||||
@@ -545,7 +527,7 @@ function onPlayerSpawn(client) {
|
||||
updatePlayerSnowState(client);
|
||||
}
|
||||
|
||||
if(areServerElementsSupported() && getServerGame() == VRR_GAME_GTA_SA) {
|
||||
if(areServerElementsSupported() && getGame() == VRR_GAME_GTA_SA) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Event] Setting player walk and fightstyle for ${getPlayerDisplayForConsole(client)}`);
|
||||
setEntityData(getPlayerPed(client), "vrr.walkStyle", getPlayerCurrentSubAccount(client).walkStyle, true);
|
||||
|
||||
@@ -572,8 +554,6 @@ function onPlayerSpawn(client) {
|
||||
sendPlayerEnterPropertyKey(client, keyId.key);
|
||||
}
|
||||
|
||||
sendPlayerLocaleStrings(client);
|
||||
|
||||
//if(isGTAIV()) {
|
||||
// setEntityData(getPlayerPed(client), "vrr.bodyPartHair", getPlayerCurrentSubAccount(client).bodyParts.hair, true);
|
||||
// setEntityData(getPlayerPed(client), "vrr.bodyPartHead", getPlayerCurrentSubAccount(client).bodyParts.head, true);
|
||||
@@ -611,6 +591,9 @@ function onPlayerSpawn(client) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Event] Updating all player name tags`);
|
||||
updateAllPlayerNameTags();
|
||||
|
||||
logToConsole(LOG_DEBUG, `[VRR.Event] Sending player nametag distance to ${getPlayerDisplayForConsole(client)}`);
|
||||
sendNameTagDistanceToClient(client, getServerConfig().nameTagDistance);
|
||||
|
||||
if(!areServerElementsSupported()) {
|
||||
sendAllBusinessesToPlayer(client);
|
||||
sendAllHousesToPlayer(client);
|
||||
@@ -622,7 +605,7 @@ function onPlayerSpawn(client) {
|
||||
|
||||
getPlayerData(client).payDayTickStart = sdl.ticks;
|
||||
|
||||
messageDiscordEventChannel(`🧍 ${client.name} spawned as ${getCharacterFullName(client)}`);
|
||||
messageDiscordEventChannel(`🧍 ${getPlayerName(client)} spawned as ${getCharacterFullName(client)}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
// TYPE: Server (JavaScript)
|
||||
// ===========================================================================
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function initFishingScript() {
|
||||
logToConsole(LOG_INFO, "[VRR.Fishing]: Initializing fishing script ...");
|
||||
logToConsole(LOG_INFO, "[VRR.Fishing]: Fishing script initialized successfully!");
|
||||
|
||||
@@ -7,6 +7,13 @@
|
||||
// TYPE: Server (JavaScript)
|
||||
// ===========================================================================
|
||||
|
||||
function initGateScript() {
|
||||
logToConsole(LOG_INFO, `[VRR.Gate]: Initializing gate script ...`);
|
||||
logToConsole(LOG_INFO, `[VRR.Gate]: Gate script initialized successfully!`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function doesPlayerHaveGateKeys(client, vehicle) {
|
||||
let gateData = getGateData(vehicle);
|
||||
|
||||
@@ -91,7 +98,7 @@ function getGateData(gateId) {
|
||||
|
||||
function getClosestGate(position) {
|
||||
let closest = 0;
|
||||
for(let i in getServerData().gates[getServerGame()]) {
|
||||
for(let i in getServerData().gates[getGame()]) {
|
||||
if(getDistance(getServerData().gates[i].position, position) < getDistance(getServerData().gates[closest].position, position)) {
|
||||
closest = i;
|
||||
}
|
||||
@@ -109,7 +116,7 @@ function triggerGateCommand(command, params, client) {
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidGate"));
|
||||
}
|
||||
|
||||
if(!canPlayerUseGate(client, closestGate)) {
|
||||
if(!doesPlayerHaveGateKeys(client, closestGate)) {
|
||||
messagePlayerError(client, getLocaleString(client, "NoGateAccess"));
|
||||
return false;
|
||||
}
|
||||
@@ -117,4 +124,103 @@ function triggerGateCommand(command, params, client) {
|
||||
triggerGate(getGateData(closestGate).scriptName);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function saveAllGatesToDatabase() {
|
||||
if(getServerConfig().devServer) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for(let i in getServerData().gates) {
|
||||
saveGateToDatabase(i);
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function saveGateToDatabase(gateId) {
|
||||
if(getGateData(gateId) == null) {
|
||||
// Invalid gate data
|
||||
return false;
|
||||
}
|
||||
|
||||
let tempGateData = getGateData(gateId);
|
||||
|
||||
if(tempGateData.databaseId == -1) {
|
||||
// Temp gate, no need to save
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!tempGateData.needsSaved) {
|
||||
// Gate hasn't changed. No need to save.
|
||||
return false;
|
||||
}
|
||||
|
||||
logToConsole(LOG_VERBOSE, `[VRR.Gate]: Saving gate ${tempGateData.databaseId} to database ...`);
|
||||
let dbConnection = connectToDatabase();
|
||||
if(dbConnection) {
|
||||
let safeGateName = escapeDatabaseString(tempGateData.name);
|
||||
let safeGateScriptName = escapeDatabaseString(tempGateData.scriptName);
|
||||
|
||||
let data = [
|
||||
["gate_server", getServerId()],
|
||||
["gate_name", safeGateName],
|
||||
["gate_script_name", safeGateScriptName],
|
||||
["gate_owner_type", toInteger(tempGateData.ownerType)],
|
||||
["gate_owner_id", toInteger(tempGateData.ownerId)],
|
||||
["gate_pos_x", toFloat(tempGateData.position.x)],
|
||||
["gate_pos_y", toFloat(tempGateData.position.y)],
|
||||
["gate_pos_z", toFloat(tempGateData.position.z)],
|
||||
["gate_radius", toFloat(tempGateData.radius)],
|
||||
];
|
||||
|
||||
let dbQuery = null;
|
||||
if(tempGateData.databaseId == 0) {
|
||||
let queryString = createDatabaseInsertQuery("gate_main", data);
|
||||
dbQuery = queryDatabase(dbConnection, queryString);
|
||||
tempGateData.databaseId = getDatabaseInsertId(dbConnection);
|
||||
tempGateData.needsSaved = false;
|
||||
} else {
|
||||
let queryString = createDatabaseUpdateQuery("gate_main", data, `gate_id=${tempGateData.databaseId}`);
|
||||
dbQuery = queryDatabase(dbConnection, queryString);
|
||||
tempGateData.needsSaved = false;
|
||||
}
|
||||
|
||||
freeDatabaseQuery(dbQuery);
|
||||
disconnectFromDatabase(dbConnection);
|
||||
return true;
|
||||
}
|
||||
logToConsole(LOG_VERBOSE, `[VRR.Gate]: Saved gate ${gateDataId} to database!`);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function loadGatesFromDatabase() {
|
||||
logToConsole(LOG_INFO, "[VRR.Gate]: Loading gates from database ...");
|
||||
|
||||
let tempGates = [];
|
||||
let dbConnection = connectToDatabase();
|
||||
let dbAssoc;
|
||||
|
||||
if(dbConnection) {
|
||||
let dbQuery = queryDatabase(dbConnection, `SELECT * FROM gate_main WHERE gate_server = ${getServerId()}`);
|
||||
if(dbQuery) {
|
||||
if(dbQuery.numRows > 0) {
|
||||
while(dbAssoc = fetchQueryAssoc(dbQuery)) {
|
||||
let tempGateData = new GateData(dbAssoc);
|
||||
tempGates.push(tempGateData);
|
||||
logToConsole(LOG_DEBUG, `[VRR.Gate]: Gate '${tempGateData.name}' loaded from database successfully!`);
|
||||
}
|
||||
}
|
||||
freeDatabaseQuery(dbQuery);
|
||||
}
|
||||
disconnectFromDatabase(dbConnection);
|
||||
}
|
||||
|
||||
logToConsole(LOG_INFO, `[VRR.Gate]: ${tempGates.length} gates loaded from database successfully!`);
|
||||
return tempGates;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -25,7 +25,7 @@ function playerPromptAnswerNo(client) {
|
||||
case VRR_PROMPT_CREATEFIRSTCHAR:
|
||||
logToConsole(LOG_DEBUG, `${getPlayerDisplayForConsole(client)} chose not to create a first character. Kicking them from the server ...`);
|
||||
showPlayerErrorGUI(client, "You don't have a character to play. Goodbye!", "No Characters");
|
||||
setTimeout(function() { client.disconnect(); }, 5000);
|
||||
setTimeout(function() { disconnectPlayer(client); }, 5000);
|
||||
break;
|
||||
|
||||
case VRR_PROMPT_BIZORDER:
|
||||
@@ -58,11 +58,12 @@ function playerPromptAnswerYes(client) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] ${getPlayerDisplayForConsole(client)} answered YES to their prompt (${getPlayerData(client).promptType})`);
|
||||
|
||||
switch(getPlayerData(client).promptType) {
|
||||
case VRR_PROMPT_CREATEFIRSTCHAR:
|
||||
case VRR_PROMPT_CREATEFIRSTCHAR: {
|
||||
showPlayerNewCharacterGUI(client);
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_PROMPT_BIZORDER:
|
||||
case VRR_PROMPT_BIZORDER: {
|
||||
if(getPlayerData(client).businessOrderAmount > 0) {
|
||||
if(getBusinessData(getPlayerData(client).businessOrderBusiness).till < getPlayerData(client).businessOrderCost) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] ${getPlayerDisplayForConsole(client)} failed to order ${getPlayerData(client).businessOrderAmount} ${getItemTypeData(getPlayerData(client).businessOrderItem).name} at ${getPlayerData(client).businessOrderCost/getPlayerData(client).businessOrderAmount} each for business ${getBusinessData(getPlayerData(client).businessOrderBusiness).name} (Reason: Not enough money in business till)`);
|
||||
@@ -82,14 +83,14 @@ function playerPromptAnswerYes(client) {
|
||||
getPlayerData(client).businessOrderBusiness = false;
|
||||
getPlayerData(client).businessOrderItem = -1;
|
||||
getPlayerData(client).businessOrderValue = -1;
|
||||
|
||||
}
|
||||
} else {
|
||||
showPlayerErrorGUI(client, ``, `Business Order Canceled`);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_PROMPT_GIVEVEHTOCLAN:
|
||||
case VRR_PROMPT_GIVEVEHTOCLAN: {
|
||||
if(!isPlayerInAnyVehicle(client)) {
|
||||
messagePlayerError(client, getLocaleString(client, "MustBeInVehicle"));
|
||||
return false;
|
||||
@@ -112,12 +113,117 @@ function playerPromptAnswerYes(client) {
|
||||
|
||||
getVehicleData(getPlayerVehicle(client)).ownerType = VRR_VEHOWNER_CLAN;
|
||||
getVehicleData(getPlayerVehicle(client)).ownerId = getPlayerCurrentSubAccount(client).clan;
|
||||
messagePlayerSuccess(client, getLocaleString(client, "GaveVehicleToClan"));
|
||||
messagePlayerSuccess(client, getLocaleString(client, "GaveVehicleToClan", getVehicleName(getPlayerVehicle(client))));
|
||||
//messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}set their {vehiclePurple}${getVehicleName(vehicle)} {MAINCOLOUR}owner to the {clanOrange}${getClanData(clanId).name} {MAINCOLOUR}clan`);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
case VRR_PROMPT_GIVEHOUSETOCLAN: {
|
||||
let houseId = getPlayerHouse(client);
|
||||
if(!houseId) {
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidHouse"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getHouseData(houseId).ownerType != VRR_VEHOWNER_PLAYER) {
|
||||
messagePlayerError(client, getLocaleString(client, "MustOwnHouse"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getHouseData(houseId).ownerId != getPlayerCurrentSubAccount(client).databaseId) {
|
||||
messagePlayerError(client, getLocaleString(client, "MustOwnHouse"));
|
||||
return false;
|
||||
}
|
||||
|
||||
getHouseData(houseId).ownerType = VRR_HOUSEOWNER_CLAN;
|
||||
getHouseData(houseId).ownerId = getPlayerCurrentSubAccount(client).clan;
|
||||
messagePlayerSuccess(client, getLocaleString(client, "GaveHouseToClan"));
|
||||
//messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}set their {vehiclePurple}${getVehicleName(vehicle)} {MAINCOLOUR}owner to the {clanOrange}${getClanData(clanId).name} {MAINCOLOUR}clan`);
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_PROMPT_GIVEBIZTOCLAN: {
|
||||
let businessId = getPlayerBusiness(client);
|
||||
if(!businessId) {
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getBusinessData(businessId).ownerType != VRR_VEHOWNER_PLAYER) {
|
||||
messagePlayerError(client, getLocaleString(client, "MustOwnBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getBusinessData(businessId).ownerId != getPlayerCurrentSubAccount(client).databaseId) {
|
||||
messagePlayerError(client, getLocaleString(client, "MustOwnBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
getBusinessData(businessId).ownerType = VRR_BIZOWNER_CLAN;
|
||||
getBusinessData(businessId).ownerId = getPlayerCurrentSubAccount(client).clan;
|
||||
messagePlayerSuccess(client, getLocaleString(client, "GaveBusinessToClan"));
|
||||
//messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}set their {vehiclePurple}${getVehicleName(vehicle)} {MAINCOLOUR}owner to the {clanOrange}${getClanData(clanId).name} {MAINCOLOUR}clan`);
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_PROMPT_BUYHOUSE: {
|
||||
let houseId = getPlayerHouse(client);
|
||||
if(!houseId) {
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidHouse"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getHouseData(houseId).buyPrice <= 0) {
|
||||
messagePlayerError(client, getLocaleString(client, "HouseNotForSale"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getPlayerCurrentSubAccount(client).cash < getHouseData(houseId).buyPrice) {
|
||||
messagePlayerError(client, getLocaleString(client, "HousePurchaseNotEnoughMoney"));
|
||||
return false;
|
||||
}
|
||||
|
||||
getHouseData(houseId).ownerType = VRR_HOUSEOWNER_PLAYER;
|
||||
getHouseData(houseId).ownerId = getPlayerCurrentSubAccount(client).databaseId;
|
||||
getHouseData(houseId).buyPrice = 0;
|
||||
getHouseData(houseId).needsSaved = true;
|
||||
updateHousePickupLabelData(houseId);
|
||||
|
||||
messagePlayerSuccess(client, `You are now the owner of {houseGreen}${getHouseData(houseId).description}`);
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_PROMPT_BUYBIZ: {
|
||||
let businessId = getPlayerBusiness(client);
|
||||
if(!businessId) {
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getBusinessData(businessId).buyPrice <= 0) {
|
||||
messagePlayerError(client, getLocaleString(client, "BusinessNotForSale"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getPlayerCurrentSubAccount(client).cash < getBusinessData(businessId).buyPrice) {
|
||||
messagePlayerError(client, getLocaleString(client, "HousePurchaseNotEnoughMoney"));
|
||||
return false;
|
||||
}
|
||||
|
||||
getBusinessData(businessId).ownerType = VRR_BIZOWNER_PLAYER;
|
||||
getBusinessData(businessId).ownerId = getPlayerCurrentSubAccount(client).databaseId;
|
||||
getBusinessData(businessId).buyPrice = 0;
|
||||
getBusinessData(businessId).needsSaved = true;
|
||||
updateBusinessPickupLabelData(businessId);
|
||||
|
||||
messagePlayerSuccess(client, `You are now the owner of {businessBlue}${getBusinessData(businessId).name}`);
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
submitBugReport(client, `[AUTOMATED REPORT] Unknown prompt type: ${getPlayerData(client).promptType}`);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
getPlayerData(client).promptType = VRR_PROMPT_NONE;
|
||||
|
||||
@@ -16,7 +16,7 @@ function initHelpScript() {
|
||||
|
||||
let randomTips = [
|
||||
`{MAINCOLOUR}Look for yellow dots on your map for job locations.`,
|
||||
`{MAINCOLOUR}You can set custom key binds. Use {ALTCOLOUR}/help keys {MAINCOLOUR} for details.`,
|
||||
`{MAINCOLOUR}You can set custom key binds. Use {ALTCOLOUR}/info keys {MAINCOLOUR} for details.`,
|
||||
`{MAINCOLOUR}Use /notips if you don't want to see tips and extra information`,
|
||||
`{MAINCOLOUR}You can edit your keybinds using {ALTCOLOUR}/bindkey and /unbindkey`,
|
||||
`{MAINCOLOUR}Press ℹ️ to see your inventory, and use number keys to select an item`,
|
||||
@@ -40,8 +40,8 @@ let randomTips = [
|
||||
//`{MAINCOLOUR}You can change your quick item display. Choices are GTAV-style pie menu or Minecraft-style hotbar`,
|
||||
//`{MAINCOLOUR}Hold [#0066FF]E {MAINCOLOUR}to hail a nearby taxi if you need a ride.`,
|
||||
//`{MAINCOLOUR}Press [#0066FF]G {MAINCOLOUR}to enter a vehicle as passenger.`,
|
||||
//`{MAINCOLOUR}Banks can provide loans. Use {ALTCOLOUR}/help loans {MAINCOLOUR} for more details.`,
|
||||
`{MAINCOLOUR}Want to make a clan? Use {ALTCOLOUR}/help clans {MAINCOLOUR} for details.`,
|
||||
//`{MAINCOLOUR}Banks can provide loans. Use {ALTCOLOUR}/info loans {MAINCOLOUR} for more details.`,
|
||||
`{MAINCOLOUR}Want to make a clan? Use {ALTCOLOUR}/info clans {MAINCOLOUR} for details.`,
|
||||
`{MAINCOLOUR}Legal weapons can be purchased at any ammunation.`,
|
||||
];
|
||||
|
||||
@@ -184,8 +184,8 @@ function helpCommand(command, params, client) {
|
||||
// ===========================================================================
|
||||
|
||||
function showMainHelpMessage(client) {
|
||||
messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderHelpMainList")));
|
||||
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Use /help <category> for commands and info. Example: {ALTCOLOUR}/help vehicle`);
|
||||
messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HelpMainListHeader")));
|
||||
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Use /info <category> for commands and info. Example: {ALTCOLOUR}/info vehicle`);
|
||||
messagePlayerNormal(client, `{clanOrange}• {MAINCOLOUR}Help Categories: [#A9A9A9]account, command, vehicle, job, chat, rules, website, animation`);
|
||||
messagePlayerNormal(client, `{clanOrange}• [#A9A9A9]skin, mechanic, dealership, discord, colour, keybind`);
|
||||
}
|
||||
@@ -205,10 +205,10 @@ function showAccountHelpMessage(client) {
|
||||
function showVehicleHelpMessage(client) {
|
||||
messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderVehicleHelp")));
|
||||
|
||||
messagePlayerHelpContent(client, getGroupedLocaleString(client, "VehicleHelp", 0, `{ALTCOLOUR}/help dealership{MAINCOLOUR}`));
|
||||
messagePlayerHelpContent(client, getGroupedLocaleString(client, "VehicleHelp", 0, `{ALTCOLOUR}/info dealership{MAINCOLOUR}`));
|
||||
messagePlayerHelpContent(client, getGroupedLocaleString(client, "VehicleHelp", 1, `{ALTCOLOUR}/lock, /engine, /lights, /trunk, /rentveh, /buyveh, /rentprice, /buyprice{MAINCOLOUR}`));
|
||||
messagePlayerHelpContent(client, getGroupedLocaleString(client, "VehicleHelp", 2));
|
||||
messagePlayerHelpContent(client, getGroupedLocaleString(client, "VehicleHelp", 3, `{ALTCOLOUR}/help mechanic{MAINCOLOUR}`));
|
||||
messagePlayerHelpContent(client, getGroupedLocaleString(client, "VehicleHelp", 3, `{ALTCOLOUR}/info mechanic{MAINCOLOUR}`));
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -249,7 +249,7 @@ function showRulesHelpMessage(client) {
|
||||
messagePlayerHelpContent(client, getGroupedLocaleString(client, "RulesHelp", 1));
|
||||
messagePlayerHelpContent(client, getGroupedLocaleString(client, "RulesHelp", 2));
|
||||
messagePlayerHelpContent(client, getGroupedLocaleString(client, "RulesHelp", 3));
|
||||
messagePlayerHelpContent(client, getGroupedLocaleString(client, "RulesHelp", 4), `{ALTCOLOUR}/help language {MAINCOLOUR}`);
|
||||
messagePlayerHelpContent(client, getGroupedLocaleString(client, "RulesHelp", 4), `{ALTCOLOUR}/info language {MAINCOLOUR}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -280,7 +280,7 @@ function showAnimationHelpMessage(client) {
|
||||
function showClothesHelpMessage(client) {
|
||||
messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderSkinHelp")));
|
||||
messagePlayerHelpContent(client, getGroupedLocaleString(client, "SkinHelp", 0, `{ALTCOLOUR}/buy {MAINCOLOUR}`));
|
||||
messagePlayerHelpContent(client, getGroupedLocaleString(client, "SkinHelp", 1, `{ALTCOLOUR}/help items {MAINCOLOUR}`));
|
||||
messagePlayerHelpContent(client, getGroupedLocaleString(client, "SkinHelp", 1, `{ALTCOLOUR}/info items {MAINCOLOUR}`));
|
||||
messagePlayerHelpContent(client, getGroupedLocaleString(client, "SkinHelp", 2));
|
||||
}
|
||||
|
||||
@@ -380,7 +380,7 @@ function showCommandHelpMessage(client, commandName) {
|
||||
*
|
||||
*/
|
||||
function helpGetCarCommand(command, params, client) {
|
||||
messagePlayerAlert(client, getLocaleString(client, "CarCommandHelp", `{ALTCOLOUR}/help vehicle{MAINCOLOUR}`));
|
||||
messagePlayerAlert(client, getLocaleString(client, "CarCommandHelp", `{ALTCOLOUR}/info vehicle{MAINCOLOUR}`));
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -395,7 +395,7 @@ function helpGetCarCommand(command, params, client) {
|
||||
*
|
||||
*/
|
||||
function helpGetSkinCommand(command, params, client) {
|
||||
messagePlayerAlert(client, getLocaleString(client, "SkinCommandHelp", `{ALTCOLOUR}/help skin{MAINCOLOUR}`));
|
||||
messagePlayerAlert(client, getLocaleString(client, "SkinCommandHelp", `{ALTCOLOUR}/info skin{MAINCOLOUR}`));
|
||||
messagePlayerAlert(client, ``);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,19 +9,6 @@
|
||||
|
||||
function initHouseScript() {
|
||||
logToConsole(LOG_INFO, "[VRR.House]: Initializing house script ...");
|
||||
if(!getServerConfig().devServer) {
|
||||
getServerData().houses = loadHousesFromDatabase();
|
||||
}
|
||||
|
||||
if(getServerConfig().createHousePickups) {
|
||||
createAllHousePickups();
|
||||
}
|
||||
|
||||
if(getServerConfig().createHouseBlips) {
|
||||
createAllHouseBlips();
|
||||
}
|
||||
|
||||
setAllHouseIndexes();
|
||||
logToConsole(LOG_INFO, "[VRR.House]: House script initialized successfully!");
|
||||
return true;
|
||||
}
|
||||
@@ -35,11 +22,15 @@ function loadHousesFromDatabase() {
|
||||
let dbAssoc;
|
||||
|
||||
if(dbConnection) {
|
||||
dbAssoc = await fetchQueryAssoc(dbConnection, `SELECT * FROM house_main WHERE house_server = ${getServerId()}`);
|
||||
for(let i in dbAssoc) {
|
||||
let tempHouseData = new HouseData(dbAssoc[i]);
|
||||
tempHouses.push(tempHouseData);
|
||||
logToConsole(LOG_VERBOSE, `[VRR.House]: House '${tempHouseData.description}' (ID ${tempHouseData.databaseId}) loaded!`);
|
||||
let dbQuery = queryDatabase(dbConnection, `SELECT * FROM house_main WHERE house_server = ${getServerId()}`);
|
||||
if(dbQuery) {
|
||||
if(dbQuery.numRows > 0) {
|
||||
while(dbAssoc = fetchQueryAssoc(dbQuery)) {
|
||||
let tempHouseData = new HouseData(dbAssoc);
|
||||
tempHouses.push(tempHouseData);
|
||||
logToConsole(LOG_VERBOSE, `[VRR.House]: House '${tempHouseData.description}' (ID ${tempHouseData.databaseId}) loaded!`);
|
||||
}
|
||||
}
|
||||
freeDatabaseQuery(dbQuery);
|
||||
}
|
||||
disconnectFromDatabase(dbConnection);
|
||||
@@ -60,70 +51,13 @@ function loadHousesFromDatabase() {
|
||||
*
|
||||
*/
|
||||
function createHouseCommand(command, params, client) {
|
||||
let entranceLocation = new HouseLocationData(false);
|
||||
entranceLocation.entrancePosition = getPlayerPosition(client);
|
||||
entranceLocation.entranceRotation = 0.0;
|
||||
entranceLocation.entrancePickupModel = getGameConfig().pickupModels[getServerGame()].House;
|
||||
entranceLocation.entranceBlipModel = getGameConfig().blipSprites[getServerGame()].House;
|
||||
entranceLocation.entranceInterior = 0;
|
||||
entranceLocation.entranceDimension = 0;
|
||||
|
||||
entranceLocation.exitPosition = toVector3(0.0, 0.0, 0.0);
|
||||
entranceLocation.exitRotation = 0.0;
|
||||
entranceLocation.exitPickupModel = getGameConfig().pickupModels[getServerGame()].Exit;
|
||||
entranceLocation.exitBlipModel = -1;
|
||||
entranceLocation.exitInterior = 0;
|
||||
entranceLocation.exitDimension = 0;
|
||||
|
||||
let tempHouseData = createHouse(params, entranceLocation);
|
||||
let houseId = getServerData().houses.push(tempHouseData);
|
||||
|
||||
saveHouseToDatabase(houseId-1);
|
||||
setAllHouseIndexes();
|
||||
|
||||
createHouseEntrancePickup(houseId-1);
|
||||
createHouseExitPickup(houseId-1);
|
||||
createHouseEntranceBlip(houseId-1);
|
||||
createHouseExitBlip(houseId-1);
|
||||
|
||||
//getHouseData(houseId).needsSaved = true;
|
||||
|
||||
let messageText = `{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}created house {houseGreen}${tempHouseData.description}`;
|
||||
logToConsole(LOG_INFO, messageText);
|
||||
messageAdmins(messageText);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
/**
|
||||
* This is a command handler function.
|
||||
*
|
||||
* @param {string} command - The command name used by the player
|
||||
* @param {string} params - The parameters/args string used with the command by the player
|
||||
* @param {Client} client - The client/player that used the command
|
||||
* @return {bool} Whether or not the command was successful
|
||||
*
|
||||
*/
|
||||
function lockUnlockHouseCommand(command, params, client) {
|
||||
let houseId = getPlayerHouse(client);
|
||||
|
||||
if(!getHouseData(houseId)) {
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidHouse"));
|
||||
if(areParamsEmpty(params)) {
|
||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||
return false;
|
||||
}
|
||||
|
||||
getHouseData(houseId).locked = !getHouseData(houseId).locked;
|
||||
|
||||
//for(let i in getHouseData(houseId).locations) {
|
||||
// if(getHouseData(houseId).locations[i].type == VRR_HOUSE_LOC_DOOR) {
|
||||
// setEntityData(getHouseData(houseId).locations[i].entrancePickup, "vrr.label.locked", getHouseData(houseId).locked, true);
|
||||
// }
|
||||
//}
|
||||
|
||||
setEntityData(getHouseData(houseId).entrancePickup, "vrr.label.locked", getHouseData(houseId).locked, true);
|
||||
getHouseData(houseId).needsSaved = true;
|
||||
|
||||
messagePlayerSuccess(client, `House {houseGreen}${getHouseData(houseId).description} {MAINCOLOUR}${getLockedUnlockedFromBool((getHouseData(houseId).locked))}!`);
|
||||
createHouse(params, getPlayerPosition(client), toVector3(0.0, 0.0, 0.0), getGameConfig().pickupModels[getGame()].House, -1, getPlayerInterior(client), getPlayerDimension(client), getPlayerData(client).interiorCutscene);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} created house: {houseGreen}${params}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -177,17 +111,11 @@ function setHouseDescriptionCommand(command, params, client) {
|
||||
let oldDescription = getHouseData(houseId).description;
|
||||
getHouseData(houseId).description = newHouseDescription;
|
||||
|
||||
//for(let i in getHouseData(houseId).locations) {
|
||||
// if(getHouseData(houseId).locations[i].type == VRR_HOUSE_LOC_DOOR) {
|
||||
// setEntityData(getHouseData(houseId).entrancePickup, "vrr.label.name", getHouseData(houseId).description, true);
|
||||
// }
|
||||
//}
|
||||
|
||||
setEntityData(getHouseData(houseId).entrancePickup, "vrr.label.name", getHouseData(houseId).description, true);
|
||||
|
||||
getHouseData(houseId).needsSaved = true;
|
||||
|
||||
messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}renamed house {houseGreen}${oldDescription} {MAINCOLOUR}to {houseGreen}${getHouseData(houseId).description}`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} renamed house {houseGreen}${oldDescription}{MAINCOLOUR} to {houseGreen}${getHouseData(houseId).description}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -225,8 +153,39 @@ function setHouseOwnerCommand(command, params, client) {
|
||||
getHouseData(houseId).needsSaved = true;
|
||||
|
||||
getHouseData(houseId).ownerType = VRR_HOUSEOWNER_PLAYER;
|
||||
getHouseData(houseId).ownerId = getServerData().clients[newHouseOwner.index].accountData.databaseId;
|
||||
messagePlayerSuccess(`{MAINCOLOUR}You gave house {houseGreen}${getHouseData(houseId).description} {MAINCOLOUR}to {ALTCOLOUR}${newHouseOwner.name}`);
|
||||
getHouseData(houseId).ownerId = getPlayerCurrentSubAccount(newHouseOwner).databaseId;
|
||||
messagePlayerSuccess(`{MAINCOLOUR}You gave house {houseGreen}${getHouseData(houseId).description}{MAINCOLOUR} to {ALTCOLOUR}${newHouseOwner.name}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* This is a command handler function.
|
||||
*
|
||||
* @param {string} command - The command name used by the player
|
||||
* @param {string} params - The parameters/args string used with the command by the player
|
||||
* @param {Client} client - The client/player that used the command
|
||||
* @return {bool} Whether or not the command was successful
|
||||
*
|
||||
*/
|
||||
function removeHouseOwnerCommand(command, params, client) {
|
||||
let houseId = getPlayerHouse(client);
|
||||
|
||||
if(!getHouseData(houseId)) {
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidHouse"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageHouses"))) {
|
||||
if(getHouseData(houseId).ownerType == VRR_HOUSEOWNER_PLAYER && getHouseData(houseId).ownerId == getPlayerCurrentSubAccount(client).databaseId) {
|
||||
messagePlayerError(client, getLocaleString(client, "CantModifyHouse"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
getHouseData(houseId).ownerType = VRR_HOUSEOWNER_NONE;
|
||||
getHouseData(houseId).ownerId = -1;
|
||||
getHouseData(houseId).needsSaved = true;
|
||||
|
||||
messagePlayerSuccess(client, `{MAINCOLOUR}You removed house {houseGreen}${getHouseData(houseId).description}'s{MAINCOLOUR} owner`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -255,18 +214,20 @@ function setHouseClanCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageHouses"))) {
|
||||
if(getHouseData(houseId).ownerType == VRR_HOUSEOWNER_PLAYER && getHouseData(houseId).ownerId == getPlayerCurrentSubAccount(client).databaseId) {
|
||||
messagePlayerError(client, getLocaleString(client, "CantModifyHouse"));
|
||||
return false;
|
||||
}
|
||||
if(getHouseData(houseId).ownerType != VRR_VEHOWNER_PLAYER) {
|
||||
messagePlayerError(client, getLocaleString(client, "MustOwnHouse"));
|
||||
return false;
|
||||
}
|
||||
|
||||
getHouseData(houseId).needsSaved = true;
|
||||
if(getHouseData(houseId).ownerId != getPlayerCurrentSubAccount(client).databaseId) {
|
||||
messagePlayerError(client, getLocaleString(client, "MustOwnHouse"));
|
||||
return false;
|
||||
}
|
||||
|
||||
getHouseData(houseId).ownerType = VRR_HOUSEOWNER_CLAN;
|
||||
getHouseData(houseId).ownerId = getClanData(clanId).databaseId;
|
||||
messagePlayerSuccess(`{MAINCOLOUR}You gave house {houseGreen}${getHouseData(houseId).description} {MAINCOLOUR} to the {clanOrange}${getClanData(clanId).name} {MAINCOLOUR}clan!`);
|
||||
showPlayerPrompt(client, getLocaleString(client, "SetHouseClanConfirmMessage"), getLocaleString(client, "SetHouseClanConfirmTitle"), getLocaleString(client, "Yes"), getLocaleString(client, "No"));
|
||||
getPlayerData(client).promptType = VRR_PROMPT_HOUSEGIVETOCLAN;
|
||||
|
||||
//messagePlayerSuccess(`{MAINCOLOUR}You gave house {houseGreen}${getHouseData(houseId).description}{MAINCOLOUR} to the {clanOrange}${getClanData(clanId).name} {MAINCOLOUR}clan!`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -295,23 +256,6 @@ function setHouseClanCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let clanRankId = getClanRankFromParams(clanId, params);
|
||||
|
||||
if(!getClanRankData(clanId, clanRankId)) {
|
||||
messagePlayerError(client, getLocaleString(client, "ClanRankInvalid"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(doesPlayerHaveClanPermission(client, getClanFlagValue("ManageHouses"))) {
|
||||
messagePlayerError(client, getLocaleString(client, "CantModifyHouse"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getClanRankData(clanId, clanRankId).level > getPlayerCurrentSubAccount(client).clanRank) {
|
||||
messagePlayerError(client, "That rank is above your level!");
|
||||
return false;
|
||||
}
|
||||
|
||||
getHouseData(houseId).clanRank = getClanRankData(clanId, clanRankId).level;
|
||||
getHouseData(houseId).needsSaved = true;
|
||||
messagePlayerSuccess(`{MAINCOLOUR}You set house {houseGreen}${getHouseData(houseId).description}{MAINCOLOUR}'s clan rank to {clanOrange}${getClanRankData(clanId, clanRankId).name} {MAINCOLOUR}(level ${getClanRankData(clanId, clanRankId).level}) and above!`);
|
||||
@@ -341,9 +285,9 @@ function setHousePickupCommand(command, params, client) {
|
||||
if(toLowerCase(typeParam) == "None") {
|
||||
getHouseData(houseId).entrancePickupModel = -1;
|
||||
} else {
|
||||
if(isNull(getGameConfig().pickupModels[getServerGame()][typeParam])) {
|
||||
if(isNull(getGameConfig().pickupModels[getGame()][typeParam])) {
|
||||
messagePlayerError(client, "Invalid pickup type! Use a pickup type name or a model ID");
|
||||
let pickupTypes = Object.keys(getGameConfig().pickupModels[getServerGame()]);
|
||||
let pickupTypes = Object.keys(getGameConfig().pickupModels[getGame()]);
|
||||
let chunkedList = splitArrayIntoChunks(pickupTypes, 10);
|
||||
|
||||
messagePlayerNormal(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderPickupTypes")));
|
||||
@@ -353,7 +297,7 @@ function setHousePickupCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
getHouseData(houseId).entrancePickupModel = getGameConfig().pickupModels[getServerGame()][typeParam];
|
||||
getHouseData(houseId).entrancePickupModel = getGameConfig().pickupModels[getGame()][typeParam];
|
||||
}
|
||||
} else {
|
||||
getHouseData(houseId).entrancePickupModel = toInteger(typeParam);
|
||||
@@ -364,7 +308,7 @@ function setHousePickupCommand(command, params, client) {
|
||||
|
||||
getHouseData(houseId).needsSaved = true;
|
||||
|
||||
messageAdmins(`{ALTCOLOUR}${client.name} {MAINCOLOUR}set house {houseGreen}${getHouseData(houseId).description} {MAINCOLOUR}pickup display to {ALTCOLOUR}${toLowerCase(typeParam)}`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} set house {houseGreen}${getHouseData(houseId).description}{MAINCOLOUR} pickup display to {ALTCOLOUR}${toLowerCase(typeParam)}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -387,6 +331,11 @@ function setHouseInteriorTypeCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(typeof getGameConfig().interiors[getGame()] == "undefined") {
|
||||
messagePlayerError(client, `There are no interiors available for this game!`);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(isNaN(typeParam)) {
|
||||
let tempHouseLocation = new HouseLocationData(false);
|
||||
|
||||
@@ -395,13 +344,13 @@ function setHouseInteriorTypeCommand(command, params, client) {
|
||||
tempHouseLocation.exitInterior = -1;
|
||||
getHouseData(houseId).exitPickupModel = -1;
|
||||
getHouseData(houseId).hasInterior = false;
|
||||
messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}removed house {houseGreen}${getHouseData(houseId).description} {MAINCOLOUR}interior`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} removed house {houseGreen}${getHouseData(houseId).description}{MAINCOLOUR} interior`);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(isNull(getGameConfig().interiors[getServerGame()][typeParam])) {
|
||||
if(isNull(getGameConfig().interiors[getGame()][typeParam])) {
|
||||
messagePlayerError(client, "Invalid interior type! Use an interior type name");
|
||||
let interiorTypesList = Object.keys(getGameConfig().interiors[getServerGame()]);
|
||||
let interiorTypesList = Object.keys(getGameConfig().interiors[getGame()]);
|
||||
let chunkedList = splitArrayIntoChunks(interiorTypesList, 10);
|
||||
|
||||
messagePlayerNormal(client, makeChatBoxSectionHeader("InteriorTypes"));
|
||||
@@ -411,10 +360,10 @@ function setHouseInteriorTypeCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
getHouseData(houseId).exitPosition = getGameConfig().interiors[getServerGame()][typeParam][0];
|
||||
getHouseData(houseId).exitInterior = getGameConfig().interiors[getServerGame()][typeParam][1];
|
||||
getHouseData(houseId).exitPosition = getGameConfig().interiors[getGame()][typeParam][0];
|
||||
getHouseData(houseId).exitInterior = getGameConfig().interiors[getGame()][typeParam][1];
|
||||
getHouseData(houseId).exitDimension = getHouseData(houseId).databaseId+getGlobalConfig().houseDimensionStart;
|
||||
getHouseData(houseId).exitPickupModel = getGameConfig().pickupModels[getServerGame()].Exit;
|
||||
getHouseData(houseId).exitPickupModel = getGameConfig().pickupModels[getGame()].Exit;
|
||||
getHouseData(houseId).hasInterior = true;
|
||||
}
|
||||
|
||||
@@ -425,7 +374,7 @@ function setHouseInteriorTypeCommand(command, params, client) {
|
||||
|
||||
getHouseData(houseId).needsSaved = true;
|
||||
|
||||
messageAdmins(`{ALTCOLOUR}${client.name} {MAINCOLOUR}set house {houseGreen}${getHouseData(houseId).description} {MAINCOLOUR}interior type to {ALTCOLOUR}${toLowerCase(typeParam)}`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} set house {houseGreen}${getHouseData(houseId).description}{MAINCOLOUR} interior type to {ALTCOLOUR}${toLowerCase(typeParam)}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -452,8 +401,8 @@ function setHouseBlipCommand(command, params, client) {
|
||||
if(toLowerCase(typeParam) == "None") {
|
||||
getHouseData(houseId).entranceBlipModel = -1;
|
||||
} else {
|
||||
if(isNull(getGameConfig().blipSprites[getServerGame()][typeParam])) {
|
||||
let blipTypes = Object.keys(getGameConfig().blipSprites[getServerGame()]);
|
||||
if(isNull(getGameConfig().blipSprites[getGame()][typeParam])) {
|
||||
let blipTypes = Object.keys(getGameConfig().blipSprites[getGame()]);
|
||||
let chunkedList = splitArrayIntoChunks(blipTypes, 10);
|
||||
|
||||
messagePlayerNormal(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderBlipTypes")));
|
||||
@@ -463,7 +412,7 @@ function setHouseBlipCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
getHouseData(houseId).entranceBlipModel = getGameConfig().blipSprites[getServerGame()][typeParam];
|
||||
getHouseData(houseId).entranceBlipModel = getGameConfig().blipSprites[getGame()][typeParam];
|
||||
}
|
||||
} else {
|
||||
getHouseData(houseId).entranceBlipModel = toInteger(typeParam);
|
||||
@@ -476,7 +425,7 @@ function setHouseBlipCommand(command, params, client) {
|
||||
resetHouseBlips(houseId);
|
||||
getHouseData(houseId).needsSaved = true;
|
||||
|
||||
messageAdmins(`{ALTCOLOUR}${client.name} {MAINCOLOUR}set house {houseGreen}${getHouseData(houseId).description} {MAINCOLOUR}blip display to {ALTCOLOUR}${toLowerCase(typeParam)}`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} set house {houseGreen}${getHouseData(houseId).description}{MAINCOLOUR} blip display to {ALTCOLOUR}${toLowerCase(typeParam)}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -494,7 +443,7 @@ function moveHouseEntranceCommand(command, params, client) {
|
||||
let houseId = getPlayerHouse(client);
|
||||
|
||||
if(!getHouseData(houseId)) {
|
||||
messagePlayer(client, getLocaleString(client, "InvalidHouse"));
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidHouse"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -512,7 +461,7 @@ function moveHouseEntranceCommand(command, params, client) {
|
||||
|
||||
getHouseData(houseId).needsSaved = true;
|
||||
|
||||
messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}moved house {houseGreen}${getHouseData(houseId).description} {MAINCOLOUR}entrance to their position`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} moved house {houseGreen}${getHouseData(houseId).description}{MAINCOLOUR} entrance to their position`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -527,10 +476,10 @@ function moveHouseEntranceCommand(command, params, client) {
|
||||
*
|
||||
*/
|
||||
function moveHouseExitCommand(command, params, client) {
|
||||
let houseId = getPlayerHouse(client);
|
||||
let houseId = getClosestHouseEntrance(getPlayerPosition(client), getPlayerDimension(client));
|
||||
|
||||
if(!getHouseData(houseId)) {
|
||||
messagePlayer(client, getLocaleString(client, "InvalidHouse"));
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidHouse"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -552,7 +501,7 @@ function moveHouseExitCommand(command, params, client) {
|
||||
|
||||
getHouseData(houseId).needsSaved = true;
|
||||
|
||||
messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}moved house {houseGreen}${getHouseData(houseId).description} {MAINCOLOUR}exit to their position`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} moved house {houseGreen}${getHouseData(houseId).description}{MAINCOLOUR} exit to their position`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -574,7 +523,7 @@ function deleteHouseCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}deleted house {houseGreen}${getHouseData(houseId).description}`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} deleted house {houseGreen}${getHouseData(houseId).description}`);
|
||||
deleteHouse(houseId, getPlayerData(client).accountData.databaseId);
|
||||
}
|
||||
|
||||
@@ -622,10 +571,8 @@ function deleteHouse(houseId, whoDeleted = 0) {
|
||||
* @return {bool} Whether or not the player was successfully removed from the house
|
||||
*
|
||||
*/
|
||||
function removePlayerFromHouses(client) {
|
||||
if(isPlayerInAnyHouse(client)) {
|
||||
exitHouse(client);
|
||||
}
|
||||
function removePlayerFromHouse(client) {
|
||||
exitHouse(client);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -638,25 +585,37 @@ function removePlayerFromHouses(client) {
|
||||
* @return {bool} Whether or not the player was successfully removed from the house
|
||||
*
|
||||
*/
|
||||
function createHouse(description, entranceLocation) {
|
||||
function createHouse(description, entrancePosition, exitPosition, entrancePickupModel = -1, entranceBlipModel = -1, entranceInterior = 0, entranceDimension = 0, entranceCutscene = -1) {
|
||||
let tempHouseData = new HouseData(false);
|
||||
tempHouseData.description = description;
|
||||
|
||||
tempHouseData.entrancePosition = entranceLocation.entrancePosition;
|
||||
tempHouseData.entranceRotation = entranceLocation.entranceRotation;
|
||||
tempHouseData.entrancePickupModel = entranceLocation.entrancePickupModel;
|
||||
tempHouseData.entranceBlipModel = entranceLocation.entranceBlipModel;
|
||||
tempHouseData.entranceInterior = entranceLocation.entranceInterior;
|
||||
tempHouseData.entranceDimension = entranceLocation.entranceDimension;
|
||||
tempHouseData.entrancePosition = entrancePosition;
|
||||
tempHouseData.entranceRotation = 0.0;
|
||||
tempHouseData.entrancePickupModel = entrancePickupModel;
|
||||
tempHouseData.entranceBlipModel = entranceBlipModel;
|
||||
tempHouseData.entranceInterior = entranceInterior;
|
||||
tempHouseData.entranceDimension = entranceDimension;
|
||||
tempHouseData.entranceCutscene = entranceCutscene;
|
||||
|
||||
tempHouseData.exitPosition = entranceLocation.exitPosition;
|
||||
tempHouseData.exitRotation = entranceLocation.exitRotation;
|
||||
tempHouseData.exitPickupModel = entranceLocation.exitPickupModel;
|
||||
tempHouseData.exitBlipModel = entranceLocation.exitBlipModel;
|
||||
tempHouseData.exitInterior = entranceLocation.exitInterior;
|
||||
tempHouseData.entranceDimension = entranceLocation.entranceDimension;
|
||||
tempHouseData.exitPosition = exitPosition;
|
||||
tempHouseData.exitRotation = 0.0;
|
||||
tempHouseData.exitPickupModel = 0;
|
||||
tempHouseData.exitBlipModel = -1;
|
||||
tempHouseData.exitInterior = 0;
|
||||
tempHouseData.exitDimension = 0;
|
||||
tempHouseData.exitCutscene = -1;
|
||||
|
||||
return tempHouseData;
|
||||
tempHouseData.needsSaved = true;
|
||||
|
||||
let houseId = getServerData().houses.push(tempHouseData);
|
||||
|
||||
saveHouseToDatabase(houseId-1);
|
||||
setHouseDataIndexes();
|
||||
|
||||
createHousePickups(houseId-1);
|
||||
createHouseBlips(houseId-1);
|
||||
|
||||
return houseId-1;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -700,14 +659,21 @@ function getClosestHouseExit(position, dimension) {
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerHouse(client) {
|
||||
let closestEntrance = getClosestHouseEntrance(getPlayerPosition(client), getPlayerDimension(client));
|
||||
if(getDistance(getPlayerPosition(client), getHouseData(closestEntrance).entrancePosition) <= getGlobalConfig().enterPropertyDistance) {
|
||||
return getHouseData(closestEntrance).index
|
||||
}
|
||||
if(getPlayerDimension(client) == getGameConfig().mainWorldDimension[getGame()]) {
|
||||
let closestEntrance = getClosestHouseEntrance(getPlayerPosition(client), getPlayerDimension(client));
|
||||
if(getDistance(getPlayerPosition(client), getHouseData(closestEntrance).entrancePosition) <= getGlobalConfig().enterPropertyDistance) {
|
||||
return getHouseData(closestEntrance).index;
|
||||
}
|
||||
} else {
|
||||
let closestEntrance = getClosestHouseEntrance(getPlayerPosition(client), getPlayerDimension(client));
|
||||
if(getDistance(getPlayerPosition(client), getHouseData(closestEntrance).entrancePosition) <= getGlobalConfig().enterPropertyDistance) {
|
||||
return getHouseData(closestEntrance).index;
|
||||
}
|
||||
|
||||
for(let i in getServerData().houses) {
|
||||
if(getServerData().houses[i].exitDimension == getPlayerDimension(client)) {
|
||||
return i;
|
||||
for(let i in getServerData().houses) {
|
||||
if(getServerData().houses[i].hasInterior && getServerData().houses[i].exitDimension == getPlayerDimension(client)) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -716,7 +682,7 @@ function getPlayerHouse(client) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function saveHousesToDatabase() {
|
||||
function saveAllHousesToDatabase() {
|
||||
if(getServerConfig().devServer) {
|
||||
return false;
|
||||
}
|
||||
@@ -735,12 +701,14 @@ function saveHousesToDatabase() {
|
||||
function saveHouseToDatabase(houseId) {
|
||||
let tempHouseData = getServerData().houses[houseId];
|
||||
|
||||
if(!tempHouseData.needsSaved) {
|
||||
return false;
|
||||
}
|
||||
|
||||
logToConsole(LOG_VERBOSE, `[VRR.House]: Saving house '${tempHouseData.databaseId}' to database ...`);
|
||||
let dbConnection = connectToDatabase();
|
||||
if(dbConnection) {
|
||||
let safeHouseDescription = escapeDatabaseString(dbConnection, tempHouseData.description);
|
||||
let safeExitCutscene = escapeDatabaseString(dbConnection, tempHouseData.exitCutscene);
|
||||
let safeEntranceCutscene = escapeDatabaseString(dbConnection, tempHouseData.entranceCutscene);
|
||||
|
||||
let data = [
|
||||
["house_server", getServerId()],
|
||||
@@ -757,7 +725,7 @@ function saveHouseToDatabase(houseId) {
|
||||
["house_entrance_vw", tempHouseData.entranceDimension],
|
||||
["house_entrance_pickup", tempHouseData.entrancePickupModel],
|
||||
["house_entrance_blip", tempHouseData.entranceBlipModel],
|
||||
["house_entrance_cutscene", safeEntranceCutscene],
|
||||
["house_entrance_cutscene", tempHouseData.entranceCutscene],
|
||||
["house_exit_pos_x", tempHouseData.exitPosition.x],
|
||||
["house_exit_pos_y", tempHouseData.exitPosition.y],
|
||||
["house_exit_pos_z", tempHouseData.exitPosition.z],
|
||||
@@ -766,12 +734,12 @@ function saveHouseToDatabase(houseId) {
|
||||
["house_exit_vw", tempHouseData.exitDimension],
|
||||
["house_exit_pickup", tempHouseData.exitPickupModel],
|
||||
["house_exit_blip", tempHouseData.exitBlipModel],
|
||||
["house_exit_cutscene", safeExitCutscene],
|
||||
["house_exit_cutscene", tempHouseData.exitCutscene],
|
||||
["house_buy_price", tempHouseData.buyPrice],
|
||||
["house_rent_price", tempHouseData.rentPrice],
|
||||
["house_has_interior", boolToInt(tempHouseData.hasInterior)],
|
||||
["house_interior_lights", boolToInt(tempHouseData.interiorLights)],
|
||||
|
||||
["house_custom_interior", boolToInt(tempHouseData.customInterior)],
|
||||
];
|
||||
|
||||
let dbQuery = null;
|
||||
@@ -800,6 +768,10 @@ function saveHouseToDatabase(houseId) {
|
||||
function saveHouseLocationToDatabase(houseId, locationId) {
|
||||
let tempHouseLocationData = getServerData().houses[houseId].locations[locationId];
|
||||
|
||||
if(!tempHouseLocationData.needsSaved) {
|
||||
return false;
|
||||
}
|
||||
|
||||
logToConsole(LOG_VERBOSE, `[VRR.House]: Saving house location '${locationId}' for house '${getHouseData(houseId).databaseId}' to database ...`);
|
||||
let dbConnection = connectToDatabase();
|
||||
if(dbConnection) {
|
||||
@@ -869,31 +841,43 @@ function createAllHouseBlips() {
|
||||
// ===========================================================================
|
||||
|
||||
function createHouseEntrancePickup(houseId) {
|
||||
if(!areServerElementsSupported()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!getServerConfig().createHousePickups) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getHouseData(houseId).entrancePickupModel != -1) {
|
||||
let pickupModelId = getGameConfig().pickupModels[getServerGame()].House;
|
||||
if(!getHouseData(houseId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getServerData().houses[houseId].entrancePickupModel != 0) {
|
||||
pickupModelId = getHouseData(houseId).entrancePickupModel;
|
||||
}
|
||||
let houseData = getHouseData(houseId);
|
||||
|
||||
if(areServerElementsSupported()) {
|
||||
let entrancePickup = createGamePickup(pickupModelId, getHouseData(houseId).entrancePosition, getGameConfig().pickupTypes[getServerGame()].house);
|
||||
if(entrancePickup != null) {
|
||||
setElementOnAllDimensions(entrancePickup, false);
|
||||
setElementDimension(entrancePickup, getHouseData(houseId).entranceDimension);
|
||||
setElementStreamInDistance(entrancePickup, getGlobalConfig().housePickupStreamInDistance);
|
||||
setElementStreamOutDistance(entrancePickup, getGlobalConfig().housePickupStreamOutDistance);
|
||||
setElementTransient(entrancePickup, false);
|
||||
addToWorld(entrancePickup);
|
||||
//if(houseData.hasInterior) {
|
||||
// return false;
|
||||
//}
|
||||
|
||||
getHouseData(houseId).entrancePickup = entrancePickup;
|
||||
updateHousePickupLabelData(houseId);
|
||||
}
|
||||
}
|
||||
if(houseData.entrancePickupModel == -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let pickupModelId = getGameConfig().pickupModels[getGame()].House;
|
||||
|
||||
if(getServerData().houses[houseId].entrancePickupModel != 0) {
|
||||
pickupModelId = getHouseData(houseId).entrancePickupModel;
|
||||
}
|
||||
|
||||
let entrancePickup = createGamePickup(pickupModelId, getHouseData(houseId).entrancePosition, getGameConfig().pickupTypes[getGame()].house);
|
||||
if(entrancePickup != null) {
|
||||
setElementOnAllDimensions(entrancePickup, false);
|
||||
setElementDimension(entrancePickup, getHouseData(houseId).entranceDimension);
|
||||
setElementStreamInDistance(entrancePickup, getGlobalConfig().housePickupStreamInDistance);
|
||||
setElementStreamOutDistance(entrancePickup, getGlobalConfig().housePickupStreamOutDistance);
|
||||
setElementTransient(entrancePickup, false);
|
||||
|
||||
getHouseData(houseId).entrancePickup = entrancePickup;
|
||||
updateHousePickupLabelData(houseId);
|
||||
}
|
||||
}
|
||||
@@ -901,100 +885,150 @@ function createHouseEntrancePickup(houseId) {
|
||||
// ===========================================================================
|
||||
|
||||
function createHouseEntranceBlip(houseId) {
|
||||
if(!areServerElementsSupported()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!getServerConfig().createHouseBlips) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getHouseData(houseId).entranceBlipModel != -1) {
|
||||
let blipModelId = getGameConfig().blipSprites[getServerGame()].House;
|
||||
if(!getHouseData(houseId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getServerData().houses[houseId].entranceBlipModel != 0) {
|
||||
blipModelId = getHouseData(houseId).entranceBlipModel;
|
||||
let houseData = getHouseData(houseId);
|
||||
|
||||
//if(houseData.hasInterior) {
|
||||
// return false;
|
||||
//}
|
||||
|
||||
if(houseData.entranceBlipModel == -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let blipModelId = getGameConfig().blipSprites[getGame()].House;
|
||||
if(getServerData().houses[houseId].entranceBlipModel != 0) {
|
||||
blipModelId = getHouseData(houseId).entranceBlipModel;
|
||||
}
|
||||
|
||||
let entranceBlip = createGameBlip(houseData.entrancePosition, blipModelId, getColourByName("houseGreen"));
|
||||
if(entranceBlip != null) {
|
||||
if(houseData.exitDimension != -1) {
|
||||
setElementDimension(entranceBlip, houseData.entranceDimension);
|
||||
setElementOnAllDimensions(entranceBlip, false);
|
||||
} else {
|
||||
setElementOnAllDimensions(entranceBlip, true);
|
||||
}
|
||||
|
||||
if(areServerElementsSupported()) {
|
||||
let entranceBlip = createGameBlip(getHouseData(houseId).entrancePosition, blipModelId, 1, getColourByName("houseGreen"));
|
||||
if(entranceBlip != null) {
|
||||
setElementDimension(entranceBlip, getHouseData(houseId).entranceDimension);
|
||||
setElementOnAllDimensions(entranceBlip, false);
|
||||
setElementStreamInDistance(entranceBlip, getGlobalConfig().houseBlipStreamInDistance);
|
||||
setElementStreamOutDistance(entranceBlip, getGlobalConfig().houseBlipStreamOutDistance);
|
||||
setElementTransient(entranceBlip, false);
|
||||
setEntityData(entranceBlip, "vrr.owner.type", VRR_BLIP_HOUSE_ENTRANCE, false);
|
||||
setEntityData(entranceBlip, "vrr.owner.id", houseId, false);
|
||||
addToWorld(entranceBlip);
|
||||
|
||||
getHouseData(houseId).entranceBlip = entranceBlip;
|
||||
}
|
||||
if(getGlobalConfig().houseBlipStreamInDistance == -1 || getGlobalConfig().houseBlipStreamOutDistance == -1) {
|
||||
entranceBlip.netFlags.distanceStreaming = false;
|
||||
} else {
|
||||
setElementStreamInDistance(entranceBlip, getGlobalConfig().houseBlipStreamInDistance);
|
||||
setElementStreamOutDistance(entranceBlip, getGlobalConfig().houseBlipStreamOutDistance);
|
||||
}
|
||||
|
||||
setEntityData(entranceBlip, "vrr.owner.type", VRR_BLIP_HOUSE_ENTRANCE, false);
|
||||
setEntityData(entranceBlip, "vrr.owner.id", houseId, false);
|
||||
|
||||
houseData.entranceBlip = entranceBlip;
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function createHouseExitPickup(houseId) {
|
||||
if(!areServerElementsSupported()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!getServerConfig().createHousePickups) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getHouseData(houseId).hasInterior) {
|
||||
if(getHouseData(houseId).exitPickupModel != -1) {
|
||||
let pickupModelId = getGameConfig().pickupModels[getServerGame()].Exit;
|
||||
if(!getHouseData(houseId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getServerData().houses[houseId].exitPickupModel != 0) {
|
||||
pickupModelId = getHouseData(houseId).exitPickupModel;
|
||||
}
|
||||
let houseData = getHouseData(houseId);
|
||||
|
||||
if(areServerElementsSupported()) {
|
||||
let exitPickup = createGamePickup(pickupModelId, getHouseData(houseId).exitPosition, getGameConfig().pickupTypes[getServerGame()].house);
|
||||
if(exitPickup != null) {
|
||||
setElementDimension(exitPickup, getHouseData(houseId).exitDimension);
|
||||
setElementOnAllDimensions(exitPickup, false);
|
||||
setElementStreamInDistance(exitPickup, getGlobalConfig().housePickupStreamInDistance);
|
||||
setElementStreamOutDistance(exitPickup, getGlobalConfig().housePickupStreamOutDistance);
|
||||
setElementTransient(exitPickup, false);
|
||||
addToWorld(exitPickup);
|
||||
//if(houseData.hasInterior) {
|
||||
// return false;
|
||||
//}
|
||||
|
||||
getHouseData(houseId).exitPickup = exitPickup;
|
||||
updateHousePickupLabelData(houseId);
|
||||
}
|
||||
}
|
||||
updateHousePickupLabelData(houseId);
|
||||
}
|
||||
if(houseData.exitPickupModel == -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let pickupModelId = getGameConfig().pickupModels[getGame()].Exit;
|
||||
|
||||
if(getServerData().houses[houseId].exitPickupModel != 0) {
|
||||
pickupModelId = houseData.exitPickupModel;
|
||||
}
|
||||
|
||||
let exitPickup = createGamePickup(pickupModelId, houseData.exitPosition, getGameConfig().pickupTypes[getGame()].house);
|
||||
if(exitPickup != null) {
|
||||
setElementDimension(exitPickup, houseData.exitDimension);
|
||||
setElementOnAllDimensions(exitPickup, false);
|
||||
setElementStreamInDistance(exitPickup, getGlobalConfig().housePickupStreamInDistance);
|
||||
setElementStreamOutDistance(exitPickup, getGlobalConfig().housePickupStreamOutDistance);
|
||||
setElementTransient(exitPickup, false);
|
||||
|
||||
getHouseData(houseId).exitPickup = exitPickup;
|
||||
updateHousePickupLabelData(houseId);
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function createHouseExitBlip(houseId) {
|
||||
if(!areServerElementsSupported()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!getServerConfig().createHouseBlips) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getHouseData(houseId).hasInterior) {
|
||||
if(getHouseData(houseId).exitBlipModel != -1) {
|
||||
let blipModelId = getGameConfig().blipSprites[getServerGame()].House;
|
||||
if(!getHouseData(houseId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getServerData().houses[houseId].exitBlipModel != 0) {
|
||||
blipModelId = getHouseData(houseId).exitBlipModel;
|
||||
}
|
||||
let houseData = getHouseData(houseId);
|
||||
|
||||
if(areServerElementsSupported()) {
|
||||
let exitBlip = createGameBlip(blipModelId, getHouseData(houseId).exitPosition, 1, getColourByName("houseGreen"));
|
||||
if(exitBlip != null) {
|
||||
setElementDimension(exitBlip, getHouseData(houseId).entranceDimension);
|
||||
setElementOnAllDimensions(exitBlip, false);
|
||||
setElementStreamInDistance(exitBlip, getGlobalConfig().houseBlipStreamInDistance);
|
||||
setElementStreamOutDistance(exitBlip, getGlobalConfig().houseBlipStreamOutDistance);
|
||||
setElementTransient(exitBlip, false);
|
||||
setEntityData(exitBlip, "vrr.owner.type", VRR_BLIP_HOUSE_EXIT, false);
|
||||
setEntityData(exitBlip, "vrr.owner.id", houseId, false);
|
||||
addToWorld(exitBlip);
|
||||
//if(houseData.hasInterior) {
|
||||
// return false;
|
||||
//}
|
||||
|
||||
getHouseData(houseId).exitBlip = exitBlip;
|
||||
}
|
||||
}
|
||||
if(houseData.exitBlipModel == -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let blipModelId = getGameConfig().blipSprites[getGame()].Exit;
|
||||
|
||||
if(getServerData().houses[houseId].exitBlipModel != 0) {
|
||||
blipModelId = houseData.exitBlipModel;
|
||||
}
|
||||
|
||||
let exitBlip = createGameBlip(houseData.exitPosition, blipModelId, 1, getColourByName("houseGreen"));
|
||||
if(exitBlip != null) {
|
||||
if(houseData.exitDimension != -1) {
|
||||
setElementDimension(exitBlip, houseData.exitDimension);
|
||||
setElementOnAllDimensions(exitBlip, false);
|
||||
} else {
|
||||
setElementOnAllDimensions(entranceBlip, true);
|
||||
}
|
||||
|
||||
if(getGlobalConfig().houseBlipStreamInDistance == -1 || getGlobalConfig().houseBlipStreamOutDistance == -1) {
|
||||
exitBlip.netFlags.distanceStreaming = false;
|
||||
} else {
|
||||
setElementStreamInDistance(exitBlip, getGlobalConfig().houseBlipStreamInDistance);
|
||||
setElementStreamOutDistance(exitBlip, getGlobalConfig().houseBlipStreamOutDistance);
|
||||
}
|
||||
setElementTransient(exitBlip, false);
|
||||
setEntityData(exitBlip, "vrr.owner.type", VRR_BLIP_HOUSE_EXIT, false);
|
||||
setEntityData(exitBlip, "vrr.owner.id", houseId, false);
|
||||
getHouseData(houseId).exitBlip = exitBlip;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1008,15 +1042,18 @@ function getHouseOwnerTypeText(ownerType) {
|
||||
case VRR_HOUSEOWNER_PLAYER:
|
||||
return "player";
|
||||
|
||||
case VRR_BIZOWNER_NONE:
|
||||
case VRR_HOUSEOWNER_NONE:
|
||||
return "not owned";
|
||||
|
||||
case VRR_BIZOWNER_PUBLIC:
|
||||
case VRR_HOUSEOWNER_PUBLIC:
|
||||
return "not owned";
|
||||
|
||||
case VRR_BIZOWNER_JOB:
|
||||
case VRR_HOUSEOWNER_JOB:
|
||||
return "job";
|
||||
|
||||
case VRR_HOUSEOWNER_BIZ:
|
||||
return "business";
|
||||
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
@@ -1045,14 +1082,16 @@ function getHouseInfoCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let houseData = getHouseData(houseId);
|
||||
|
||||
let ownerName = "Unknown";
|
||||
switch(getHouseData(houseId).ownerType) {
|
||||
case VRR_HOUSEOWNER_CLAN:
|
||||
ownerName = getClanData(getHouseData(houseId).ownerId).name;
|
||||
ownerName = getClanData(houseData).name;
|
||||
break;
|
||||
|
||||
case VRR_HOUSEOWNER_PLAYER:
|
||||
let subAccountData = loadSubAccountFromId(getHouseData(houseId).ownerId);
|
||||
let subAccountData = loadSubAccountFromId(houseData.ownerId);
|
||||
ownerName = `${subAccountData.firstName} ${subAccountData.lastName} [${subAccountData.databaseId}]`;
|
||||
break;
|
||||
|
||||
@@ -1064,12 +1103,38 @@ function getHouseInfoCommand(command, params, client) {
|
||||
ownerName = "Public";
|
||||
break;
|
||||
|
||||
case VRR_HOUSEOWNER_BIZ:
|
||||
ownerName = getBusinessDataFromDatabaseId(houseData.ownerId).name;
|
||||
break;
|
||||
|
||||
case VRR_HOUSEOWNER_JOB:
|
||||
ownerName = getJobData(getHouseData(houseId).ownerId).name;
|
||||
ownerName = getJobData(houseData.ownerId).name;
|
||||
break;
|
||||
}
|
||||
|
||||
messagePlayerNormal(client, `🏠 {houseGreen}[House Info] {MAINCOLOUR}Description: {ALTCOLOUR}${getHouseData(houseId).description}, {MAINCOLOUR}Owner: {ALTCOLOUR}${ownerName} (${getHouseOwnerTypeText(getHouseData(houseId).ownerType)}), {MAINCOLOUR}Locked: {ALTCOLOUR}${getYesNoFromBool(intToBool(getHouseData(houseId).locked))}, {MAINCOLOUR}ID: {ALTCOLOUR}${houseId}/${getHouseData(houseId).databaseId}`);
|
||||
|
||||
let tempStats = [
|
||||
[`Name`, `${houseData.description}`],
|
||||
[`ID`, `${houseData.index}/${houseData.databaseId}`],
|
||||
[`Owner`, `${ownerName} (${getHouseOwnerTypeText(houseData.ownerType)})`],
|
||||
[`Locked`, `${getLockedUnlockedFromBool(houseData.locked)}`],
|
||||
[`BuyPrice`, `${houseData.buyPrice}`],
|
||||
[`RentPrice`, `${houseData.rentPrice}`],
|
||||
[`HasInterior`, `${getYesNoFromBool(houseData.hasInterior)}`],
|
||||
[`CustomInterior`, `${getYesNoFromBool(houseData.customInterior)}`],
|
||||
[`InteriorLights`, `${getOnOffFromBool(houseData.interiorLights)}`],
|
||||
[`RadioStation`, `${houseData.streamingRadioStation}`],
|
||||
];
|
||||
|
||||
let stats = tempStats.map(stat => `{MAINCOLOUR}${stat[0]}: {ALTCOLOUR}${stat[1]}{MAINCOLOUR}`);
|
||||
|
||||
messagePlayerNormal(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderHouseInfo", houseData.description)));
|
||||
let chunkedList = splitArrayIntoChunks(stats, 6);
|
||||
for(let i in chunkedList) {
|
||||
messagePlayerInfo(client, chunkedList[i].join(", "));
|
||||
}
|
||||
|
||||
//messagePlayerNormal(client, `🏠 {houseGreen}[House Info]{MAINCOLOUR} Description: {ALTCOLOUR}${getHouseData(houseId).description}, {MAINCOLOUR}Owner: {ALTCOLOUR}${ownerName} (${getHouseOwnerTypeText(getHouseData(houseId).ownerType)}), {MAINCOLOUR}Locked: {ALTCOLOUR}${getYesNoFromBool(intToBool(getHouseData(houseId).locked))}, {MAINCOLOUR}ID: {ALTCOLOUR}${houseId}/${getHouseData(houseId).databaseId}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -1105,8 +1170,9 @@ function setHouseBuyPriceCommand(command, params, client) {
|
||||
}
|
||||
|
||||
getHouseData(houseId).buyPrice = amount;
|
||||
setEntityData(getHouseData(houseId).entrancePickup, "vrr.label.price", getHouseData(houseId).buyPrice, true);
|
||||
messagePlayerSuccess(client, `{MAINCOLOUR}You set house {houseGreen}${getHouseData(houseId).description}'s {MAINCOLOUR}for-sale price to {ALTCOLOUR}$${makeLargeNumberReadable(amount)}`);
|
||||
getHouseData(houseId).needsSaved = true;
|
||||
updateHousePickupLabelData(houseId);
|
||||
messagePlayerSuccess(client, `{MAINCOLOUR}You set house {houseGreen}${getHouseData(houseId).description}'s{MAINCOLOUR} for-sale price to {ALTCOLOUR}$${makeLargeNumberReadable(amount)}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -1142,8 +1208,9 @@ function setHouseRentPriceCommand(command, params, client) {
|
||||
}
|
||||
|
||||
getHouseData(houseId).rentPrice = amount;
|
||||
setEntityData(getHouseData(houseId).entrancePickup, "vrr.label.price", `Rent: ${getHouseData(houseId).rentPrice}`, true);
|
||||
messagePlayerSuccess(client, `{MAINCOLOUR}You set house {houseGreen}${getHouseData(houseId).description}'s {MAINCOLOUR}rent price to {ALTCOLOUR}$${makeLargeNumberReadable(amount)}`);
|
||||
getHouseData(houseId).needsSaved = true;
|
||||
updateHousePickupLabelData(houseId);
|
||||
messagePlayerSuccess(client, `{MAINCOLOUR}You set house {houseGreen}${getHouseData(houseId).description}'s{MAINCOLOUR} rent price to {ALTCOLOUR}$${makeLargeNumberReadable(amount)}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -1175,19 +1242,8 @@ function buyHouseCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
getHouseData(houseId).ownerType = VRR_BIZOWNER_PLAYER;
|
||||
getHouseData(houseId).ownerId = getPlayerCurrentSubAccount(client).databaseId;
|
||||
getHouseData(houseId).buyPrice = 0;
|
||||
|
||||
updateHousePickupLabelData(houseId);
|
||||
|
||||
messagePlayerSuccess(client, `You are now the owner of {houseGreen}${getHouseData(houseId).description}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function isPlayerInAnyHouse(client) {
|
||||
return doesEntityDataExist(client, "vrr.inHouse");
|
||||
showPlayerPrompt(client, getLocaleString(client, "BuyHouseConfirmMessage"), getLocaleString(client, "BuyHouseConfirmTitle"), getLocaleString(client, "Yes"), getLocaleString(client, "No"));
|
||||
getPlayerData(client).promptType = VRR_PROMPT_HOUSEBUY;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -1278,8 +1334,8 @@ function deleteHouseExitBlip(houseId) {
|
||||
function reloadAllHousesCommand(command, params, client) {
|
||||
let clients = getClients();
|
||||
for(let i in clients) {
|
||||
if(isPlayerInAnyHouse(clients[i])) {
|
||||
removePlayerFromHouses(clients[i]);
|
||||
if(getPlayerHouse(clients[i]) != -1) {
|
||||
removePlayerFromHouse(clients[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1295,7 +1351,7 @@ function reloadAllHousesCommand(command, params, client) {
|
||||
createAllHousePickups();
|
||||
createAllHouseBlips();
|
||||
|
||||
announceAdminAction(`HousesReloaded`);
|
||||
announceAdminAction(`AllHousesReloaded`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -1307,12 +1363,11 @@ function exitHouse(client) {
|
||||
setPlayerDimension(client, getServerData().house[houseId].entranceDimension);
|
||||
setPlayerPosition(client, getServerData().house[houseId].entrancePosition);
|
||||
}
|
||||
removeEntityData(client, "vrr.inHouse");
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setAllHouseIndexes() {
|
||||
function setHouseDataIndexes() {
|
||||
for(let i in getServerData().houses) {
|
||||
getServerData().houses[i].index = i;
|
||||
|
||||
@@ -1517,7 +1572,7 @@ function updateHousePickupLabelData(houseId) {
|
||||
setEntityData(houseData.entrancePickup, "vrr.owner.type", VRR_PICKUP_HOUSE_ENTRANCE, false);
|
||||
setEntityData(houseData.entrancePickup, "vrr.owner.id", houseId, false);
|
||||
setEntityData(houseData.entrancePickup, "vrr.label.type", VRR_LABEL_HOUSE, true);
|
||||
//setEntityData(houseData.entrancePickup, "vrr.label.name", houseData.description, true);
|
||||
setEntityData(houseData.entrancePickup, "vrr.label.name", houseData.description, true);
|
||||
setEntityData(houseData.entrancePickup, "vrr.label.locked", houseData.locked, true);
|
||||
if(houseData.buyPrice > 0) {
|
||||
setEntityData(houseData.entrancePickup, "vrr.label.price", houseData.buyPrice, true);
|
||||
@@ -1537,4 +1592,36 @@ function updateHousePickupLabelData(houseId) {
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function deleteAllHouseBlips() {
|
||||
for(let i in getServerData().houses) {
|
||||
deleteHouseEntranceBlip(i);
|
||||
deleteHouseExitBlip(i);
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function deleteAllHousePickups() {
|
||||
for(let i in getServerData().houses) {
|
||||
deleteHouseEntrancePickup(i);
|
||||
deleteHouseExitPickup(i);
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function createHouseBlips(houseId) {
|
||||
createHouseEntranceBlip(houseId);
|
||||
createHouseExitBlip(houseId);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function createHousePickups(houseId) {
|
||||
createHouseEntrancePickup(houseId);
|
||||
createHouseExitPickup(houseId);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -38,6 +38,7 @@ require("scripts/server/messaging.js");
|
||||
require("scripts/server/misc.js");
|
||||
require("scripts/server/npc.js");
|
||||
require("scripts/server/staff.js");
|
||||
require("scripts/server/race.js");
|
||||
require("scripts/server/radio.js");
|
||||
require("scripts/server/security.js");
|
||||
require("scripts/server/subaccount.js");
|
||||
|
||||
@@ -9,16 +9,6 @@
|
||||
|
||||
function initItemScript() {
|
||||
logToConsole(LOG_INFO, "[VRR.Item]: Initializing item script ...");
|
||||
getServerData().itemTypes = loadItemTypesFromDatabase();
|
||||
if(!getServerConfig().devServer) {
|
||||
getServerData().items = loadItemsFromDatabase();
|
||||
}
|
||||
|
||||
setItemTypeDataIndexes();
|
||||
setItemDataIndexes();
|
||||
|
||||
cacheAllGroundItems();
|
||||
createAllGroundItemObjects();
|
||||
logToConsole(LOG_INFO, "[VRR.Item]: Item script initialized successfully!");
|
||||
return true;
|
||||
}
|
||||
@@ -295,13 +285,13 @@ function pickupItemCommand(command, params, client) {
|
||||
let itemId = getClosestItemOnGround(getPlayerPosition(client));
|
||||
|
||||
if(!getItemData(itemId)) {
|
||||
messagePlayerError(client, `The item you're trying to pick up is bugged. A bug report has been sent to the server developers.`);
|
||||
//messagePlayerError(client, `The item you're trying to pick up is bugged. A bug report has been sent to the server developers.`);
|
||||
submitBugReport(client, `(AUTOMATED REPORT) Pickup Item: Getting item data for item ${itemId} on ground returned false.`);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!getItemTypeData(getItemData(itemId).itemTypeIndex)) {
|
||||
messagePlayerError(client, `The item you're trying to pick up is bugged. A bug report has been sent to the server developers.`);
|
||||
//messagePlayerError(client, `The item you're trying to pick up is bugged. A bug report has been sent to the server developers.`);
|
||||
submitBugReport(client, `(AUTOMATED REPORT) Pickup Item: Getting item type ${getItemData(itemId).itemType} data for item ${itemId}/${getItemData(itemId).databaseId} on ground returned false.`);
|
||||
return false;
|
||||
}
|
||||
@@ -717,25 +707,26 @@ function setItemTypeUseValueCommand(command, params, client) {
|
||||
// ===========================================================================
|
||||
|
||||
function playerUseItem(client, hotBarSlot) {
|
||||
let closestPlayer;
|
||||
let tempUseValue;
|
||||
|
||||
let vehicle;
|
||||
let fuelPump;
|
||||
|
||||
let itemIndex = getPlayerData(client).hotBarItems[hotBarSlot];
|
||||
|
||||
if(itemIndex == -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!getItemData(itemIndex)) {
|
||||
submitBugReport(client, `[AUTOMATED REPORT] Tried to use invalid item (index ${itemIndex} in player slot ${hotBarSlot})`);
|
||||
cachePlayerHotBarItems(client);
|
||||
return false;
|
||||
}
|
||||
|
||||
switch(getItemTypeData(getItemData(itemIndex).itemTypeIndex).useType) {
|
||||
case VRR_ITEM_USETYPE_SKIN:
|
||||
case VRR_ITEM_USETYPE_SKIN: {
|
||||
getPlayerData(client).itemActionItem = itemIndex;
|
||||
forcePlayerIntoSkinSelect(client);
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_ITEM_USETYPE_WEAPON:
|
||||
case VRR_ITEM_USETYPE_WEAPON: {
|
||||
for(let i in getPlayerData(client).hotBarItems) {
|
||||
if(getPlayerData(client).hotBarItems[i] != -1) {
|
||||
if(getItemData(getPlayerData(client).hotBarItems[i]) != false) {
|
||||
@@ -753,16 +744,19 @@ function playerUseItem(client, hotBarSlot) {
|
||||
}
|
||||
messagePlayerError(client, `You don't have any ammo to load into your ${getItemTypeData(getItemData(itemIndex).itemTypeIndex).name}!`);
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_ITEM_USETYPE_AMMO_CLIP:
|
||||
case VRR_ITEM_USETYPE_AMMO_CLIP: {
|
||||
messagePlayerError(client, `To load this ammo into a weapon, equip the weapon and ${(doesPlayerHaveKeyBindForCommand(client, "use")) ? `press {ALTCOLOUR}${toUpperCase(getKeyNameFromId(getPlayerKeyBindForCommand(client, "use").key))}` : `{ALTCOLOUR}/use`}`);
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_ITEM_USETYPE_STORAGE:
|
||||
case VRR_ITEM_USETYPE_STORAGE: {
|
||||
showItemInventoryToPlayer(client, itemIndex);
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_ITEM_USETYPE_FOOD:
|
||||
case VRR_ITEM_USETYPE_FOOD: {
|
||||
meActionToNearbyPlayers(client, `eats some of their ${getItemName(itemIndex)}`);
|
||||
givePlayerHealth(client, getItemTypeData(getItemData(itemIndex).itemTypeIndex).useValue);
|
||||
getItemData(itemIndex).value = getItemData(itemIndex).value - getItemTypeData(getItemData(itemIndex).itemTypeIndex).useValue;
|
||||
@@ -771,8 +765,9 @@ function playerUseItem(client, hotBarSlot) {
|
||||
switchPlayerActiveHotBarSlot(client, -1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_ITEM_USETYPE_DRINK:
|
||||
case VRR_ITEM_USETYPE_DRINK: {
|
||||
meActionToNearbyPlayers(client, `drinks some of their ${getItemName(itemIndex)}`);
|
||||
givePlayerHealth(client, getItemTypeData(getItemData(itemIndex).itemTypeIndex).useValue);
|
||||
getItemData(itemIndex).value = getItemData(itemIndex).value - getItemTypeData(getItemData(itemIndex).itemTypeIndex).useValue;
|
||||
@@ -781,16 +776,18 @@ function playerUseItem(client, hotBarSlot) {
|
||||
switchPlayerActiveHotBarSlot(client, -1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_ITEM_USETYPE_ARMOUR:
|
||||
case VRR_ITEM_USETYPE_ARMOUR: {
|
||||
meActionToNearbyPlayers(client, `puts on a ${getItemName(itemIndex)}`);
|
||||
givePlayerArmour(client, getItemData(itemIndex).useValue);
|
||||
deleteItem(itemIndex);
|
||||
switchPlayerActiveHotBarSlot(client, -1);
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_ITEM_USETYPE_ROPE:
|
||||
closestPlayer = getClosestPlayer(getPlayerPosition(client), getPlayerPed(client));
|
||||
case VRR_ITEM_USETYPE_ROPE: {
|
||||
let closestPlayer = getClosestPlayer(getPlayerPosition(client), client);
|
||||
|
||||
if(!getPlayerData(closestPlayer)) {
|
||||
messagePlayerError(client, "There isn't anyone close enough to tie up!");
|
||||
@@ -820,9 +817,10 @@ function playerUseItem(client, hotBarSlot) {
|
||||
meActionToNearbyPlayers(client, `takes their rope and ties ${getCharacterFullName(closestPlayer)}'s hands and feet together.`);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_ITEM_USETYPE_HANDCUFF:
|
||||
closestPlayer = getClosestPlayer(getPlayerPosition(client), client);
|
||||
case VRR_ITEM_USETYPE_HANDCUFF: {
|
||||
let closestPlayer = getClosestPlayer(getPlayerPosition(client), client);
|
||||
|
||||
if(!getPlayerData(closestPlayer)) {
|
||||
messagePlayerError(client, "There isn't anyone close enough to handcuff!");
|
||||
@@ -847,13 +845,15 @@ function playerUseItem(client, hotBarSlot) {
|
||||
meActionToNearbyPlayers(client, `takes their cuffs and places them on ${getCharacterFullName(closestPlayer)}`);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_ITEM_USETYPE_NONE:
|
||||
case VRR_ITEM_USETYPE_NONE: {
|
||||
messagePlayerError(client, `The ${getItemName(itemIndex)} doesn't do anything when you try to use it.`);
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_ITEM_USETYPE_VEHREPAIR:
|
||||
vehicle = getClosestVehicle(getPlayerPosition(client));
|
||||
case VRR_ITEM_USETYPE_VEHREPAIR: {
|
||||
let vehicle = getClosestVehicle(getPlayerPosition(client));
|
||||
if(getDistance(getPlayerPosition(client), getVehiclePosition(vehicle)) <= getGlobalConfig().vehicleRepairDistance) {
|
||||
meActionToNearbyPlayers(client, `takes their repair kit and fixes the vehicle`);
|
||||
repairVehicle(vehicle);
|
||||
@@ -864,25 +864,28 @@ function playerUseItem(client, hotBarSlot) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_ITEM_USETYPE_VEHUPGRADE_PART:
|
||||
vehicle = getClosestVehicle(getPlayerPosition(client));
|
||||
case VRR_ITEM_USETYPE_VEHUPGRADE_PART: {
|
||||
let vehicle = getClosestVehicle(getPlayerPosition(client));
|
||||
if(getDistance(getPlayerPosition(client), getVehiclePosition(vehicle)) <= getGlobalConfig().vehicleRepairDistance) {
|
||||
meActionToNearbyPlayers(client, `takes their upgrade kit and adds a ${getItemName(itemIndex)} to the vehicle.`);
|
||||
addVehicleUpgrade(vehicle, getItemData(itemIndex).useId);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_ITEM_USETYPE_VEHLIVERY:
|
||||
vehicle = getClosestVehicle(getPlayerPosition(client));
|
||||
case VRR_ITEM_USETYPE_VEHLIVERY: {
|
||||
let vehicle = getClosestVehicle(getPlayerPosition(client));
|
||||
if(getDistance(getPlayerPosition(client), getVehiclePosition(vehicle)) <= getGlobalConfig().vehicleRepairDistance) {
|
||||
meActionToNearbyPlayers(client, `takes their decal kit and adds some decals to the vehicle.`);
|
||||
setVehicleLivery(vehicle, getItemData(itemIndex).value);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_ITEM_USETYPE_VEHCOLOUR:
|
||||
vehicle = getClosestVehicle(getPlayerPosition(client));
|
||||
case VRR_ITEM_USETYPE_VEHCOLOUR: {
|
||||
let vehicle = getClosestVehicle(getPlayerPosition(client));
|
||||
if(getDistance(getPlayerPosition(client), getVehiclePosition(vehicle)) <= getGlobalConfig().vehicleRepairDistance) {
|
||||
if(getItemData(itemIndex).useId == 1) {
|
||||
meActionToNearbyPlayers(client, `takes their vehicle colour kit and changes the primary colour of the vehicle.`);
|
||||
@@ -895,10 +898,11 @@ function playerUseItem(client, hotBarSlot) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_ITEM_USETYPE_FUELCAN:
|
||||
vehicle = getClosestVehicle(getPlayerPosition(client));
|
||||
fuelPump = getClosestFuelPump(getPlayerPosition(client));
|
||||
case VRR_ITEM_USETYPE_FUELCAN: {
|
||||
let vehicle = getClosestVehicle(getPlayerPosition(client));
|
||||
let fuelPump = getClosestFuelPump(getPlayerPosition(client));
|
||||
if(getDistance(getPlayerPosition(client), getVehiclePosition(vehicle)) <= getDistance(getPlayerPosition(client), getFuelPumpData(fuelPump).position)) {
|
||||
if(getDistance(getPlayerPosition(client), getVehiclePosition(vehicle)) <= getGlobalConfig().vehicleRepairDistance) {
|
||||
meActionToNearbyPlayers(client, `takes their fuel can and refills the vehicle`);
|
||||
@@ -927,14 +931,16 @@ function playerUseItem(client, hotBarSlot) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_ITEM_USETYPE_WALKIETALKIE:
|
||||
case VRR_ITEM_USETYPE_WALKIETALKIE: {
|
||||
getItemData(itemIndex).enabled = !getItemData(itemIndex).enabled;
|
||||
//messagePlayerAlert(client, `You turned ${getBoolRedGreenInlineColour(getItemData(itemIndex).enabled)}${toUpperCase(getOnOffFromBool(getItemData(itemIndex).enabled))} {MAINCOLOUR}your walkie talkie in slot ${getPlayerData(client).activeHotBarSlot+1} {ALTCOLOUR}${getItemValueDisplayForItem(itemIndex)}`);
|
||||
meActionToNearbyPlayers(client, `turns ${toLowerCase(getOnOffFromBool(getItemData(itemIndex).enabled))} their walkie-talkie`);
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_ITEM_USETYPE_PHONE:
|
||||
case VRR_ITEM_USETYPE_PHONE: {
|
||||
if(getItemData(itemIndex).value == 0) {
|
||||
let phoneNumber = generateRandomPhoneNumber();
|
||||
getItemData(itemIndex).value = phoneNumber;
|
||||
@@ -950,8 +956,9 @@ function playerUseItem(client, hotBarSlot) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_ITEM_USETYPE_SMOKEDRUG:
|
||||
case VRR_ITEM_USETYPE_SMOKEDRUG: {
|
||||
meActionToNearbyPlayers(client, `smokes some ${getItemName(itemIndex)}`);
|
||||
getPlayerData(client).incomingDamageMultiplier = getPlayerData(client).incomingDamageMultiplier-(getItemTypeData(getItemData(itemIndex).itemTypeIndex).useValue/100);
|
||||
if(getPlayerData(client).incomingDamageMultiplier < 0.25) {
|
||||
@@ -960,8 +967,9 @@ function playerUseItem(client, hotBarSlot) {
|
||||
deleteItem(itemIndex);
|
||||
switchPlayerActiveHotBarSlot(client, -1);
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_ITEM_USETYPE_SNORTDRUG:
|
||||
case VRR_ITEM_USETYPE_SNORTDRUG: {
|
||||
meActionToNearbyPlayers(client, `snorts some ${getItemName(itemIndex)}`);
|
||||
getPlayerData(client).incomingDamageMultiplier = getPlayerData(client).incomingDamageMultiplier-(getItemTypeData(getItemData(itemIndex).itemTypeIndex).useValue/100);
|
||||
if(getPlayerData(client).incomingDamageMultiplier < 0.25) {
|
||||
@@ -970,8 +978,9 @@ function playerUseItem(client, hotBarSlot) {
|
||||
deleteItem(itemIndex);
|
||||
switchPlayerActiveHotBarSlot(client, -1);
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_ITEM_USETYPE_INJECTDRUG:
|
||||
case VRR_ITEM_USETYPE_INJECTDRUG: {
|
||||
meActionToNearbyPlayers(client, `shoots up some ${getItemName(itemIndex)}`);
|
||||
getPlayerData(client).incomingDamageMultiplier = getPlayerData(client).incomingDamageMultiplier-(getItemTypeData(getItemData(itemIndex).itemTypeIndex).useValue/100);
|
||||
if(getPlayerData(client).incomingDamageMultiplier < 0.25) {
|
||||
@@ -980,8 +989,9 @@ function playerUseItem(client, hotBarSlot) {
|
||||
deleteItem(itemIndex);
|
||||
switchPlayerActiveHotBarSlot(client, -1);
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_ITEM_USETYPE_PLANT:
|
||||
case VRR_ITEM_USETYPE_PLANT: {
|
||||
meActionToNearbyPlayers(client, `bends down and plants a ${getItemName(itemIndex)} in the ground`);
|
||||
createGroundPlant(itemIndex);
|
||||
if(getItemData(itemIndex).value == 0) {
|
||||
@@ -989,27 +999,64 @@ function playerUseItem(client, hotBarSlot) {
|
||||
switchPlayerActiveHotBarSlot(client, -1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_ITEM_USETYPE_BADGE:
|
||||
case VRR_ITEM_USETYPE_BADGE: {
|
||||
meActionToNearbyPlayers(client, `shows their badge to everyone nearby.`);
|
||||
let clients = getClients();
|
||||
for(let i in clients) {
|
||||
if(getDistance(getPlayerPosition(client), getPlayerPosition(clients[i])) <= 7) {
|
||||
messagePlayerInfo(client, `{clanOrange}== {jobYellow}Badge {clanOrange}====================================`);
|
||||
messagePlayerNormal(client, `{clanOrange}Name: {MAINCOLOUR}${getCharacterFullName(client)}`);
|
||||
messagePlayerNormal(client, `{clanOrange}Type: {MAINCOLOUR}${getJobData(getPlayerJob(client)).name}`);
|
||||
messagePlayerNormal(client, `{clanOrange}Rank: {MAINCOLOUR}${getJobRankName(getPlayerJob(client), getPlayerJobRank(client))}`);
|
||||
makeChatBoxSectionHeader(clients[i], getLocaleString(client, "Badge", getCharacterFullName(client)));
|
||||
messagePlayerNormal(client, `{clanOrange}Type:{MAINCOLOUR} ${getJobData(getPlayerJob(client)).name}`);
|
||||
messagePlayerNormal(client, `{clanOrange}ID:{MAINCOLOUR} ${addPrefixNumberFill(getPlayerCurrentSubAccount(client).databaseId, 5)}`);
|
||||
messagePlayerNormal(client, `{clanOrange}Rank:{MAINCOLOUR} ${getJobRankName(getPlayerJob(client), getPlayerJobRank(client))}`);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_ITEM_USETYPE_AMMO_CLIP:
|
||||
case VRR_ITEM_USETYPE_AMMO_CLIP: {
|
||||
messagePlayerError(client, `Equip a compatible weapon and press R to use an ammo clip/magazine`);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
case VRR_ITEM_USETYPE_HEALTH: {
|
||||
let closestPlayer = getClosestPlayer(getPlayerPosition(client), client);
|
||||
|
||||
if(!getPlayerData(closestPlayer)) {
|
||||
messagePlayerError(client, "There isn't anyone close enough to heal!");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getDistance(getPlayerPosition(closestPlayer), getPlayerPosition(client)) > getGlobalConfig().firstAidKitPlayerDistance) {
|
||||
messagePlayerError(client, "There isn't anyone close enough to heal!");
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_ITEM_USETYPE_LOTTOTICKET: {
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_ITEM_USETYPE_AREARADIO: {
|
||||
let state = getItemData(itemIndex)
|
||||
meActionToNearbyPlayers(client, `turns ${getOnOffFromBool(state)} the boombox radio`);
|
||||
messagePlayerAlert(client, `Use /radiostation to set the radio station and drop it on the ground to play`);
|
||||
break;
|
||||
}
|
||||
|
||||
case VRR_ITEM_USETYPE_PERSONALRADIO: {
|
||||
meActionToNearbyPlayers(client, `turns ${getOnOffFromBool(state)} the boombox radio`);
|
||||
messagePlayerAlert(client, `Use /radiostation to set the radio station`);
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
messagePlayerError(client, `The ${getItemName(itemIndex)} doesn't do anything when you try to use it.`);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(getItemData(itemIndex) != false) {
|
||||
@@ -1028,10 +1075,10 @@ function playerDropItem(client, hotBarSlot) {
|
||||
meActionToNearbyPlayers(client, `drops ${getProperDeterminerForName(getItemName(itemId))} ${getItemName(itemId)} on the ground`);
|
||||
|
||||
resyncWeaponItemAmmo(client);
|
||||
clearPlayerWeapons(client);
|
||||
|
||||
getPlayerData(client).hotBarItems[hotBarSlot] = -1;
|
||||
updatePlayerHotBar(client);
|
||||
clearPlayerWeapons(client);
|
||||
|
||||
getItemData(itemId).ownerType = VRR_ITEM_OWNER_GROUND;
|
||||
getItemData(itemId).ownerId = 0;
|
||||
@@ -1297,7 +1344,7 @@ function getClosestItemOnGround(position) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setItemDataIndexes() {
|
||||
function setAllItemDataIndexes() {
|
||||
for(let i in getServerData().items) {
|
||||
if(getServerData().items[i]) {
|
||||
getServerData().items[i].index = i;
|
||||
@@ -1308,7 +1355,7 @@ function setItemDataIndexes() {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setItemTypeDataIndexes() {
|
||||
function setAllItemTypeDataIndexes() {
|
||||
for(let i in getServerData().itemTypes) {
|
||||
if(getServerData().itemTypes[i]) {
|
||||
getServerData().itemTypes[i].index = i;
|
||||
@@ -1326,13 +1373,9 @@ function setItemTypeDataIndexes() {
|
||||
// ===========================================================================
|
||||
|
||||
function cacheAllGroundItems() {
|
||||
getServerData().groundItemCache = [];
|
||||
|
||||
for(let i in getServerData().items) {
|
||||
if(getServerData().items[i].ownerType == VRR_ITEM_OWNER_GROUND) {
|
||||
getServerData().groundItemCache.push(i);
|
||||
}
|
||||
}
|
||||
clearArray(getServerData().groundItemCache);
|
||||
getServerData().groundItemCache = getServerData().items.filter(item => item.ownerType == VRR_ITEM_OWNER_GROUND);
|
||||
//getServerData().groundPlantCache = getServerData().items.filter(item => item.ownerType == VRR_ITEM_OWNER_PLANT);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -1368,19 +1411,11 @@ function cachePlayerHotBarItems(client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for(let i = 0 ; i < 9 ; i++) {
|
||||
getPlayerData(client).hotBarItems[i] = -1;
|
||||
}
|
||||
clearArray(getPlayerData(client).hotBarItems);
|
||||
getPlayerData(client).hotBarItems = getServerData().items.filter(item => item.ownerType == VRR_ITEM_OWNER_PLAYER && item.ownerId == getPlayerCurrentSubAccount(client).databaseId);
|
||||
|
||||
for(let i in getServerData().items) {
|
||||
if(getItemData(i).ownerType == VRR_ITEM_OWNER_PLAYER) {
|
||||
if(getItemData(i).ownerId == getPlayerCurrentSubAccount(client).databaseId) {
|
||||
let firstSlot = getPlayerFirstEmptyHotBarSlot(client);
|
||||
if(firstSlot != -1) {
|
||||
getPlayerData(client).hotBarItems[firstSlot] = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(getPlayerData(client).hotBarItems.length < getGlobalConfig().maxPlayerItemSlots) {
|
||||
getPlayerData(client).hotBarItems.concat(Array(getGlobalConfig().maxPlayerItemSlots-getPlayerData(client).hotBarItems.length).fill(-1));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1460,7 +1495,7 @@ function deleteItem(itemId) {
|
||||
quickDatabaseQuery(`DELETE FROM item_main WHERE item_id = ${getItemData(itemId).databaseId}`);
|
||||
}
|
||||
getServerData().items[itemId] = false;
|
||||
setItemDataIndexes();
|
||||
setAllItemDataIndexes();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -1469,12 +1504,12 @@ function getBestNewOwnerToPutItem(client) {
|
||||
let closestDistance = 100.0;
|
||||
let position = getPlayerPosition(client);
|
||||
|
||||
let possibleHouse = (isPlayerInAnyHouse(client)) ? getPlayerHouse(client) : getClosestHouseEntrance(getPlayerPosition(client));
|
||||
let possibleHouse = getPlayerHouse(client);
|
||||
if(getHouseData(possibleHouse)) {
|
||||
return [VRR_ITEM_OWNER_HOUSE, possibleHouse];
|
||||
}
|
||||
|
||||
let possibleBusiness = (isPlayerInAnyBusiness(client)) ? getPlayerBusiness(client) : getClosestBusinessEntrance(getPlayerPosition(client));
|
||||
let possibleBusiness = getPlayerBusiness(client);
|
||||
if(getBusinessData(possibleBusiness)) {
|
||||
return [VRR_ITEM_OWNER_BIZSTORAGE, possibleBusiness];
|
||||
}
|
||||
@@ -1496,7 +1531,7 @@ function getBestItemToTake(client, slot) {
|
||||
let ownerType = VRR_ITEM_OWNER_NONE;
|
||||
let ownerId = 0;
|
||||
|
||||
let possibleHouse = (isPlayerInAnyHouse(client)) ? getPlayerHouse(client) : getClosestHouseEntrance(getPlayerPosition(client));
|
||||
let possibleHouse = getPlayerHouse(client);
|
||||
if(getHouseData(possibleHouse)) {
|
||||
if(typeof getHouseData(possibleHouse).itemCache[slot] != "undefined") {
|
||||
itemId = getHouseData(possibleHouse).itemCache[slot];
|
||||
@@ -1505,7 +1540,7 @@ function getBestItemToTake(client, slot) {
|
||||
}
|
||||
}
|
||||
|
||||
let possibleBusiness = (isPlayerInAnyBusiness(client)) ? getPlayerBusiness(client) : getClosestBusinessEntrance(getPlayerPosition(client));
|
||||
let possibleBusiness = getPlayerBusiness(client);
|
||||
if(getBusinessData(possibleBusiness)) {
|
||||
if(typeof getBusinessData(possibleBusiness).floorItemCache[slot] != "undefined") {
|
||||
itemId = getBusinessData(possibleBusiness).floorItemCache[slot];
|
||||
@@ -1540,7 +1575,18 @@ function getBestItemToTake(client, slot) {
|
||||
*
|
||||
*/
|
||||
function listPlayerInventoryCommand(command, params, client) {
|
||||
showPlayerInventoryToPlayer(client, client);
|
||||
let targetClient = client;
|
||||
if(doesPlayerHaveStaffPermission(client, getStaffFlagValue("BasicModeration"))) {
|
||||
if(!areParamsEmpty(client)) {
|
||||
if(targetClient == false) {
|
||||
sendMessageToPlayer(client, getLocaleString(client, "InvalidPlayer"));
|
||||
return false;
|
||||
}
|
||||
targetClient = getPlayerFromParams(params);
|
||||
}
|
||||
}
|
||||
showPlayerInventoryToPlayer(client, targetClient);
|
||||
//showPlayerInventoryToPlayer(client, client);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -1555,7 +1601,7 @@ function listPlayerInventoryCommand(command, params, client) {
|
||||
*
|
||||
*/
|
||||
function listBusinessStorageInventoryCommand(command, params, client) {
|
||||
let businessId = (isPlayerInAnyBusiness(client)) ? getPlayerBusiness(client) : getClosestBusinessEntrance(getPlayerPosition(client));
|
||||
let businessId = getPlayerBusiness(client);
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
@@ -1582,7 +1628,7 @@ function listBusinessStorageInventoryCommand(command, params, client) {
|
||||
*
|
||||
*/
|
||||
function listBusinessFloorInventoryCommand(command, params, client) {
|
||||
let businessId = (isPlayerInAnyBusiness(client)) ? getPlayerBusiness(client) : getClosestBusinessEntrance(getPlayerPosition(client));
|
||||
let businessId = getPlayerBusiness(client);
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
@@ -1609,7 +1655,7 @@ function listBusinessFloorInventoryCommand(command, params, client) {
|
||||
*
|
||||
*/
|
||||
function listHouseInventoryCommand(command, params, client) {
|
||||
let houseId = (isPlayerInAnyHouse(client)) ? getPlayerHouse(client) : getClosestHouseEntrance(getPlayerPosition(client));
|
||||
let houseId = getPlayerHouse(client);
|
||||
|
||||
if(!getHouseData(houseId)) {
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidHouse"));
|
||||
@@ -1676,7 +1722,7 @@ function getItemTypeData(itemTypeId) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function saveItemsToDatabase() {
|
||||
function saveAllItemsToDatabase() {
|
||||
if(getServerConfig().devServer) {
|
||||
return false;
|
||||
}
|
||||
@@ -1688,7 +1734,7 @@ function saveItemsToDatabase() {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function saveItemTypesToDatabase() {
|
||||
function saveAllItemTypesToDatabase() {
|
||||
if(getServerConfig().devServer) {
|
||||
return false;
|
||||
}
|
||||
@@ -2240,7 +2286,7 @@ function showPlayerInventoryToPlayer(client, targetClient) {
|
||||
if(client == targetClient) {
|
||||
messagePlayerNormal(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderSelfItemList")));
|
||||
} else {
|
||||
messagePlayerNormal(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderPlayerItemList")));
|
||||
messagePlayerNormal(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderPlayerItemList", getCharacterFullName(targetClient))));
|
||||
}
|
||||
|
||||
let chunkedList = splitArrayIntoChunks(itemDisplay, 5);
|
||||
@@ -2317,7 +2363,6 @@ function createGroundPlant(itemId) {
|
||||
createGroundItem(getItemTypeData(itemId).useId, 1, position, dimension);
|
||||
groundPlantCache.push(itemId);
|
||||
groundItemCache.push(itemId);
|
||||
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
|
||||
function initKeyBindScript() {
|
||||
logToConsole(LOG_INFO, "[VRR.KeyBind]: Initializing key bind script ...");
|
||||
getGlobalConfig().keyBind = loadKeyBindConfiguration();
|
||||
logToConsole(LOG_INFO, "[VRR.KeyBind]: Key bind script initialized!");
|
||||
}
|
||||
|
||||
@@ -19,16 +18,19 @@ function initKeyBindScript() {
|
||||
function addKeyBindCommand(command, params, client) {
|
||||
let splitParams = params.split(" ");
|
||||
|
||||
let keys = getKeysInComboName(getParam(params, " ", 1));
|
||||
let keyId = getKeyIdFromParams(getParam(params, " ", 1));
|
||||
let tempCommand = getParam(params, " ", 2);
|
||||
let tempParams = (splitParams.length > 2) ? splitParams.slice(2).join(" ") : "";
|
||||
|
||||
if(keys.indexOf(false) != -1) {
|
||||
messagePlayerError(client, "One of the key names you input is invalid!");
|
||||
messagePlayerTip(client, "Use simple key names, letters, or numbers. Don't add spaces. Must be lowercase.");
|
||||
messagePlayerTip(client, "No actual symbols, use a name for those if needed like ampersand, hashtag, tilde, etc");
|
||||
if(!keyId) {
|
||||
messagePlayerError(client, "The key ID or name you input is invalid!");
|
||||
messagePlayerTip(client, "Use simple key names, letters, or numbers. Don't add spaces.");
|
||||
messagePlayerInfo(client, `Examples: {ALTCOLOUR}1, 2, a, b, numplus, num1, f1, f2, pageup, delete, insert, rightshift, leftctrl`);
|
||||
messagePlayerInfo(client, `For combos, use a plus sign between the keys. No spaces! Example: {ALTCOLOUR}rightctrl+num3{MAINCOLOUR}`);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!keyId) {
|
||||
messagePlayerError(client, "That key name/id is invalid!");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -38,12 +40,14 @@ function addKeyBindCommand(command, params, client) {
|
||||
}
|
||||
|
||||
addPlayerKeyBind(client, keyId, tempCommand, tempParams);
|
||||
messagePlayerSuccess(client, `You binded the {ALTCOLOUR}${toUpperCase(keys.join(" + "))} {MAINCOLOUR}keys to command: {ALTCOLOUR}/${tempCommand} ${tempParams}`);
|
||||
messagePlayerSuccess(client, `You binded the {ALTCOLOUR}${toUpperCase(getKeyNameFromId(keyId))} {MAINCOLOUR}key to command: {ALTCOLOUR}/${tempCommand} ${tempParams}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function removeKeyBindCommand(command, params, client) {
|
||||
let splitParams = params.split(" ");
|
||||
|
||||
let keyId = getKeyIdFromParams(getParam(params, " ", 1));
|
||||
|
||||
if(!keyId) {
|
||||
@@ -70,8 +74,6 @@ function addPlayerKeyBind(client, keys, command, params, tempKey = false) {
|
||||
keyBindData.databaseId = -1;
|
||||
}
|
||||
|
||||
keyBindData.needsSaved = true;
|
||||
|
||||
getPlayerData(client).keyBinds.push(keyBindData);
|
||||
sendAddAccountKeyBindToClient(client, keys, (keys.length > 1) ? VRR_KEYSTATE_COMBO : VRR_KEYSTATE_UP);
|
||||
|
||||
@@ -91,11 +93,12 @@ function removePlayerKeyBind(client, keyId) {
|
||||
quickDatabaseQuery(`DELETE FROM acct_hotkey WHERE acct_hotkey_acct = ${getPlayerData(client).accountData.databaseId} AND acct_hotkey_key = ${keyId}`);
|
||||
}
|
||||
|
||||
for(let i in getPlayerData(client).keyBinds) {
|
||||
if(getPlayerData(client).keyBinds[i].key == keyId) {
|
||||
getPlayerData(client).keyBinds.splice(i, 1);
|
||||
}
|
||||
}
|
||||
//for(let i in getPlayerData(client).keyBinds) {
|
||||
// if(getPlayerData(client).keyBinds[i].key == keyId) {
|
||||
// getPlayerData(client).keyBinds.splice(i, 1);
|
||||
// }
|
||||
//}
|
||||
getPlayerData(client).keyBinds = getPlayerData(client).keyBinds.filter(keyBind => keyBind.key != keyId);
|
||||
sendRemoveAccountKeyBindToClient(client, keyId);
|
||||
|
||||
if(!doesPlayerHaveKeyBindsDisabled(client) && doesPlayerHaveKeyBindForCommand(client, "enter")) {
|
||||
@@ -195,13 +198,6 @@ function sendAccountKeyBindsToClient(client) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function loadKeyBindConfiguration() {
|
||||
let keyBindConfigFile = loadTextFile("config/keybind.json");
|
||||
return JSON.parse(keyBindConfigFile);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showKeyBindListCommand(command, params, client) {
|
||||
let keybindList = getPlayerData(client).keyBinds.map(function(x) { return `{ALTCOLOUR}${toUpperCase(getKeyNameFromId(x.key))}: {MAINCOLOUR}${x.commandString}`; });
|
||||
|
||||
@@ -214,29 +210,4 @@ function showKeyBindListCommand(command, params, client) {
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getKeyNamesInComboName(comboName) {
|
||||
if(comboName.indexOf("+") != -1) {
|
||||
return comboName.split("+");
|
||||
} else {
|
||||
return [comboName];
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getKeysInComboName(comboName) {
|
||||
let keyNames = getKeyNamesInComboName(comboName);
|
||||
let keys = [];
|
||||
for(let i in keyNames) {
|
||||
if(getKeyIdFromParams(keyNames[i])) {
|
||||
keys.push(getKeyIdFromParams(keyNames[i]));
|
||||
} else {
|
||||
keys.push(false);
|
||||
}
|
||||
}
|
||||
return keys
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -7,22 +7,8 @@
|
||||
// TYPE: Server (JavaScript)
|
||||
// ===========================================================================
|
||||
|
||||
let translateURL = "http://api.mymemory.translated.net/get?de={3}&q={0}&langpair={1}|{2}";
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function initLocaleScript() {
|
||||
logToConsole(LOG_INFO, "[VRR.Locale]: Initializing locale script ...");
|
||||
getServerData().localeStrings = loadAllLocaleStrings();
|
||||
|
||||
// Translation Cache
|
||||
getServerData().cachedTranslations = new Array(getGlobalConfig().locale.locales.length);
|
||||
getServerData().cachedTranslationFrom = new Array(getGlobalConfig().locale.locales.length);
|
||||
getServerData().cachedTranslationFrom.fill([]);
|
||||
getServerData().cachedTranslations.fill(getServerData().cachedTranslationFrom);
|
||||
|
||||
getGlobalConfig().locale.defaultLanguageId = getLocaleFromParams(getGlobalConfig().locale.defaultLanguageId);
|
||||
|
||||
logToConsole(LOG_INFO, "[VRR.Locale]: Locale script initialized!");
|
||||
}
|
||||
|
||||
@@ -30,8 +16,10 @@ function initLocaleScript() {
|
||||
|
||||
function getLocaleString(client, stringName, ...args) {
|
||||
let tempString = getRawLocaleString(stringName, getPlayerData(client).locale);
|
||||
if(tempString == "") {
|
||||
if(tempString == "" || tempString == null || typeof tempString == "undefined") {
|
||||
logToConsole(LOG_WARN, `[VRR.Locale] Locale string missing for ${stringName} on language ${getLocaleData(getPlayerData(client).locale).englishName}`);
|
||||
submitBugReport(client, `(AUTOMATED REPORT) Locale string "${stringName}" is missing for "${getPlayerLocaleName(client)}"`);
|
||||
return "";
|
||||
}
|
||||
|
||||
for(let i = 1; i <= args.length; i++) {
|
||||
@@ -45,7 +33,8 @@ function getLocaleString(client, stringName, ...args) {
|
||||
|
||||
function getLanguageLocaleString(localeId, stringName, ...args) {
|
||||
let tempString = getRawLocaleString(stringName, localeId);
|
||||
if(tempString == "") {
|
||||
if(tempString == "" || tempString == null || typeof tempString == "undefined") {
|
||||
logToConsole(LOG_WARN, `[VRR.Locale] Locale string missing for ${stringName} on language ${getLocaleData(getPlayerData(client).locale).englishName}`);
|
||||
submitBugReport(client, `(AUTOMATED REPORT) Locale string "${stringName}" is missing for "${getPlayerLocaleName(client)}"`);
|
||||
}
|
||||
|
||||
@@ -163,7 +152,7 @@ function setLocaleCommand(command, params, client) {
|
||||
getPlayerData(client).accountData.locale = localeId;
|
||||
getPlayerData(client).locale = localeId;
|
||||
messagePlayerSuccess(client, getLocaleString(client, "LocaleChanged1", getLocaleString(client, "LocaleNativeName")));
|
||||
sendPlayerLocaleStrings(client);
|
||||
sendPlayerLocaleId(client, localeId);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -188,9 +177,7 @@ function reloadLocaleConfigurationCommand(command, params, client) {
|
||||
getServerData().cachedTranslationFrom.fill([]);
|
||||
getServerData().cachedTranslations.fill(getServerData().cachedTranslationFrom);
|
||||
|
||||
getGlobalConfig().locale.defaultLanguageId = getLocaleFromParams(getGlobalConfig().locale.defaultLanguage);
|
||||
|
||||
messageAdmins(`${client.name}{MAINCOLOUR} has reloaded the locale settings and texts`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} has reloaded the locale settings and texts`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -209,7 +196,7 @@ async function translateMessage(messageText, translateFrom = getGlobalConfig().l
|
||||
}
|
||||
}
|
||||
|
||||
let thisTranslationURL = translateURL.format(encodeURI(messageText), toUpperCase(getGlobalConfig().locale.locales[translateFrom].isoCode), toUpperCase(getGlobalConfig().locale.locales[translateTo].isoCode), getGlobalConfig().locale.apiEmail);
|
||||
let thisTranslationURL = getGlobalConfig().locale.translateURL.format(encodeURI(messageText), toUpperCase(getGlobalConfig().locale.locales[translateFrom].isoCode), toUpperCase(getGlobalConfig().locale.locales[translateTo].isoCode), getGlobalConfig().locale.apiEmail);
|
||||
httpGet(
|
||||
thisTranslationURL,
|
||||
"",
|
||||
|
||||
@@ -17,11 +17,13 @@ function initMessagingScript() {
|
||||
function announceAdminAction(localeString, ...args) {
|
||||
let clients = getClients();
|
||||
for(let i in clients) {
|
||||
let messageText = getLocaleString.apply(null, [clients[i], localeString, args]);
|
||||
let argsArray = [clients[i], localeString];
|
||||
argsArray = argsArray.concat(args);
|
||||
let messageText = getLocaleString.apply(null, argsArray);
|
||||
messagePlayerNormal(clients[i], `⚠️ ${messageText}`, getColourByName("orange"));
|
||||
}
|
||||
|
||||
messageDiscordEventChannel(getLanguageLocaleString.apply(null, [0, localeString, args]));
|
||||
messageDiscordEventChannel(getLanguageLocaleString.apply(null, [0, localeString].concat(args)));
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -56,7 +58,7 @@ function messagePlayerNormal(client, messageText, colour = COLOUR_WHITE) {
|
||||
|
||||
function messageAdmins(messageText, colour = getColourByName("softRed")) {
|
||||
//
|
||||
//console.warn(`🛡️ ${plainMessage}`);
|
||||
//logToConsole(LOG_WARN, `🛡️ ${plainMessage}`);
|
||||
|
||||
let clients = getClients();
|
||||
for(let i in clients) {
|
||||
|
||||
@@ -296,7 +296,7 @@ function getPlayerInfoCommand(command, params, client) {
|
||||
}
|
||||
}
|
||||
|
||||
messagePlayerNormal(client, `{clanOrange}== {jobYellow}Player Info {clanOrange}==============================`);
|
||||
messagePlayerNormal(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderPlayerInfo")));
|
||||
|
||||
let clan = (getPlayerCurrentSubAccount(targetClient).clan != 0) ? `{ALTCOLOUR}${getClanData(getClanIdFromDatabaseId(getPlayerCurrentSubAccount(targetClient).clan)).name}[${getPlayerCurrentSubAccount(targetClient).clan}] (Rank: ${getClanRankData(getPlayerCurrentSubAccount(targetClient).clan, getPlayerCurrentSubAccount(targetClient).clanRank).name}[Level: ${getClanRankData(getPlayerCurrentSubAccount(targetClient).clan, getPlayerCurrentSubAccount(targetClient).clanRank).level}, DBID: ${getClanRankData(getPlayerCurrentSubAccount(targetClient).clan, getPlayerCurrentSubAccount(targetClient).clanRank).databaseId}` : `(None)`;
|
||||
let job = (getPlayerCurrentSubAccount(targetClient).job != 0) ? `{ALTCOLOUR}${getJobData(getJobIdFromDatabaseId(getPlayerCurrentSubAccount(targetClient).job)).name}[${getPlayerCurrentSubAccount(targetClient).job}] (Rank: ${getPlayerCurrentSubAccount(targetClient).jobRank})` : `(None)`;
|
||||
@@ -304,8 +304,8 @@ function getPlayerInfoCommand(command, params, client) {
|
||||
let stats = [
|
||||
`{MAINCOLOUR}Account: {ALTCOLOUR}${getPlayerData(targetClient).accountData.name}[${getPlayerData(targetClient).accountData.databaseId}]`,
|
||||
`{MAINCOLOUR}Character: {ALTCOLOUR}${getCharacterFullName(targetClient)}[${getPlayerCurrentSubAccount(targetClient).databaseId}]`,
|
||||
`{MAINCOLOUR}Connected: {ALTCOLOUR}${getTimeDifferenceDisplay(Math.ceil(sdl.tick/1000), getPlayerData(targetClient).connectTime)} ago`,
|
||||
`{MAINCOLOUR}Registered: ${getPlayerData(targetClient).accountData}`,
|
||||
`{MAINCOLOUR}Connected: {ALTCOLOUR}${getTimeDifferenceDisplay(getCurrentUnixTimestamp(), getPlayerData(targetClient).connectTime)} ago`,
|
||||
`{MAINCOLOUR}Registered: ${getPlayerData(targetClient).accountData.registerDate}`,
|
||||
`{MAINCOLOUR}Game Version: {ALTCOLOUR}${targetClient.gameVersion}`,
|
||||
`{MAINCOLOUR}Client Version: {ALTCOLOUR}${getPlayerData(targetClient).clientVersion}`,
|
||||
`{MAINCOLOUR}Skin: {ALTCOLOUR}${getSkinNameFromModel(getPlayerCurrentSubAccount(targetClient).skin)}[${getPlayerCurrentSubAccount(targetClient).skin}]`,
|
||||
@@ -322,6 +322,10 @@ function getPlayerInfoCommand(command, params, client) {
|
||||
// ===========================================================================
|
||||
|
||||
function playerChangeAFKState(client, afkState) {
|
||||
if(!getPlayerData(client)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
getPlayerData(client).afk = afkState;
|
||||
updateAllPlayerNameTags();
|
||||
}
|
||||
@@ -348,23 +352,26 @@ function checkPlayerSpawning() {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showPlayerPrompt(client, promptType, promptMessage, promptTitle) {
|
||||
if(promptType == VRR_PROMPT_NONE) {
|
||||
return false;
|
||||
}
|
||||
|
||||
getPlayerData(client).promptType = promptType;
|
||||
|
||||
function showPlayerPrompt(client, promptMessage, promptTitle, yesButtonText, noButtonText) {
|
||||
if(canPlayerUseGUI(client)) {
|
||||
showPlayerPromptGUI(client, promptMessage, promptTitle);
|
||||
showPlayerPromptGUI(client, promptMessage, promptTitle, yesButtonText, noButtonText);
|
||||
} else {
|
||||
messagePlayerNormal(client, `❓ ${promptMessage}`);
|
||||
messagePlayerInfo(client, `{MAINCOLOUR}Use {ALTCOLOUR}/yes or {ALTCOLOUR}/no`);
|
||||
messagePlayerInfo(client, getLocaleString(client, "PromptResponseTip", `{ALTCOLOUR}/yes{MAINCOLOUR}`, `{ALTCOLOUR}/no{MAINCOLOUR}`));
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
/**
|
||||
* This is a command handler function.
|
||||
*
|
||||
* @param {string} command - The command name used by the player
|
||||
* @param {string} params - The parameters/args string used with the command by the player
|
||||
* @param {Client} client - The client/player that used the command
|
||||
* @return {bool} Whether or not the command was successful
|
||||
*
|
||||
*/
|
||||
function updateServerGameTime() {
|
||||
if(isTimeSupported()) {
|
||||
game.time.hour = getServerConfig().hour;
|
||||
@@ -374,6 +381,15 @@ function updateServerGameTime() {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
/**
|
||||
* This is a command handler function.
|
||||
*
|
||||
* @param {string} command - The command name used by the player
|
||||
* @param {string} params - The parameters/args string used with the command by the player
|
||||
* @param {Client} client - The client/player that used the command
|
||||
* @return {bool} Whether or not the command was successful
|
||||
*
|
||||
*/
|
||||
function listOnlineAdminsCommand(command, params, client) {
|
||||
//== Admins ===================================
|
||||
messagePlayerNormal(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderAdminsList")));
|
||||
@@ -398,6 +414,15 @@ function listOnlineAdminsCommand(command, params, client) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
/**
|
||||
* This is a command handler function.
|
||||
*
|
||||
* @param {string} command - The command name used by the player
|
||||
* @param {string} params - The parameters/args string used with the command by the player
|
||||
* @param {Client} client - The client/player that used the command
|
||||
* @return {bool} Whether or not the command was successful
|
||||
*
|
||||
*/
|
||||
function gpsCommand(command, params, client) {
|
||||
messagePlayerNormal(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderBusinessList")));
|
||||
|
||||
@@ -407,17 +432,18 @@ function gpsCommand(command, params, client) {
|
||||
|
||||
switch(toLowerCase(params)) {
|
||||
case "police":
|
||||
blipColour = "businessBlue"
|
||||
case "policestation":
|
||||
blipColour = "mediumGrey"
|
||||
locationType = VRR_GPS_TYPE_POLICE;
|
||||
break;
|
||||
|
||||
case "hospital":
|
||||
blipColour = "businessBlue"
|
||||
blipColour = "mediumGrey"
|
||||
locationType = VRR_GPS_TYPE_HOSPITAL;
|
||||
break;
|
||||
|
||||
case "job":
|
||||
blipColour = "businessBlue"
|
||||
blipColour = "mediumGrey"
|
||||
locationType = VRR_GPS_TYPE_JOB;
|
||||
break;
|
||||
|
||||
@@ -425,7 +451,7 @@ function gpsCommand(command, params, client) {
|
||||
case "skins":
|
||||
case "clothes":
|
||||
case "player":
|
||||
blipColour = "businessBlue"
|
||||
blipColour = "mediumGrey"
|
||||
locationType = VRR_GPS_TYPE_BUSINESS;
|
||||
useType = VRR_ITEM_USETYPE_SKIN;
|
||||
break;
|
||||
@@ -436,20 +462,20 @@ function gpsCommand(command, params, client) {
|
||||
case "weapons":
|
||||
case "wep":
|
||||
case "weps":
|
||||
blipColour = "businessBlue"
|
||||
blipColour = "mediumGrey"
|
||||
locationType = VRR_GPS_TYPE_BUSINESS;
|
||||
useType = VRR_ITEM_USETYPE_WEAPON;
|
||||
break;
|
||||
|
||||
case "food":
|
||||
case "eat":
|
||||
blipColour = "businessBlue"
|
||||
blipColour = "mediumGrey"
|
||||
locationType = VRR_GPS_TYPE_BUSINESS;
|
||||
useType = VRR_ITEM_USETYPE_FOOD;
|
||||
break;
|
||||
|
||||
case "drink":
|
||||
blipColour = "businessBlue"
|
||||
blipColour = "mediumGrey"
|
||||
locationType = VRR_GPS_TYPE_BUSINESS;
|
||||
useType = VRR_ITEM_USETYPE_DRINK;
|
||||
break;
|
||||
@@ -457,7 +483,7 @@ function gpsCommand(command, params, client) {
|
||||
case "alcohol":
|
||||
case "booze":
|
||||
case "bar":
|
||||
blipColour = "businessBlue"
|
||||
blipColour = "mediumGrey"
|
||||
locationType = VRR_GPS_TYPE_BUSINESS;
|
||||
useType = VRR_ITEM_USETYPE_ALCOHOL;
|
||||
break;
|
||||
@@ -467,7 +493,7 @@ function gpsCommand(command, params, client) {
|
||||
case "vehrepair":
|
||||
case "spray":
|
||||
case "fix":
|
||||
blipColour = "businessBlue"
|
||||
blipColour = "mediumGrey"
|
||||
locationType = VRR_GPS_TYPE_BUSINESS;
|
||||
useType = VRR_ITEM_USETYPE_VEHREPAIR;
|
||||
break;
|
||||
@@ -476,7 +502,7 @@ function gpsCommand(command, params, client) {
|
||||
case "vehcolour":
|
||||
case "carcolour":
|
||||
case "colour":
|
||||
blipColour = "businessBlue"
|
||||
blipColour = "mediumGrey"
|
||||
locationType = VRR_GPS_TYPE_BUSINESS;
|
||||
useType = VRR_ITEM_USETYPE_VEHCOLOUR;
|
||||
break;
|
||||
@@ -485,12 +511,12 @@ function gpsCommand(command, params, client) {
|
||||
let itemTypeId = getItemTypeFromParams(params);
|
||||
if(getItemTypeData(itemTypeId) != false) {
|
||||
locationType = VRR_GPS_TYPE_BUSINESS;
|
||||
blipColour = "businessBlue";
|
||||
blipColour = "mediumGrey";
|
||||
useType = getItemTypeData(itemTypeId).useType;
|
||||
} else {
|
||||
let gameLocationId = getGameLocationFromParams(params);
|
||||
if(gameLocationId != false) {
|
||||
position = getGameConfig().locations[getServerGame()][gameLocationId][1]
|
||||
position = getGameConfig().locations[getGame()][gameLocationId][1]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -528,6 +554,15 @@ function gpsCommand(command, params, client) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
/**
|
||||
* This is a command handler function.
|
||||
*
|
||||
* @param {string} command - The command name used by the player
|
||||
* @param {string} params - The parameters/args string used with the command by the player
|
||||
* @param {Client} client - The client/player that used the command
|
||||
* @return {bool} Whether or not the command was successful
|
||||
*
|
||||
*/
|
||||
function stuckPlayerCommand(command, params, client) {
|
||||
if((getCurrentUnixTimestamp()-getPlayerData(client).lastStuckCommand) < getGlobalConfig().stuckCommandInterval) {
|
||||
messagePlayerError(client, "CantUseCommandYet");
|
||||
@@ -539,7 +574,7 @@ function stuckPlayerCommand(command, params, client) {
|
||||
|
||||
messagePlayerAlert(client, getLocaleString(client, "FixingStuck"));
|
||||
|
||||
if(getGameConfig().skinChangePosition[getServerGame()].length > 0) {
|
||||
if(getGameConfig().skinChangePosition[getGame()].length > 0) {
|
||||
if(getPlayerData(client).returnToPosition != null && getPlayerData(client).returnToType == VRR_RETURNTO_TYPE_SKINSELECT) {
|
||||
messagePlayerAlert(client, "You canceled the skin change.");
|
||||
restorePlayerCamera(client);
|
||||
@@ -598,6 +633,15 @@ function stuckPlayerCommand(command, params, client) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
/**
|
||||
* This is a command handler function.
|
||||
*
|
||||
* @param {string} command - The command name used by the player
|
||||
* @param {string} params - The parameters/args string used with the command by the player
|
||||
* @param {Client} client - The client/player that used the command
|
||||
* @return {bool} Whether or not the command was successful
|
||||
*
|
||||
*/
|
||||
function playerPedSpeakCommand(command, params, client) {
|
||||
if(areParamsEmpty(params)) {
|
||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||
@@ -607,4 +651,188 @@ function playerPedSpeakCommand(command, params, client) {
|
||||
makePlayerPedSpeak(client, params);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
// ===========================================================================
|
||||
|
||||
/**
|
||||
* This is a command handler function.
|
||||
*
|
||||
* @param {string} command - The command name used by the player
|
||||
* @param {string} params - The parameters/args string used with the command by the player
|
||||
* @param {Client} client - The client/player that used the command
|
||||
* @return {bool} Whether or not the command was successful
|
||||
*
|
||||
*/
|
||||
function lockCommand(command, params, client) {
|
||||
if(isPlayerInAnyVehicle(client)) {
|
||||
let vehicle = getPlayerVehicle(client);
|
||||
|
||||
if(!getVehicleData(vehicle)) {
|
||||
messagePlayerError(client, getLocaleString(client, "RandomVehicleCommandsDisabled"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!isPlayerInFrontVehicleSeat(client)) {
|
||||
messagePlayerError(client, getLocaleString(client, "MustBeInVehicleFrontSeat"));
|
||||
return false;
|
||||
}
|
||||
|
||||
getVehicleData(vehicle).locked = !getVehicleData(vehicle).locked;
|
||||
setVehicleLocked(vehicle, getVehicleData(vehicle).locked);
|
||||
getVehicleData(vehicle).needsSaved = true;
|
||||
|
||||
meActionToNearbyPlayers(client, `${toLowerCase(getLockedUnlockedFromBool(getVehicleData(vehicle).locked))} the ${getVehicleName(vehicle)}`);
|
||||
return true;
|
||||
} else {
|
||||
let vehicle = getClosestVehicle(getPlayerPosition(client));
|
||||
if(getDistance(getPlayerPosition(client), getVehiclePosition(vehicle)) <= getGlobalConfig().vehicleLockDistance) {
|
||||
if(!getVehicleData(vehicle)) {
|
||||
messagePlayerError(client, getLocaleString(client, "RandomVehicleCommandsDisabled"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!doesPlayerHaveVehicleKeys(client, vehicle)) {
|
||||
messagePlayerError(client, getLocaleString(client, "DontHaveVehicleKey"));
|
||||
return false;
|
||||
}
|
||||
|
||||
getVehicleData(vehicle).locked = !getVehicleData(vehicle).locked;
|
||||
setVehicleLocked(vehicle, getVehicleData(vehicle).locked);
|
||||
getVehicleData(vehicle).needsSaved = true;
|
||||
|
||||
meActionToNearbyPlayers(client, `${toLowerCase(getLockedUnlockedFromBool(getVehicleData(vehicle).locked))} the ${getVehicleName(vehicle)}`);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
let businessId = getPlayerBusiness(client);
|
||||
if(businessId != -1) {
|
||||
if(!canPlayerManageBusiness(client, businessId)) {
|
||||
messagePlayerError(client, getLocaleString(client, "CantModifyBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
getBusinessData(businessId).locked = !getBusinessData(businessId).locked;
|
||||
updateBusinessPickupLabelData(businessId);
|
||||
getBusinessData(businessId).needsSaved = true;
|
||||
|
||||
messagePlayerSuccess(client, `${getLockedUnlockedEmojiFromBool((getBusinessData(businessId).locked))} Business {businessBlue}${getBusinessData(businessId).name} {MAINCOLOUR}${getLockedUnlockedFromBool((getBusinessData(businessId).locked))}!`);
|
||||
return true;
|
||||
}
|
||||
|
||||
let houseId = getPlayerHouse(client);
|
||||
if(houseId != -1) {
|
||||
if(!canPlayerManageHouse(client, houseId)) {
|
||||
messagePlayerError(client, getLocaleString(client, "CantModifyHouse"));
|
||||
return false;
|
||||
}
|
||||
|
||||
getHouseData(houseId).locked = !getHouseData(houseId).locked;
|
||||
updateHousePickupLabelData(houseId);
|
||||
getHouseData(houseId).needsSaved = true;
|
||||
|
||||
messagePlayerSuccess(client, `House {houseGreen}${getHouseData(houseId).description} {MAINCOLOUR}${getLockedUnlockedFromBool((getHouseData(houseId).locked))}!`);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
/**
|
||||
* This is a command handler function.
|
||||
*
|
||||
* @param {string} command - The command name used by the player
|
||||
* @param {string} params - The parameters/args string used with the command by the player
|
||||
* @param {Client} client - The client/player that used the command
|
||||
* @return {bool} Whether or not the command was successful
|
||||
*
|
||||
*/
|
||||
function lightsCommand(command, params, client) {
|
||||
if(isPlayerInAnyVehicle(client)) {
|
||||
let vehicle = getPlayerVehicle(client);
|
||||
|
||||
if(!getVehicleData(vehicle)) {
|
||||
messagePlayerError(client, getLocaleString(client, "RandomVehicleCommandsDisabled"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!isPlayerInFrontVehicleSeat(client)) {
|
||||
messagePlayerError(client, getLocaleString(client, "MustBeInVehicleFrontSeat"));
|
||||
return false;
|
||||
}
|
||||
|
||||
getVehicleData(vehicle).lights = !getVehicleData(vehicle).lights;
|
||||
setVehicleLights(vehicle, getVehicleData(vehicle).lights)
|
||||
getVehicleData(vehicle).needsSaved = true;
|
||||
|
||||
meActionToNearbyPlayers(client, `turned ${toLowerCase(getOnOffFromBool(getVehicleData(vehicle).lights))} the ${getVehicleName(vehicle)}'s lights`);
|
||||
} else {
|
||||
/*
|
||||
let vehicle = getClosestVehicle(getPlayerPosition(client));
|
||||
if(vehicle != false) {
|
||||
if(getDistance(getPlayerPosition(client), getVehiclePosition(vehicle)) <= getGlobalConfig().vehicleLockDistance) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!getVehicleData(vehicle)) {
|
||||
messagePlayerError(client, getLocaleString(client, "RandomVehicleCommandsDisabled"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!doesPlayerHaveVehicleKeys(client, vehicle)) {
|
||||
messagePlayerError(client, getLocaleString(client, "DontHaveVehicleKey"));
|
||||
return false;
|
||||
}
|
||||
|
||||
getVehicleData(vehicle).lights = !getVehicleData(vehicle).lights;
|
||||
setVehicleLights(vehicle, getVehicleData(vehicle).lights);
|
||||
getVehicleData(vehicle).needsSaved = true;
|
||||
|
||||
meActionToNearbyPlayers(client, `${toLowerCase(getLockedUnlockedFromBool(getVehicleData(vehicle).locked))} the ${getVehicleName(vehicle)}`);
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
|
||||
let businessId = getPlayerBusiness(client);
|
||||
if(businessId != -1) {
|
||||
if(!canPlayerManageBusiness(client, businessId)) {
|
||||
messagePlayerError(client, getLocaleString(client, "CantModifyBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
getBusinessData(businessId).interiorLights = !getBusinessData(businessId).interiorLights;
|
||||
getBusinessData(businessId).needsSaved = true;
|
||||
|
||||
let clients = getClients();
|
||||
for(let i in clients) {
|
||||
if(getPlayerBusiness(client) == getPlayerBusiness(clients[i]) && getPlayerDimension(clients[i]) == getBusinessData(businessId).exitDimension) {
|
||||
updateInteriorLightsForPlayer(clients[i], getBusinessData(businessId).interiorLights);
|
||||
}
|
||||
}
|
||||
|
||||
meActionToNearbyPlayers(client, `turned ${toLowerCase(getOnOffFromBool((getBusinessData(businessId).interiorLights)))} on the business lights`);
|
||||
return true;
|
||||
}
|
||||
|
||||
let houseId = getPlayerHouse(client);
|
||||
if(houseId != -1) {
|
||||
if(!canPlayerManageHouse(client, houseId)) {
|
||||
messagePlayerError(client, getLocaleString(client, "CantModifyHouse"));
|
||||
return false;
|
||||
}
|
||||
|
||||
getHouseData(houseId).interiorLights = !getHouseData(houseId).interiorLights;
|
||||
getHouseData(houseId).needsSaved = true;
|
||||
|
||||
let clients = getClients();
|
||||
for(let i in clients) {
|
||||
if(getPlayerHouse(client) == getPlayerHouse(clients[i]) && getPlayerDimension(clients[i]) == getHouseData(houseId).exitDimension) {
|
||||
updateInteriorLightsForPlayer(clients[i], getHouseData(houseId).interiorLights);
|
||||
}
|
||||
}
|
||||
|
||||
meActionToNearbyPlayers(client, `turned ${toLowerCase(getOnOffFromBool((getHouseData(houseId).interiorLights)))} on the house lights`);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
1047
scripts/server/native/connected-nativeclass.js
Normal file
@@ -22,6 +22,23 @@ let builtInCommands = [
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
let disconnectReasons = [
|
||||
"Lost Connection",
|
||||
"Disconnected",
|
||||
"Unsupported Client",
|
||||
"Wrong Game",
|
||||
"Incorrect Password",
|
||||
"Unsupported Executable",
|
||||
"Disconnected",
|
||||
"Banned",
|
||||
"Failed",
|
||||
"Invalid Name",
|
||||
"Crashed",
|
||||
"Modified Game"
|
||||
];
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerPosition(client) {
|
||||
if(!areServerElementsSupported()) {
|
||||
return getPlayerData(client).syncPosition;
|
||||
@@ -92,7 +109,7 @@ function getPlayerInterior(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function setPlayerDimension(client, dimension) {
|
||||
logToConsole(LOG_DEBUG, `Setting ${getPlayerDisplayForConsole(client)}'s dimension to ${dimension}`);
|
||||
logToConsole(LOG_VERBOSE, `Setting ${getPlayerDisplayForConsole(client)}'s dimension to ${dimension}`);
|
||||
if(!areServerElementsSupported()) {
|
||||
getPlayerData(client).syncDimension = dimension;
|
||||
} else {
|
||||
@@ -105,7 +122,7 @@ function setPlayerDimension(client, dimension) {
|
||||
// ===========================================================================
|
||||
|
||||
function setPlayerInterior(client, interior) {
|
||||
logToConsole(LOG_DEBUG, `Setting ${getPlayerDisplayForConsole(client)}'s interior to ${interior}`);
|
||||
logToConsole(LOG_VERBOSE, `Setting ${getPlayerDisplayForConsole(client)}'s interior to ${interior}`);
|
||||
sendPlayerSetInterior(client, interior);
|
||||
if(isPlayerLoggedIn(client) && isPlayerSpawned(client)) {
|
||||
getPlayerCurrentSubAccount(client).interior = interior;
|
||||
@@ -261,7 +278,7 @@ function setPlayerHealth(client, health) {
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerHealth(client) {
|
||||
return getServerData(client).health;
|
||||
return getPlayerData(client).health;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -331,7 +348,7 @@ function takePlayerCash(client, amount) {
|
||||
|
||||
function disconnectPlayer(client) {
|
||||
logToConsole(LOG_DEBUG, `Disconnecting (kicking) ${getPlayerDisplayForConsole(client)}`);
|
||||
client.disconnect();
|
||||
disconnectPlayer(client);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -377,11 +394,12 @@ function getElementDimension(element) {
|
||||
// ===========================================================================
|
||||
|
||||
function setElementDimension(element, dimension) {
|
||||
if(typeof element.dimension != "undefined") {
|
||||
element.dimension = dimension;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
if(typeof element.dimension != "undefined") {
|
||||
logToConsole(LOG_VERBOSE, `Setting element ${element} (${element.id}) dimension to ${dimension}`);
|
||||
element.dimension = dimension;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -420,14 +438,20 @@ function givePlayerArmour(client, amount) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getServerGame() {
|
||||
return getGame();
|
||||
function consolePrint(text) {
|
||||
console.log(text);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function consolePrint(text) {
|
||||
console.log(text);
|
||||
function consoleWarn(text) {
|
||||
console.warn(text);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function consoleError(text) {
|
||||
console.error(text);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -495,7 +519,7 @@ function destroyGameElement(element) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function isMeleeWeapon(weaponId, gameId = getServerGame()) {
|
||||
function isMeleeWeapon(weaponId, gameId = getGame()) {
|
||||
return (getGameConfig().meleeWeapons[gameId].indexOf(weaponId) != -1);
|
||||
}
|
||||
|
||||
@@ -508,6 +532,9 @@ function getPlayerLastVehicle(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function isVehicleObject(vehicle) {
|
||||
if(vehicle == null || vehicle == undefined) {
|
||||
return false;
|
||||
}
|
||||
return (vehicle.type == ELEMENT_VEHICLE);
|
||||
}
|
||||
|
||||
@@ -520,7 +547,8 @@ function repairVehicle(vehicle) {
|
||||
// ===========================================================================
|
||||
|
||||
function setVehicleLights(vehicle, lights) {
|
||||
vehicle.lights = lights;
|
||||
setEntityData(vehicle, "vrr.lights", lights, true);
|
||||
sendNetworkEventToPlayer("vrr.veh.lights", null, vehicle.id, lights);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -593,7 +621,7 @@ function createGameVehicle(modelIndex, position, heading, toClient = null) {
|
||||
|
||||
function createGameCivilian(modelIndex, position, heading, toClient = null) {
|
||||
if(areServerElementsSupported()) {
|
||||
let civilian = game.createCivilian(getGameConfig().skins[getGame()][modelIndex][0], 0);
|
||||
let civilian = game.createCivilian(getGameConfig().skins[getGame()][modelIndex][1], 0);
|
||||
if(!isNull(civilian)) {
|
||||
civilian.position = position;
|
||||
civilian.heading = heading;
|
||||
@@ -608,7 +636,7 @@ function createGameCivilian(modelIndex, position, heading, toClient = null) {
|
||||
// ===========================================================================
|
||||
|
||||
function getIsland(position) {
|
||||
if(getServerGame() == VRR_GAME_GTA_III) {
|
||||
if(getGame() == VRR_GAME_GTA_III) {
|
||||
if(position.x > 616) {
|
||||
return VRR_ISLAND_PORTLAND;
|
||||
} else if(position.x < -283) {
|
||||
@@ -644,6 +672,14 @@ function setGameTime(hour, minute, minuteDuration = 1000) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setGameWeather(weather) {
|
||||
if(isWeatherSupported()) {
|
||||
mp.world.weather = weather;
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setPlayerFightStyle(client, fightStyleId) {
|
||||
if(!isPlayerSpawned(client)) {
|
||||
return false;
|
||||
@@ -653,7 +689,7 @@ function setPlayerFightStyle(client, fightStyleId) {
|
||||
return false;
|
||||
}
|
||||
|
||||
setEntityData(getPlayerElement(client), "vrr.fightStyle", [getGameConfig().fightStyles[getServerGame()][fightStyleId][1][0], getGameConfig().fightStyles[getServerGame()][fightStyleId][1][1]]);
|
||||
setEntityData(getPlayerElement(client), "vrr.fightStyle", [getGameConfig().fightStyles[getGame()][fightStyleId][1][0], getGameConfig().fightStyles[getGame()][fightStyleId][1][1]]);
|
||||
forcePlayerToSyncElementProperties(null, getPlayerElement(client));
|
||||
}
|
||||
|
||||
@@ -739,7 +775,7 @@ function givePlayerWeaponAmmo(client, ammo) {
|
||||
|
||||
function getPlayerWeapon(client) {
|
||||
if(areServerElementsSupported(client)) {
|
||||
return getPlayerPed(client).weapon;;
|
||||
return getPlayerPed(client).weapon;
|
||||
} else {
|
||||
return getPlayerData(client).syncWeapon;
|
||||
}
|
||||
@@ -748,26 +784,26 @@ function getPlayerWeapon(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function connectToDatabase() {
|
||||
if(databaseConfig.usePersistentConnection) {
|
||||
if(getDatabaseConfig().usePersistentConnection) {
|
||||
if(persistentDatabaseConnection == null) {
|
||||
logToConsole(LOG_DEBUG, "[VRR.Database] Initializing database connection ...");
|
||||
persistentDatabaseConnection = module.mysql.connect(databaseConfig.host, databaseConfig.user, databaseConfig.pass, databaseConfig.name, databaseConfig.port);
|
||||
logToConsole(LOG_DEBUG, `[VRR.Database] Initializing database connection ...`);
|
||||
persistentDatabaseConnection = module.mysql.connect(getDatabaseConfig().host, getDatabaseConfig().user, getDatabaseConfig().pass, getDatabaseConfig().name, getDatabaseConfig().port);
|
||||
if(persistentDatabaseConnection.error) {
|
||||
console.warn("[VRR.Database] Database connection error: " + toString(persistentDatabaseConnection.error));
|
||||
logToConsole(LOG_ERROR, `[VRR.Database] Database connection error: ${persistentDatabaseConnection.error}`);
|
||||
persistentDatabaseConnection = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
logToConsole(LOG_DEBUG, "[VRR.Database] Database connection successful!");
|
||||
logToConsole(LOG_DEBUG, `[VRR.Database] Database connection successful!`);
|
||||
return persistentDatabaseConnection;
|
||||
} else {
|
||||
logToConsole(LOG_DEBUG, "[VRR.Database] Using existing database connection.");
|
||||
logToConsole(LOG_DEBUG, `[VRR.Database] Using existing database connection.`);
|
||||
return persistentDatabaseConnection;
|
||||
}
|
||||
} else {
|
||||
let databaseConnection = module.mysql.connect(databaseConfig.host, databaseConfig.user, databaseConfig.pass, databaseConfig.name, databaseConfig.port);
|
||||
let databaseConnection = module.mysql.connect(getDatabaseConfig().host, getDatabaseConfig().user, getDatabaseConfig().pass, getDatabaseConfig().name, getDatabaseConfig().port);
|
||||
if(databaseConnection.error) {
|
||||
console.warn("[VRR.Database] Database connection error: " + toString(persistentDatabaseConnection.error));
|
||||
logToConsole(LOG_ERROR, `[VRR.Database] Database connection error: ${persistentDatabaseConnection.error}`);
|
||||
return false;
|
||||
} else {
|
||||
return databaseConnection;
|
||||
@@ -778,7 +814,7 @@ function connectToDatabase() {
|
||||
// ===========================================================================
|
||||
|
||||
function disconnectFromDatabase(dbConnection) {
|
||||
if(!databaseConfig.usePersistentConnection) {
|
||||
if(!getDatabaseConfig().usePersistentConnection) {
|
||||
try {
|
||||
dbConnection.close();
|
||||
logToConsole(LOG_DEBUG, `[VRR.Database] Database connection closed successfully`);
|
||||
@@ -791,9 +827,16 @@ function disconnectFromDatabase(dbConnection) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function queryDatabase(dbConnection, queryString) {
|
||||
function queryDatabase(dbConnection, queryString, useThread = false) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Database] Query string: ${queryString}`);
|
||||
return dbConnection.query(queryString);
|
||||
if(useThread == true) {
|
||||
Promise.resolve().then(() => {
|
||||
let queryResult = dbConnection.query(queryString);
|
||||
return queryResult;
|
||||
});
|
||||
} else {
|
||||
return dbConnection.query(queryString);
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -838,14 +881,8 @@ function freeDatabaseQuery(dbQuery) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
async function fetchQueryAssoc(dbQuery) {
|
||||
let queryAssoc = new Promise(function() {
|
||||
let result = dbConnection.query(queryString);
|
||||
let tempAassoc = result.fetchAssoc();
|
||||
result.free();
|
||||
resolve(tempAassoc);
|
||||
});
|
||||
return queryAssoc;
|
||||
function fetchQueryAssoc(dbQuery) {
|
||||
return dbQuery.fetchAssoc();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -883,102 +920,6 @@ function quickDatabaseQuery(queryString) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function executeDatabaseQueryCommand(command, params, client) {
|
||||
if(areParamsEmpty(params)) {
|
||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!targetClient) {
|
||||
messagePlayerError(client, "That player was not found!");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(targetCode == "") {
|
||||
messagePlayerError(client, "You didn't enter any code!");
|
||||
return false;
|
||||
}
|
||||
|
||||
let success = quickDatabaseQuery(params);
|
||||
|
||||
if(!success) {
|
||||
messagePlayerAlert(client, `Database query failed to execute: {ALTCOLOUR}${query}`);
|
||||
} else if(typeof success != "boolean") {
|
||||
messagePlayeSuccess(client, `Database query successful: {ALTCOLOUR}${query}`);
|
||||
messagePlayerInfo(client, `Returns: ${success}`);
|
||||
} else {
|
||||
messagePlayerSuccess(client, `Database query successful: {ALTCOLOUR}${query}`);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setConstantsAsGlobalVariablesInDatabase() {
|
||||
let dbConnection = connectToDatabase();
|
||||
let entries = Object.entries(global);
|
||||
for(let i in entries) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Database] Checking entry ${i} (${entries[i]})`);
|
||||
if(toString(i).slice(0, 3).indexOf("VRR_") != -1) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Database] Adding ${i} (${entries[i]}) to database global variables`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function loadDatabaseConfiguration() {
|
||||
let databaseConfigFile = loadTextFile("config/database.json");
|
||||
return JSON.parse(databaseConfigFile);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function createDatabaseInsertQuery(tableName, data) {
|
||||
let fields = [];
|
||||
let values = [];
|
||||
|
||||
for(let i in data) {
|
||||
if(data[i][1] != "undefined" && data[i][1] != NaN && data[i][0] != 'NaN') {
|
||||
if(data[i][1] != "undefined" && data[i][1] != NaN && data[i][1] != 'NaN') {
|
||||
fields.push(data[i][0]);
|
||||
|
||||
if(typeof data[i][1] == "string") {
|
||||
values.push(`'${data[i][1]}'`);
|
||||
} else {
|
||||
values.push(data[i][1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let queryString = `INSERT INTO ${tableName} (${fields.join(", ")}) VALUES (${values.join(", ")})`;
|
||||
return queryString;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function createDatabaseUpdateQuery(tableName, data, whereClause) {
|
||||
let values = [];
|
||||
|
||||
for(let i in data) {
|
||||
if(data[i][0] != "undefined" && data[i][0] != NaN && data[i][0] != 'NaN') {
|
||||
if(data[i][1] != "undefined" && data[i][1] != NaN && data[i][1] != 'NaN') {
|
||||
if(typeof data[i][1] == "string") {
|
||||
values.push(`${data[i][0]}='${data[i][1]}'`);
|
||||
} else {
|
||||
values.push(`${data[i][0]}=${data[i][1]}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let queryString = `UPDATE ${tableName} SET ${values.join(", ")} WHERE ${whereClause}`;
|
||||
return queryString;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function sendNetworkEventToPlayer(eventName, client, ...args) {
|
||||
let argsArray = [eventName, client];
|
||||
argsArray = argsArray.concat(args);
|
||||
@@ -1041,6 +982,9 @@ function getClosestCivilian(position) {
|
||||
// ===========================================================================
|
||||
|
||||
function getVehiclesInRange(position, range) {
|
||||
if(getGame() == VRR_GAME_GTA_IV) {
|
||||
return getServerData().vehicles.reduce((i, j) => (getDistance(position, i.syncPosition) <= getDistance(position, j.syncPosition)) ? i : j);
|
||||
}
|
||||
return getElementsByTypeInRange(ELEMENT_VEHICLE, position, range);
|
||||
}
|
||||
|
||||
@@ -1095,7 +1039,7 @@ function getPlayerPing(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function setVehicleHealth(vehicle, health) {
|
||||
vehicle.health = 1000;
|
||||
vehicle.health = health;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -1150,30 +1094,43 @@ function getPlayerPed(client) {
|
||||
|
||||
function setEntityData(entity, dataName, dataValue, syncToClients = true) {
|
||||
if(entity != null) {
|
||||
return entity.setData(dataName, dataValue, syncToClients);
|
||||
if(areServerElementsSupported()) {
|
||||
return entity.setData(dataName, dataValue, syncToClients);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function removeEntityData(entity, dataName) {
|
||||
if(entity != null) {
|
||||
return entity.removeData(dataName);
|
||||
if(areServerElementsSupported()) {
|
||||
return entity.removeData(dataName);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return false;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function doesEntityDataExist(entity, dataName) {
|
||||
if(entity != null) {
|
||||
return (entity.getData(dataName) != null);
|
||||
if(areServerElementsSupported()) {
|
||||
return (entity.getData(dataName) != null);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
<<<<<<< Updated upstream
|
||||
=======
|
||||
// ===========================================================================
|
||||
|
||||
function disconnectPlayer(client) {
|
||||
client.disconnect();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerId(client) {
|
||||
@@ -1313,5 +1270,4 @@ function bindServerEventHandler(eventName, bindTo, handlerFunction) {
|
||||
});
|
||||
}
|
||||
|
||||
>>>>>>> Stashed changes
|
||||
// ===========================================================================
|
||||
@@ -2,151 +2,141 @@
|
||||
// Vortrex's Roleplay Resource
|
||||
// https://github.com/VortrexFTW/gtac_roleplay
|
||||
// ===========================================================================
|
||||
// FILE: ragemp.js
|
||||
// DESC: Provides wrapped natives for RageMP
|
||||
// FILE: connected.js
|
||||
// DESC: Provides wrapped natives for GTA Connected and Mafia Connected mods
|
||||
// TYPE: Server (JavaScript)
|
||||
// ===========================================================================
|
||||
|
||||
class DatabaseConnection {
|
||||
constructor(host, username, password, database, port = 3306) {
|
||||
this.host = host;
|
||||
this.port = port;
|
||||
this.username = username;
|
||||
this.password = password;
|
||||
this.connection = database;
|
||||
this.insertId = 0;
|
||||
this.error = null;
|
||||
|
||||
let handle = mysql.createConnection({
|
||||
host: this.host,
|
||||
port: this.port,
|
||||
username: this.username,
|
||||
password: this.password,
|
||||
database: this.database
|
||||
});
|
||||
|
||||
this.connection = handle;
|
||||
}
|
||||
|
||||
query(queryString) {
|
||||
return new DatabaseQuery(this.connection, queryString);
|
||||
}
|
||||
|
||||
close() {
|
||||
this.connection.close();
|
||||
}
|
||||
}
|
||||
|
||||
class DatabaseQuery {
|
||||
constructor(connection, queryString) {
|
||||
this.connection = connection;
|
||||
this.rows = [];
|
||||
this.fields = [];
|
||||
this.numRows = 0;
|
||||
|
||||
this.connection.query(queryString, function(err, results, fields) {
|
||||
if(err) {
|
||||
logToConsole(LOG_DEBUG|LOG_ERROR, err);
|
||||
return false;
|
||||
}
|
||||
|
||||
this.rows = results;
|
||||
this.fields = fields;
|
||||
|
||||
this.connection.insertId = results.insertId;
|
||||
this.numRows = results.changedRows;
|
||||
});
|
||||
}
|
||||
|
||||
fetchAssoc() {
|
||||
return this.rows;
|
||||
}
|
||||
|
||||
free() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
const VRR_ELEMENT_NONE = 0;
|
||||
const VRR_ELEMENT_VEHICLE = 1;
|
||||
const VRR_ELEMENT_PLAYER = 2;
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
let builtInCommands = [
|
||||
|
||||
"refresh",
|
||||
"restart",
|
||||
"stop",
|
||||
"start",
|
||||
"reconnect",
|
||||
"setname",
|
||||
"connect",
|
||||
"disconnect",
|
||||
"say",
|
||||
"dumpdoc",
|
||||
];
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
let disconnectReasons = [
|
||||
|
||||
"Lost Connection",
|
||||
"Disconnected",
|
||||
"Unsupported Client",
|
||||
"Wrong Game",
|
||||
"Incorrect Password",
|
||||
"Unsupported Executable",
|
||||
"Disconnected",
|
||||
"Banned",
|
||||
"Failed",
|
||||
"Invalid Name",
|
||||
"Crashed",
|
||||
"Modified Game"
|
||||
];
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerPosition(client) {
|
||||
return client.position;
|
||||
if(!areServerElementsSupported()) {
|
||||
return getPlayerData(client).syncPosition;
|
||||
} else {
|
||||
if(getPlayerPed(client) != null) {
|
||||
return getPlayerPed(client).position;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setPlayerPosition(client, position) {
|
||||
logToConsole(LOG_DEBUG, `Setting ${getPlayerDisplayForConsole(client)}'s position to ${position.x}, ${position.y}, ${position.z}`);
|
||||
client.position = position;
|
||||
sendPlayerSetPosition(client, position);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerHeading(client) {
|
||||
return client.heading
|
||||
if(!areServerElementsSupported()) {
|
||||
return getPlayerData(client).syncHeading;
|
||||
} else {
|
||||
if(getPlayerPed(client) != null) {
|
||||
return getPlayerPed(client).heading;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setPlayerHeading(client, heading) {
|
||||
logToConsole(LOG_DEBUG, `Setting ${getPlayerDisplayForConsole(client)}'s heading to ${heading}`);
|
||||
client.heading = heading;
|
||||
sendPlayerSetHeading(client, heading);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerVehicle(client) {
|
||||
return client.vehicle;
|
||||
if(!areServerElementsSupported()) {
|
||||
return getPlayerData().syncVehicle;
|
||||
} else {
|
||||
if(getPlayerPed(client).vehicle) {
|
||||
return getPlayerPed(client).vehicle;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerDimension(client) {
|
||||
return client.dimension;
|
||||
if(!areServerElementsSupported()) {
|
||||
return getPlayerData(client).syncDimension;
|
||||
} else {
|
||||
if(getPlayerPed(client) != null) {
|
||||
return getPlayerPed(client).dimension;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerInterior(client) {
|
||||
return 0;
|
||||
return getPlayerCurrentSubAccount(client).interior || 0;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setPlayerDimension(client, dimension) {
|
||||
logToConsole(LOG_VERBOSE, `Setting ${getPlayerDisplayForConsole(client)}'s dimension to ${dimension}`);
|
||||
client.dimension = dimension;
|
||||
if(!areServerElementsSupported()) {
|
||||
getPlayerData(client).syncDimension = dimension;
|
||||
} else {
|
||||
if(getPlayerPed(client) != null) {
|
||||
getPlayerPed(client).dimension = dimension;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setPlayerInterior(client, interior) {
|
||||
logToConsole(LOG_VERBOSE, `Setting ${getPlayerDisplayForConsole(client)}'s interior to ${interior}`);
|
||||
return false;
|
||||
sendPlayerSetInterior(client, interior);
|
||||
if(isPlayerLoggedIn(client) && isPlayerSpawned(client)) {
|
||||
getPlayerCurrentSubAccount(client).interior = interior;
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function isPlayerInAnyVehicle(client) {
|
||||
return (client.vehicle != null);
|
||||
if(!areServerElementsSupported()) {
|
||||
return (getPlayerData().syncVehicle != null);
|
||||
} else {
|
||||
return (getPlayerPed(client).vehicle != null);
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -156,7 +146,17 @@ function getPlayerVehicleSeat(client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return client.seat;
|
||||
if(!areServerElementsSupported()) {
|
||||
return getPlayerData().syncVehicleSeat;
|
||||
} else {
|
||||
for(let i = 0 ; i <= 8 ; i++) {
|
||||
if(getPlayerVehicle(client).getOccupant(i) == getPlayerPed(client)) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -180,37 +180,60 @@ function getVehicleHeading(vehicle) {
|
||||
// ===========================================================================
|
||||
|
||||
function setVehicleHeading(vehicle, heading) {
|
||||
if(getGame() == VRR_GAME_GTA_IV) {
|
||||
return sendNetworkEventToPlayer("vrr.vehPosition", null, getVehicleForNetworkEvent(vehicle), heading);
|
||||
}
|
||||
return vehicle.heading = heading;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getElementTransient(element) {
|
||||
if(typeof element.transient != "undefined") {
|
||||
return element.transient;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setElementTransient(element, state) {
|
||||
if(typeof element.transient != "undefined") {
|
||||
element.transient = state;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getVehicleSyncer(vehicle) {
|
||||
return null;
|
||||
return getElementSyncer(vehicle);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getVehicleForNetworkEvent(vehicle) {
|
||||
if(getGame() == VRR_GAME_GTA_IV) {
|
||||
if(getVehicleData(vehicle).ivNetworkId != -1) {
|
||||
return getVehicleData(vehicle).ivNetworkId;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
return vehicle.id;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function deleteGameElement(element) {
|
||||
element.destroy();
|
||||
try {
|
||||
if(element != null) {
|
||||
destroyElement(element);
|
||||
return true;
|
||||
}
|
||||
} catch(error) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -223,52 +246,70 @@ function isPlayerInFrontVehicleSeat(client) {
|
||||
|
||||
function removePlayerFromVehicle(client) {
|
||||
logToConsole(LOG_DEBUG, `Removing ${getPlayerDisplayForConsole(client)} from their vehicle`);
|
||||
client.removeFromVehicle();
|
||||
sendPlayerRemoveFromVehicle(client);
|
||||
return true;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setPlayerSkin(client, skinIndex) {
|
||||
client.model = getGameConfig().skins[getGame()][skinIndex][0];
|
||||
logToConsole(LOG_DEBUG, `Setting ${getPlayerDisplayForConsole(client)}'s skin to ${getGameConfig().skins[getGame()][skinIndex][0]} (Index: ${skinIndex}, Name: ${getGameConfig().skins[getGame()][skinIndex][1]})`);
|
||||
if(getGame() == VRR_GAME_GTA_IV) {
|
||||
triggerNetworkEvent("vrr.localPlayerSkin", client, getGameConfig().skins[getGame()][skinIndex][0]);
|
||||
} else {
|
||||
getPlayerPed(client).modelIndex = getGameConfig().skins[getGame()][skinIndex][0];
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerSkin(client) {
|
||||
return getSkinIndexFromModel(client.model);
|
||||
return getSkinIndexFromModel(client.player.modelIndex);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setPlayerHealth(client, health) {
|
||||
logToConsole(LOG_DEBUG, `Setting ${getPlayerDisplayForConsole(client)}'s health to ${health}`);
|
||||
client.health = health;
|
||||
sendPlayerSetHealth(client, health);
|
||||
getServerData(client).health = health;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerHealth(client) {
|
||||
return client.health;
|
||||
return getPlayerData(client).health;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setPlayerArmour(client, armour) {
|
||||
logToConsole(LOG_DEBUG, `Setting ${getPlayerDisplayForConsole(client)}'s armour to ${armour}`);
|
||||
client.armour = armour;
|
||||
sendPlayerSetArmour(client, armour);
|
||||
//client.player.armour = armour;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getPlayerArmour(client) {
|
||||
return client.armour;
|
||||
if(areServerElementsSupported(client)) {
|
||||
return getPlayerPed(client).armour;
|
||||
} else {
|
||||
return getPlayerData(client).syncArmour;
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setPlayerCash(client, amount) {
|
||||
if(client == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(isNaN(amount)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
getPlayerCurrentSubAccount(client).cash = toInteger(amount);
|
||||
updatePlayerCash(client);
|
||||
}
|
||||
@@ -305,6 +346,14 @@ function takePlayerCash(client, amount) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function disconnectPlayer(client) {
|
||||
logToConsole(LOG_DEBUG, `Disconnecting (kicking) ${getPlayerDisplayForConsole(client)}`);
|
||||
disconnectPlayer(client);
|
||||
return false;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getElementSyncer(element) {
|
||||
return getClients()[element.syncer];
|
||||
}
|
||||
@@ -725,14 +774,7 @@ function connectToDatabase() {
|
||||
return persistentDatabaseConnection;
|
||||
}
|
||||
} else {
|
||||
let databaseConnection = mysql.createConnection({
|
||||
host: getDatabaseConfig().host,
|
||||
user: getDatabaseConfig().user,
|
||||
password: getDatabaseConfig().pass,
|
||||
database: getDatabaseConfig().name,
|
||||
port: getDatabaseConfig().port
|
||||
});
|
||||
|
||||
let databaseConnection = module.mysql.connect(getDatabaseConfig().host, getDatabaseConfig().user, getDatabaseConfig().pass, getDatabaseConfig().name, getDatabaseConfig().port);
|
||||
if(databaseConnection.error) {
|
||||
logToConsole(LOG_ERROR, `[VRR.Database] Database connection error: ${persistentDatabaseConnection.error}`);
|
||||
return false;
|
||||
@@ -778,7 +820,7 @@ function escapeDatabaseString(dbConnection, unsafeString = "") {
|
||||
}
|
||||
|
||||
if(typeof unsafeString == "string") {
|
||||
return dbConnection.escape(unsafeString);
|
||||
return dbConnection.escapeString(unsafeString);
|
||||
}
|
||||
return unsafeString;
|
||||
}
|
||||
@@ -812,12 +854,8 @@ function freeDatabaseQuery(dbQuery) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function fetchQueryAssoc(queryString) {
|
||||
let queryResult = dbConnection.query(queryString, function(error, result, fields) {
|
||||
resolve(result);
|
||||
});
|
||||
|
||||
return queryResult;
|
||||
function fetchQueryAssoc(dbQuery) {
|
||||
return dbQuery.fetchAssoc();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
@@ -8,12 +8,8 @@
|
||||
// ===========================================================================
|
||||
|
||||
function initNPCScript() {
|
||||
if(!getServerConfig().devServer) {
|
||||
getServerData().npcs = loadNPCsFromDatabase();
|
||||
}
|
||||
|
||||
setNPCDataIndexes();
|
||||
spawnNPCs();
|
||||
logToConsole(LOG_INFO, "[VRR.NPC]: Initializing NPC script ...");
|
||||
logToConsole(LOG_INFO, "[VRR.NPC]: NPC script initialized successfully!");
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -46,8 +42,8 @@ function createNPCCommand(client, command, params) {
|
||||
|
||||
let position = getPosInFrontOfPos(getPlayerPosition(client), getPlayerHeading(client), 3);
|
||||
|
||||
let npcId = createNPC(skinId, position, getPlayerHeading(client));
|
||||
messageAdmins(`${client.name}{MAINCOLOUR} created a ${getSkinNameFromIndex(getNPCData(npcId).skin)} NPC!`);
|
||||
let npcId = createNPC(skinId, position, getPlayerHeading(client), getPlayerInterior(client), getPlayerDimension());
|
||||
messageAdmins(`${getPlayerName(client)}{MAINCOLOUR} created a ${getSkinNameFromIndex(getNPCData(npcId).skin)} NPC!`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -139,7 +135,7 @@ function loadNPCTriggerResponsesFromDatabase(npcTriggerDatabaseId) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function saveNPCsToDatabase() {
|
||||
function saveAllNPCsToDatabase() {
|
||||
if(getServerConfig().devServer) {
|
||||
return false;
|
||||
}
|
||||
@@ -152,6 +148,10 @@ function saveNPCsToDatabase() {
|
||||
// ===========================================================================
|
||||
|
||||
function saveNPCToDatabase(npcDataId) {
|
||||
if(getServerConfig().devServer) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getNPCData(npcDataId) == null) {
|
||||
// Invalid NPC data
|
||||
return false;
|
||||
@@ -175,11 +175,11 @@ function saveNPCToDatabase(npcDataId) {
|
||||
if(tempNPCData.ped != false) {
|
||||
if(!tempNPCData.spawnLocked) {
|
||||
if(areServerElementsSupported()) {
|
||||
tempNPCData.spawnPosition = tempNPCData.vehicle.position;
|
||||
tempNPCData.spawnRotation = tempNPCData.vehicle.heading;
|
||||
tempNPCData.position = tempNPCData.ped.position;
|
||||
tempNPCData.heading = tempNPCData.ped.heading;
|
||||
} else {
|
||||
tempNPCData.spawnPosition = tempNPCData.syncPosition;
|
||||
tempNPCData.spawnRotation = tempNPCData.syncHeading;
|
||||
tempNPCData.position = tempNPCData.syncPosition;
|
||||
tempNPCData.heading = tempNPCData.syncHeading;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -273,7 +273,7 @@ function spawnNPC(npcIndex) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function spawnNPCs() {
|
||||
function spawnAllNPCs() {
|
||||
for(let i in getServerData().npcs) {
|
||||
spawnNPC(npcIndex);
|
||||
}
|
||||
@@ -297,7 +297,7 @@ function deleteNPCCommand(command, params, client) {
|
||||
let npcName = getNPCData(closestNPC).name;
|
||||
|
||||
deleteNPC(closestNPC);
|
||||
messageAdmins(`${client.name}{MAINCOLOUR} deleted NPC {npcPink}${npcName}`);
|
||||
messageAdmins(`${getPlayerName(client)}{MAINCOLOUR} deleted NPC {npcPink}${npcName}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -365,17 +365,19 @@ function getClosestNPC(position) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function createNPC(skinIndex, position, heading) {
|
||||
function createNPC(skinIndex, position, heading, interior, dimension) {
|
||||
let tempNPCData = new NPCData(false);
|
||||
tempNPCData.position = position;
|
||||
tempNPCData.heading = heading;
|
||||
tempNPCData.skin = skinIndex;
|
||||
tempNPCData.interior = interior;
|
||||
tempNPCData.dimension = dimension;
|
||||
tempNPCData.animationName = "";
|
||||
|
||||
let npcIndex = getServerData().npcs.push(tempNPCData);
|
||||
setNPCDataIndexes();
|
||||
|
||||
spawnNPC(npcIndex-1);
|
||||
setNPCDataIndexes();
|
||||
|
||||
return npcIndex-1;
|
||||
}
|
||||
|
||||
@@ -8,11 +8,8 @@
|
||||
// ===========================================================================
|
||||
|
||||
function initRaceScript() {
|
||||
if(!getServerConfig().devServer) {
|
||||
getServerData().races = loadRacesFromDatabase();
|
||||
}
|
||||
|
||||
setRaceDataIndexes();
|
||||
logToConsole(LOG_INFO, "[VRR.Race]: Initializing race script ...");
|
||||
logToConsole(LOG_INFO, "[VRR.Race]: Race script initialized successfully!");
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -28,4 +25,56 @@ function getRaceData(raceId) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setAllRaceDataIndexes() {
|
||||
for(let i in getServerData().races) {
|
||||
getServerData().races[i].index = i;
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function loadRacesFromDatabase() {
|
||||
// To-do
|
||||
return [];
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function saveRacesToDatabase() {
|
||||
if(getServerConfig().devServer) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for(let i in getServerData().races) {
|
||||
saveRaceToDatabase(getServerData().races[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function saveRaceToDatabase(raceData) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function createRaceCommand(command, params, client) {
|
||||
if(areParamsEmpty(params)) {
|
||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||
return false;
|
||||
}
|
||||
|
||||
let raceId = getRaceFromParams(params);
|
||||
|
||||
if(raceId == false) {
|
||||
messagePlayerError(client, "A race with that name already exists!");
|
||||
return false;
|
||||
}
|
||||
|
||||
createRace(params);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} created race {ALTCOLOUR}${params}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -9,11 +9,6 @@
|
||||
|
||||
function initRadioScript() {
|
||||
logToConsole(LOG_INFO, "[VRR.Radio]: Initializing radio script ...");
|
||||
if(!getServerConfig().devServer) {
|
||||
getServerData().radioStations = loadRadioStationsFromDatabase();
|
||||
}
|
||||
|
||||
setRadioStationIndexes();
|
||||
logToConsole(LOG_INFO, "[VRR.Radio]: Radio script initialized successfully!");
|
||||
return true;
|
||||
}
|
||||
@@ -65,13 +60,16 @@ function playStreamingRadioCommand(command, params, client) {
|
||||
}
|
||||
|
||||
if(isPlayerInAnyVehicle(client)) {
|
||||
if(!getVehicleData(getPlayerVehicle(client))) {
|
||||
let vehicle = getPlayerVehicle(client);
|
||||
|
||||
if(!getVehicleData(vehicle)) {
|
||||
messagePlayerError(client, getLocaleString(client, "RandomVehicleCommandsDisabled"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(radioStationId == 0) {
|
||||
getVehicleData(getPlayerVehicle(client)).streamingRadioStation = -1;
|
||||
getVehicleData(vehicle).streamingRadioStation = -1;
|
||||
getVehicleData(vehicle).needsSaved = true;
|
||||
getPlayerData(client).streamingRadioStation = -1;
|
||||
meActionToNearbyPlayers(client, `turns off their vehicle's radio`);
|
||||
|
||||
@@ -84,13 +82,13 @@ function playStreamingRadioCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
getVehicleData(getPlayerVehicle(client)).streamingRadioStation = radioStationId-1;
|
||||
getVehicleData(vehicle).streamingRadioStation = radioStationId-1;
|
||||
getPlayerData(client).streamingRadioStation = radioStationId-1;
|
||||
meActionToNearbyPlayers(client, getLocaleString(client, "ActionVehicleRadioStationChange", getRadioStationData(radioStationId-1).name, getRadioStationData(radioStationId-1).genre));
|
||||
|
||||
let clients = getClients();
|
||||
for(let i in clients) {
|
||||
if(getPlayerVehicle(client) == getPlayerVehicle(clients[i])) {
|
||||
if(vehicle == getPlayerVehicle(clients[i])) {
|
||||
playRadioStreamForPlayer(clients[i], getRadioStationData(radioStationId-1).url, true, getPlayerStreamingRadioVolume(client));
|
||||
}
|
||||
}
|
||||
@@ -99,6 +97,7 @@ function playStreamingRadioCommand(command, params, client) {
|
||||
let houseId = getEntityData(client, "vrr.inHouse");
|
||||
if(radioStationId == 0) {
|
||||
getHouseData(houseId).streamingRadioStation = -1;
|
||||
getHouseData(houseId).needsSaved = true;
|
||||
getPlayerData(client).streamingRadioStation = -1;
|
||||
meActionToNearbyPlayers(client, `turns off the house radio`);
|
||||
|
||||
@@ -110,6 +109,7 @@ function playStreamingRadioCommand(command, params, client) {
|
||||
}
|
||||
} else {
|
||||
getHouseData(houseId).streamingRadioStation = radioStationId-1;
|
||||
getHouseData(houseId).needsSaved = true;
|
||||
getPlayerData(client).streamingRadioStation = radioStationId-1;
|
||||
meActionToNearbyPlayers(client, getLocaleString(client, "ActionHouseRadioStationChange", getRadioStationData(radioStationId-1).name, getRadioStationData(radioStationId-1).genre));
|
||||
|
||||
@@ -124,6 +124,7 @@ function playStreamingRadioCommand(command, params, client) {
|
||||
let businessId = getPlayerBusiness(client);
|
||||
if(radioStationId == 0) {
|
||||
getBusinessData(businessId).streamingRadioStation = -1;
|
||||
getBusinessData(businessId).needsSaved = true;
|
||||
getPlayerData(client).streamingRadioStation = -1;
|
||||
meActionToNearbyPlayers(client, `turns off the business radio`);
|
||||
|
||||
@@ -135,6 +136,7 @@ function playStreamingRadioCommand(command, params, client) {
|
||||
}
|
||||
} else {
|
||||
getBusinessData(businessId).streamingRadioStation = radioStationId-1;
|
||||
getBusinessData(businessId).needsSaved = true;
|
||||
getPlayerData(client).streamingRadioStation = radioStationId-1;
|
||||
meActionToNearbyPlayers(client, getLocaleString(client, "ActionBusinessRadioStationChange", getRadioStationData(radioStationId-1).name, getRadioStationData(radioStationId-1).genre));
|
||||
|
||||
@@ -226,7 +228,7 @@ function showRadioStationListCommand(command, params, client) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setRadioStationIndexes() {
|
||||
function setAllRadioStationIndexes() {
|
||||
for(let i in getServerData().radioStations) {
|
||||
getServerData().radioStations[i].index = i;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ function kickClientCommand(command, params, client) {
|
||||
|
||||
//getPlayerData(targetClient).customDisconnectReason = reason;
|
||||
announceAdminAction(`PlayerKicked`, getPlayerName(targetClient));
|
||||
targetClient.disconnect();
|
||||
targetdisconnectPlayer(client);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -83,9 +83,9 @@ function setStaffTitleCommand(command, params, client) {
|
||||
}
|
||||
|
||||
getPlayerData(targetClient).accountData.staffTitle = staffTitle;
|
||||
messageAdmins(`${client.name} {MAINCOLOUR}set ${getPlayerName(targetClient)}'s staff title to ${staffTitle}`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} set {ALTCOLOUR}${getPlayerName(targetClient)}'s{MAINCOLOUR} staff title to ${staffTitle}`);
|
||||
messagePlayerAlert(client, `${getPlayerName(client)} set your staff title to ${staffTitle}`);
|
||||
targetClient.disconnect();
|
||||
targetdisconnectPlayer(client);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -119,7 +119,7 @@ function muteClientCommand(command, params, client) {
|
||||
}
|
||||
}
|
||||
|
||||
messageAdmins(`${targetClient.name} {MAINCOLOUR}has been muted by ${client.name}!`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(targetClient)}{MAINCOLOUR} has been muted by {adminOrange}${getPlayerName(client)}`);
|
||||
getPlayerData(targetClient).muted = true;
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ function unMuteClientCommand(command, params, client) {
|
||||
}
|
||||
}
|
||||
|
||||
messageAdmins(`${targetClient.name} {MAINCOLOUR}has been un-muted by ${client.name}!`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(targetClient)}{MAINCOLOUR} has been un-muted by {adminOrange}${getPlayerName(client)}`);
|
||||
getPlayerData(targetClient).muted = false;
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ function freezeClientCommand(command, params, client) {
|
||||
}
|
||||
}
|
||||
|
||||
messageAdmins(`${targetClient.name} {MAINCOLOUR}has been frozen by ${client.name}!`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(targetClient)}{MAINCOLOUR} has been frozen by ${getPlayerName(client)}`);
|
||||
//setPlayerFrozenState(client, state);
|
||||
setPlayerControlState(client, false);
|
||||
}
|
||||
@@ -225,7 +225,7 @@ function unFreezeClientCommand(command, params, client) {
|
||||
}
|
||||
}
|
||||
|
||||
messageAdmins(`${targetClient.name} {MAINCOLOUR}has been un-frozen by ${client.name}!`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(targetClient)}{MAINCOLOUR} has been un-frozen by ${getPlayerName(client)}`);
|
||||
//sendPlayerFrozenState(client, false);
|
||||
setPlayerControlState(client, true);
|
||||
}
|
||||
@@ -294,11 +294,11 @@ function getPlayerGeoIPInformationCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let countryName = module.geoip.getCountryName(getGlobalConfig().geoIPCountryDatabaseFilePath, targetClient.ip);
|
||||
let subDivisionName = module.geoip.getSubdivisionName(getGlobalConfig().geoIPCityDatabaseFilePath, targetClient.ip);
|
||||
let cityName = module.geoip.getCityName(getGlobalConfig().geoIPCityDatabaseFilePath, targetClient.ip);
|
||||
let countryName = module.geoip.getCountryName(getGlobalConfig().geoIPCountryDatabaseFilePath, getPlayerIP(targetClient));
|
||||
let subDivisionName = module.geoip.getSubdivisionName(getGlobalConfig().geoIPCityDatabaseFilePath, getPlayerIP(targetClient));
|
||||
let cityName = module.geoip.getCityName(getGlobalConfig().geoIPCityDatabaseFilePath, getPlayerIP(targetClient));
|
||||
|
||||
messagePlayerInfo(client, `{ALTCOLOUR}${targetClient.name} {MAINCOLOUR}is from {ALTCOLOUR}${cityName}, ${subDivisionName}, ${countryName}`);
|
||||
messagePlayerInfo(client, `{ALTCOLOUR}${getPlayerName(targetClient)}{MAINCOLOUR} is from {ALTCOLOUR}${cityName}, ${subDivisionName}, ${countryName}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -324,7 +324,7 @@ function getPlayerIPInformationCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
messagePlayerInfo(client, `{ALTCOLOUR}${targetClient.name}'s{MAINCOLOUR} IP is ${targetClient.ip}`);
|
||||
messagePlayerInfo(client, `{ALTCOLOUR}${getPlayerName(targetClient)}'s{MAINCOLOUR} IP is ${getPlayerIP(targetClient)}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -393,7 +393,7 @@ function getVehicleCommand(command, params, client) {
|
||||
setElementInterior(vehicle, getPlayerInterior(client));
|
||||
setElementDimension(vehicle, getPlayerDimension(client));
|
||||
|
||||
messageAdmins(`${client.name} {MAINCOLOUR}teleported a {vehiclePurple}${getVehicleName(vehicle)} {ALTCOLOUR}(ID ${vehicle.id}) {MAINCOLOUR}to you`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} teleported a {vehiclePurple}${getVehicleName(vehicle)}{ALTCOLOUR} (ID ${vehicle.id}){MAINCOLOUR} to their position`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -494,25 +494,26 @@ function gotoGameLocationCommand(command, params, client) {
|
||||
|
||||
let gameLocationId = getGameLocationFromParams(params);
|
||||
|
||||
if(!gameLocationId) {
|
||||
if(gameLocationId == false) {
|
||||
messagePlayerError(client, "That game location doesn't exist!");
|
||||
return false;
|
||||
}
|
||||
|
||||
setPlayerVelocity(client, toVector3(0.0, 0.0, 0.0));
|
||||
setPlayerPosition(client, getGameConfig().locations[getServerGame()][gameLocationId][1]);
|
||||
setPlayerPosition(client, getGameConfig().locations[getGame()][gameLocationId][1]);
|
||||
setPlayerHeading(client, getGameConfig().locations[getGame()][gameLocationId][1]);
|
||||
setPlayerInterior(client, 0);
|
||||
setPlayerDimension(client, 0);
|
||||
updateInteriorLightsForPlayer(client, true);
|
||||
|
||||
//setTimeout(function() {
|
||||
// setPlayerPosition(client, getGameConfig().locations[getServerGame()][gameLocationId][1]);
|
||||
// setPlayerPosition(client, getGameConfig().locations[getGame()][gameLocationId][1]);
|
||||
// setPlayerInterior(client, 0);
|
||||
// setPlayerDimension(client, 0);
|
||||
// updateInteriorLightsForPlayer(client, true);
|
||||
//}, 500);
|
||||
|
||||
messagePlayerSuccess(client, `You teleported to game location {ALTCOLOUR}${getGameConfig().locations[getServerGame()][gameLocationId][0]}`);
|
||||
messagePlayerSuccess(client, `You teleported to game location {ALTCOLOUR}${getGameConfig().locations[getGame()][gameLocationId][0]}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -814,7 +815,7 @@ function playerInteriorCommand(command, params, client) {
|
||||
|
||||
let interiorId = getParam(params, " ", 2);
|
||||
setPlayerInterior(targetClient, Number(interiorId));
|
||||
messageAdmins(`${client.name} {MAINCOLOUR}set ${getPlayerName(targetClient)}'s interior to {ALTCOLOUR}${interiorId}`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} set {ALTCOLOUR}${getPlayerName(targetClient)}'s{MAINCOLOUR} interior to {ALTCOLOUR}${interiorId}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -841,13 +842,13 @@ function playerVirtualWorldCommand(command, params, client) {
|
||||
}
|
||||
|
||||
if(getParamsCount(params, " ") == 1) {
|
||||
messagePlayerInfo(client, `{ALTCOLOUR}${getPlayerName(targetClient)}'s {MAINCOLOUR}virtual world is {ALTCOLOUR}${getPlayerDimension(targetClient)}`);
|
||||
messagePlayerInfo(client, `{ALTCOLOUR}${getPlayerName(targetClient)}'s{MAINCOLOUR} virtual world is {ALTCOLOUR}${getPlayerDimension(targetClient)}`);
|
||||
return false;
|
||||
}
|
||||
|
||||
let dimensionId = getParam(params, " ", 2);
|
||||
setPlayerDimension(targetClient, Number(dimensionId));
|
||||
messageAdmins(`${client.name} {MAINCOLOUR}set {ALTCOLOUR}${getPlayerName(targetClient)}'s {MAINCOLOUR}virtual world to {ALTCOLOUR}${dimensionId}`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} set {ALTCOLOUR}${getPlayerName(targetClient)}'s{MAINCOLOUR} virtual world to {ALTCOLOUR}${dimensionId}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -881,21 +882,12 @@ function getPlayerCommand(command, params, client) {
|
||||
getPlayerData(targetClient).returnToInterior = getPlayerInterior(targetClient);
|
||||
getPlayerData(targetClient).returnToType = VRR_RETURNTO_TYPE_ADMINGET;
|
||||
|
||||
if(isPlayerInAnyHouse(targetClient)) {
|
||||
getPlayerData(targetClient).returnToHouse = getPlayerHouse(targetClient);
|
||||
}
|
||||
|
||||
if(isPlayerInAnyBusiness(targetClient)) {
|
||||
getPlayerData(targetClient).returnToBusiness = getPlayerBusiness(targetClient);
|
||||
}
|
||||
|
||||
removePlayerFromVehicle(targetClient);
|
||||
setPlayerPosition(targetClient, getPosBehindPos(getPlayerPosition(client), getPlayerHeading(client), 2));
|
||||
setPlayerHeading(targetClient, getPlayerHeading(client));
|
||||
setPlayerInterior(targetClient, getPlayerInterior(client));
|
||||
setPlayerDimension(targetClient, getPlayerDimension(client));
|
||||
|
||||
messageAdmins(`${client.name} {MAINCOLOUR}teleported {ALTCOLOUR}${getPlayerName(targetClient)} {MAINCOLOUR}to their position.`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} teleported {ALTCOLOUR}${getPlayerName(targetClient)}{MAINCOLOUR} to their position.`);
|
||||
messagePlayerAlert(targetClient, `An admin has teleported you to their location`);
|
||||
}
|
||||
|
||||
@@ -942,7 +934,7 @@ function returnPlayerCommand(command, params, client) {
|
||||
getPlayerData(targetClient).returnToBusiness = null;
|
||||
getPlayerData(targetClient).returnToType = VRR_RETURNTO_TYPE_NONE;
|
||||
|
||||
messageAdmins(`${client.name} {MAINCOLOUR}returned {ALTCOLOUR}${getPlayerName(targetClient)} {MAINCOLOUR}to their previous position.`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} returned {ALTCOLOUR}${getPlayerName(targetClient)}{MAINCOLOUR} to their previous position.`);
|
||||
messagePlayerAlert(targetClient, `An admin has returned you to your previous location`);
|
||||
}
|
||||
|
||||
@@ -985,7 +977,7 @@ function addPlayerStaffFlagCommand(command, params, client) {
|
||||
}
|
||||
|
||||
givePlayerStaffFlag(targetClient, flagName);
|
||||
messageAdmins(`${client.name} has {MAINCOLOUR}given {ALTCOLOUR}${getPlayerName(targetClient)} {MAINCOLOUR}the {ALTCOLOUR}${flagName} {MAINCOLOUR}staff flag`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} has given {ALTCOLOUR}${getPlayerName(targetClient)}{MAINCOLOUR} the {ALTCOLOUR}${flagName}{MAINCOLOUR} staff flag`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -1027,7 +1019,7 @@ function removePlayerStaffFlagCommand(command, params, client) {
|
||||
}
|
||||
|
||||
takePlayerStaffFlag(targetClient, flagName);
|
||||
messageAdmins(`${client.name} {MAINCOLOUR}has taken the {ALTCOLOUR}${flagName} {MAINCOLOUR}staff flag from {ALTCOLOUR}${getPlayerName(targetClient)}`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} has taken the {ALTCOLOUR}${flagName}{MAINCOLOUR} staff flag from {ALTCOLOUR}${getPlayerName(targetClient)}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -1063,7 +1055,7 @@ function removePlayerStaffFlagsCommand(command, params, client) {
|
||||
}
|
||||
|
||||
clearPlayerStaffFlags(targetClient);
|
||||
messageAdmins(`${client.name} {MAINCOLOUR}removed all staff flags from {ALTCOLOUR}${getPlayerName(targetClient)}`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} removed all staff flags from {ALTCOLOUR}${getPlayerName(targetClient)}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -1190,7 +1182,7 @@ function givePlayerMoneyCommand(command, params, client) {
|
||||
givePlayerCash(targetClient, toInteger(amount));
|
||||
updatePlayerCash(targetClient);
|
||||
//messagePlayerSuccess(client, `You gave {ALTCOLOUR}$${amount} {MAINCOLOUR}to {ALTCOLOUR}${getCharacterFullName(targetClient)}`);
|
||||
messageAdmins(`${client.name} {MAINCOLOUR}gave {ALTCOLOUR}$${amount} {MAINCOLOUR}to {ALTCOLOUR}${getCharacterFullName(targetClient)}`)
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} gave {ALTCOLOUR}$${amount}{MAINCOLOUR} to {ALTCOLOUR}${getCharacterFullName(targetClient)}`)
|
||||
messagePlayerAlert(targetClient, `An admin gave you {ALTCOLOUR}$${amount}`);
|
||||
}
|
||||
|
||||
@@ -1227,11 +1219,11 @@ function setPlayerAccentCommand(command, params, client) {
|
||||
|
||||
if(newAccent == "") {
|
||||
//messagePlayerSuccess(client, `You removed {ALTCOLOUR}${getCharacterFullName(targetClient)}'s {MAINCOLOUR}accent.`);
|
||||
messageAdmins(client, `${client.name} removed {ALTCOLOUR}${getCharacterFullName(targetClient)}'s {MAINCOLOUR}accent.`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} removed {ALTCOLOUR}${getCharacterFullName(targetClient)}'s{MAINCOLOUR} accent.`);
|
||||
messagePlayerAlert(client, `An admin removed your accent.`);
|
||||
} else {
|
||||
//messagePlayerSuccess(client, `You set {ALTCOLOUR}${getCharacterFullName(targetClient)}'s {MAINCOLOUR}accent to {ALTCOLOUR}${newAccent}`);
|
||||
messageAdmins(`${client.name} set {ALTCOLOUR}${getCharacterFullName(targetClient)}'s {MAINCOLOUR}accent to {ALTCOLOUR}${newAccent}`)
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} set {ALTCOLOUR}${getCharacterFullName(targetClient)}'s{MAINCOLOUR} accent to {ALTCOLOUR}${newAccent}`)
|
||||
messagePlayerAlert(client, `An admin set your accent to {ALTCOLOUR}${newAccent}`);
|
||||
}
|
||||
}
|
||||
@@ -1262,7 +1254,7 @@ function forceCharacterNameChangeCommand(command, params, client) {
|
||||
|
||||
getPlayerData(targetClient).changingCharacterName = true;
|
||||
|
||||
messageAdmins(`${client.name} {MAINCOLOUR}forced {ALTCOLOUR}${getPlayerName(targetClient)} (${getCharacterFullName(targetClient)}) {MAINCOLOUR}to change their character's name.`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} forced {ALTCOLOUR}${getPlayerName(targetClient)} (${getCharacterFullName(targetClient)}){MAINCOLOUR} to change their character's name.`);
|
||||
showPlayerNewCharacterFailedGUI(targetClient, getLocaleString(targetClient, "NonRPName"));
|
||||
}
|
||||
|
||||
@@ -1305,7 +1297,7 @@ function setCharacterNameCommand(command, params, client) {
|
||||
getPlayerCurrentSubAccount(targetClient).firstName = firstName;
|
||||
getPlayerCurrentSubAccount(targetClient).lastName = lastName;
|
||||
|
||||
messageAdmins(`${getPlayerName(client)} {MAINCOLOUR}forced {ALTCOLOUR}${getPlayerName(targetClient)}'s{MAINCOLOUR} current character name from {ALTCOLOUR}${oldName}{MAINCOLOUR} to {ALTCOLOUR}${newName}`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} set {ALTCOLOUR}${getPlayerName(targetClient)}'s{MAINCOLOUR} current character name from {ALTCOLOUR}${oldName}{MAINCOLOUR} to {ALTCOLOUR}${newName}`);
|
||||
|
||||
updateAllPlayerNameTags();
|
||||
}
|
||||
@@ -1349,7 +1341,36 @@ function setPlayerSkinCommand(command, params, client) {
|
||||
getPlayerCurrentSubAccount(targetClient).skin = skinIndex;
|
||||
setPlayerSkin(targetClient, skinIndex);
|
||||
|
||||
messageAdmins(`${getPlayerName(client)} {MAINCOLOUR}set ${getPlayerName(targetClient)}'s{MAINCOLOUR} skin to {ALTCOLOUR}${getGameConfig().skins[getGame()][skinIndex][1]}`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} set ${getPlayerName(targetClient)}'s{MAINCOLOUR} skin to {ALTCOLOUR}${getGameConfig().skins[getGame()][skinIndex][1]}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* This is a command handler function.
|
||||
*
|
||||
* @param {string} command - The command name used by the player
|
||||
* @param {string} params - The parameters/args string used with the command by the player
|
||||
* @param {Client} client - The client/player that used the command
|
||||
* @return {bool} Whether or not the command was successful
|
||||
*
|
||||
*/
|
||||
function setPlayerStaffTitleCommand(command, params, client) {
|
||||
if(areParamsEmpty(params)) {
|
||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||
return false;
|
||||
}
|
||||
|
||||
let splitParams = params.split(" ");
|
||||
let targetClient = getPlayerFromParams(splitParams[0]);
|
||||
let newTitle = splitParams.slice(1).join(" ");
|
||||
|
||||
if(!targetClient) {
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidPlayer"));
|
||||
return false;
|
||||
}
|
||||
|
||||
getPlayerData(client).accountData.staffTitle = newTitle;
|
||||
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} set ${getPlayerName(targetClient)}'s{MAINCOLOUR} staff title to {ALTCOLOUR}${newTitle}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -1385,7 +1406,7 @@ function setPlayerHealthCommand(command, params, client) {
|
||||
|
||||
setPlayerHealth(targetClient, health);
|
||||
|
||||
messageAdmins(`${getPlayerName(client)}{MAINCOLOUR} set ${getPlayerName(targetClient)}'s{MAINCOLOUR} health to {ALTCOLOUR}${health}`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} set ${getPlayerName(targetClient)}'s{MAINCOLOUR} health to {ALTCOLOUR}${health}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -1415,7 +1436,7 @@ function setPlayerArmourCommand(command, params, client) {
|
||||
|
||||
setPlayerArmour(targetClient, armour);
|
||||
|
||||
messageAdmins(`${getPlayerName(client)}{MAINCOLOUR} set ${getPlayerName(targetClient)}'s{MAINCOLOUR} armour to {ALTCOLOUR}${armour}`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} set ${getPlayerName(targetClient)}'s{MAINCOLOUR} armour to {ALTCOLOUR}${armour}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -1451,7 +1472,7 @@ function setPlayerInfiniteRunCommand(command, params, client) {
|
||||
state = toInteger(state);
|
||||
setPlayerInfiniteRun(targetClient, intToBool(state));
|
||||
|
||||
messageAdmins(`${getPlayerName(client)}{MAINCOLOUR} ${getBoolRedGreenInlineColour(state)}${(state) ? "enabled" : "disabled"}{MAINCOLOUR} infinite run for {ALTCOLOUR}${getPlayerName(targetClient)}`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} ${getBoolRedGreenInlineColour(state)}${(state) ? "enabled" : "disabled"}{MAINCOLOUR} infinite run for {ALTCOLOUR}${getPlayerName(targetClient)}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -1481,7 +1502,7 @@ function setPlayerWantedLevelCommand(command, params, client) {
|
||||
|
||||
setPlayerWantedLevel(targetClient, wantedLevel);
|
||||
|
||||
//messageAdmins(`${getPlayerName(client)} {MAINCOLOUR}set ${getPlayerName(targetClient)}'s {MAINCOLOUR}skin to {ALTCOLOUR}${getGameConfig().skins[getGame()][skinIndex][1]}`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} set ${getPlayerName(targetClient)}'s{MAINCOLOUR} wanted level to {ALTCOLOUR}${wantedLevel}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -1544,7 +1565,12 @@ function getBusinessesOwnedByPlayerCommand(command, params, client) {
|
||||
|
||||
messagePlayerInfo(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderPlayerBusinessesList", getCharacterFullName(targetClient))));
|
||||
for(let i in businesses) {
|
||||
messagePlayerNormal(client, `🏢 {businessBlue}[Business Info] {MAINCOLOUR}Name: {ALTCOLOUR}${businesses[i].name}, {MAINCOLOUR}Locked: {ALTCOLOUR}${getYesNoFromBool(intToBool(businesses[i].locked))}, {MAINCOLOUR}ID: {ALTCOLOUR}${businesses[i].index}/${businesses[i].databaseId}`);
|
||||
let info = [
|
||||
`Name: ${businesses[i].name}`,
|
||||
`Locked: ${businesses[i].locked}`,
|
||||
`ID: ${businesses[i].index}/${businesses[i].databaseId}`,
|
||||
]
|
||||
messagePlayerNormal(client, `🏢 {businessBlue}[Business Info] {MAINCOLOUR}${info.join(", ")}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1631,10 +1657,10 @@ function toggleSyncForElementsSpawnedByPlayerCommand(command, params, client) {
|
||||
|
||||
if(!hasBitFlag(getPlayerData(client).accountData.flags.moderation, getModerationFlagValue("DontSyncClientElements"))) {
|
||||
getPlayerData(client).accountData.flags.moderation = addBitFlag(getPlayerData(client).accountData.flags.moderation, getModerationFlagValue("DontSyncClientElements"));
|
||||
messageAdmins(`${getPlayerName(client)} {MAINCOLOUR}turned {softGreen}ON client element sync for {ALTCOLOUR}${getPlayerName(targetClient)}`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} turned {softGreen}ON{MAINCOLOUR} client element sync for {ALTCOLOUR}${getPlayerName(targetClient)}`);
|
||||
} else {
|
||||
getPlayerData(client).accountData.flags.moderation = removeBitFlag(getPlayerData(client).accountData.flags.moderation, getModerationFlagValue("DontSyncClientElements"));
|
||||
messageAdmins(`${getPlayerName(client)} {MAINCOLOUR}turned {softRed}OFF client element sync for {ALTCOLOUR}${getPlayerName(targetClient)}`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} turned {softRed}OFF{MAINCOLOUR} client element sync for {ALTCOLOUR}${getPlayerName(targetClient)}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1714,15 +1740,77 @@ function forceFightStyleCommand(command, params, client) {
|
||||
|
||||
if(!fightStyleId) {
|
||||
messagePlayerError(client, `That fight style doesn't exist!`);
|
||||
messagePlayerError(client, `Fight styles: ${getGameConfig().fightStyles[getServerGame()].map(fs => fs[0]).join(", ")}`);
|
||||
messagePlayerError(client, `Fight styles: ${getGameConfig().fightStyles[getGame()].map(fs => fs[0]).join(", ")}`);
|
||||
return false;
|
||||
}
|
||||
|
||||
getPlayerCurrentSubAccount(client).fightStyle = fightStyleId;
|
||||
setPlayerFightStyle(client, fightStyleId);
|
||||
messagePlayerSuccess(client, `You set ${getCharacterFullName(targetClient)}'s fight style to ${getGameConfig().fightStyles[getServerGame()][fightStyleId][0]}`)
|
||||
messagePlayerSuccess(client, `You set ${getCharacterFullName(targetClient)}'s fight style to ${getGameConfig().fightStyles[getGame()][fightStyleId][0]}`)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
/**
|
||||
* This is a command handler function.
|
||||
*
|
||||
* @param {string} command - The command name used by the player
|
||||
* @param {string} params - The parameters/args string used with the command by the player
|
||||
* @param {Client} client - The client/player that used the command
|
||||
* @return {bool} Whether or not the command was successful
|
||||
*
|
||||
*/
|
||||
function getPlayerCurrentHouseCommand(command, params, client) {
|
||||
if(areParamsEmpty(params)) {
|
||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||
return false;
|
||||
}
|
||||
|
||||
let targetClient = getPlayerFromParams(getParam(params, " ", 1));
|
||||
|
||||
let houseId = getPlayerHouse(targetClient);
|
||||
|
||||
if(!houseId) {
|
||||
messagePlayerAlert(client, `${getPlayerName(targetClient)} isn't in or at a house!`);
|
||||
return false;
|
||||
}
|
||||
|
||||
let houseData = getHouseData(houseId);
|
||||
messagePlayerInfo(client, `${getPlayerName(targetClient)}'s is at/in house '${houseData.description}' (ID ${houseId}/${houseData.databaseId})`);
|
||||
return true;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
/**
|
||||
* This is a command handler function.
|
||||
*
|
||||
* @param {string} command - The command name used by the player
|
||||
* @param {string} params - The parameters/args string used with the command by the player
|
||||
* @param {Client} client - The client/player that used the command
|
||||
* @return {bool} Whether or not the command was successful
|
||||
*
|
||||
*/
|
||||
function getPlayerCurrentBusinessCommand(command, params, client) {
|
||||
if(areParamsEmpty(params)) {
|
||||
messagePlayerSyntax(client, getCommandSyntaxText(command));
|
||||
return false;
|
||||
}
|
||||
|
||||
let targetClient = getPlayerFromParams(getParam(params, " ", 1));
|
||||
|
||||
let businessId = getPlayerBusiness(targetClient);
|
||||
|
||||
if(!businessId) {
|
||||
messagePlayerAlert(client, `${getPlayerName(targetClient)} isn't in or at a house!`);
|
||||
return false;
|
||||
}
|
||||
|
||||
let businessData = getBusinessData(houseId);
|
||||
messagePlayerInfo(client, `${getPlayerName(targetClient)}'s is at/in business '${businessData.name}' (ID ${businessId}/${businessData.databaseId})`);
|
||||
return true;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -38,14 +38,22 @@ function initServerScripts() {
|
||||
initEconomyScript();
|
||||
initRadioScript();
|
||||
initLocaleScript();
|
||||
|
||||
initCommandScript();
|
||||
|
||||
serverStartTime = getCurrentUnixTimestamp();
|
||||
// Load config and stuff
|
||||
loadGlobalConfig();
|
||||
loadServerConfig();
|
||||
applyConfigToServer(getServerConfig());
|
||||
|
||||
// Load all the server data
|
||||
loadServerDataFromDatabase();
|
||||
setAllServerDataIndexes();
|
||||
createAllServerElements();
|
||||
|
||||
initAllClients();
|
||||
|
||||
initTimers();
|
||||
|
||||
serverStartTime = getCurrentUnixTimestamp();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -83,20 +91,20 @@ function checkForAllRequiredModules() {
|
||||
logToConsole(LOG_DEBUG, "[VRR.Startup]: Checking for required modules ...");
|
||||
|
||||
if(!checkForHashingModule()) {
|
||||
console.warn("[VRR.Startup]: Hashing module is not loaded!");
|
||||
console.warn("[VRR.Startup]: This resource will now shutdown.");
|
||||
logToConsole(LOG_WARN, "[VRR.Startup]: Hashing module is not loaded!");
|
||||
logToConsole(LOG_WARN, "[VRR.Startup]: This resource will now shutdown.");
|
||||
thisResource.stop();
|
||||
}
|
||||
|
||||
if(!checkForMySQLModule()) {
|
||||
console.warn("[VRR.Startup]: MySQL module is not loaded!");
|
||||
console.warn("[VRR.Startup]: This resource will now shutdown.");
|
||||
logToConsole(LOG_WARN, "[VRR.Startup]: MySQL module is not loaded!");
|
||||
logToConsole(LOG_WARN, "[VRR.Startup]: This resource will now shutdown.");
|
||||
thisResource.stop();
|
||||
}
|
||||
|
||||
if(!checkForSMTPModule()) {
|
||||
console.warn("[VRR.Startup]: SMTP Email module is not loaded!");
|
||||
console.warn("[VRR.Startup]: Email features will NOT be available!");
|
||||
logToConsole(LOG_WARN, "[VRR.Startup]: SMTP Email module is not loaded!");
|
||||
logToConsole(LOG_WARN, "[VRR.Startup]: Email features will NOT be available!");
|
||||
}
|
||||
|
||||
logToConsole(LOG_DEBUG, "[VRR.Startup]: All required modules loaded!");
|
||||
@@ -105,6 +113,71 @@ function checkForAllRequiredModules() {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function loadServerDataFromDatabase() {
|
||||
logToConsole(LOG_INFO, "[VRR.Config]: Loading server data ...");
|
||||
|
||||
// Always load these regardless of "test server" status
|
||||
getServerData().localeStrings = loadAllLocaleStrings();
|
||||
getServerData().allowedSkins = getAllowedSkins(getGame());
|
||||
|
||||
// Translation Cache
|
||||
getServerData().cachedTranslations = new Array(getGlobalConfig().locale.locales.length);
|
||||
getServerData().cachedTranslationFrom = new Array(getGlobalConfig().locale.locales.length);
|
||||
getServerData().cachedTranslationFrom.fill([]);
|
||||
getServerData().cachedTranslations.fill(getServerData().cachedTranslationFrom);
|
||||
|
||||
// Only load these if the server isn't a testing/dev server
|
||||
if(!getServerConfig().devServer) {
|
||||
getServerData().itemTypes = loadItemTypesFromDatabase();
|
||||
getServerData().items = loadItemsFromDatabase();
|
||||
getServerData().businesses = loadBusinessesFromDatabase();
|
||||
getServerData().houses = loadHousesFromDatabase();
|
||||
getServerData().vehicles = loadVehiclesFromDatabase();
|
||||
getServerData().clans = loadClansFromDatabase();
|
||||
getServerData().npcs = loadNPCsFromDatabase();
|
||||
getServerData().races = loadRacesFromDatabase();
|
||||
getServerData().radioStations = loadRadioStationsFromDatabase();
|
||||
getServerData().gates = loadGatesFromDatabase();
|
||||
getServerData().jobs = loadJobsFromDatabase();
|
||||
}
|
||||
|
||||
getServerData().commands = loadCommands();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function setAllServerDataIndexes() {
|
||||
setAllItemTypeDataIndexes();
|
||||
setAllItemDataIndexes();
|
||||
setBusinessDataIndexes();
|
||||
setHouseDataIndexes();
|
||||
setAllClanDataIndexes();
|
||||
setAllJobDataIndexes();
|
||||
setNPCDataIndexes();
|
||||
setAllRaceDataIndexes();
|
||||
setAllRadioStationIndexes();
|
||||
cacheAllGroundItems();
|
||||
cacheAllBusinessItems();
|
||||
cacheAllCommandsAliases();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function createAllServerElements() {
|
||||
createAllBusinessPickups();
|
||||
createAllBusinessBlips();
|
||||
createAllHousePickups();
|
||||
createAllHouseBlips();
|
||||
createAllJobPickups();
|
||||
createAllJobBlips();
|
||||
createAllGroundItemObjects();
|
||||
spawnAllVehicles();
|
||||
spawnAllNPCs();
|
||||
addAllCommandHandlers();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
initServerScripts();
|
||||
|
||||
// ===========================================================================
|
||||
@@ -224,9 +224,9 @@ function showCharacterSelectToClient(client) {
|
||||
getPlayerData(client).currentSubAccount = 0;
|
||||
logToConsole(LOG_DEBUG, `[VRR.SubAccount] Setting ${getPlayerDisplayForConsole(client)}'s character to ID ${getPlayerData(client).currentSubAccount}`);
|
||||
let tempSubAccount = getPlayerData(client).subAccounts[0];
|
||||
let ClanName = (tempSubAccount.clan != 0) ? getClanData(getClanIdFromDatabaseId(tempSubAccount.clan)).name : "None";
|
||||
let clanName = (tempSubAccount.clan != 0) ? getClanData(getClanIdFromDatabaseId(tempSubAccount.clan)).name : "None";
|
||||
let lastPlayedText = (tempSubAccount.lastLogin != 0) ? `${msToTime(getCurrentUnixTimestamp()-tempSubAccount.lastLogin)} ago` : "Never";
|
||||
showPlayerCharacterSelectGUI(client, tempSubAccount.firstName, tempSubAccount.lastName, tempSubAccount.cash, ClanName, lastPlayedText, getGameConfig().skins[getGame()][tempSubAccount.skin][0]);
|
||||
showPlayerCharacterSelectGUI(client, tempSubAccount.firstName, tempSubAccount.lastName, tempSubAccount.cash, clanName, lastPlayedText, getGameConfig().skins[getGame()][tempSubAccount.skin][0]);
|
||||
|
||||
//spawnPlayer(client, getServerConfig().characterSelectPedPosition, getServerConfig().characterSelectPedHeading, getPlayerCurrentSubAccount(client).skin, getServerConfig().characterSelectInterior, getServerConfig().characterSelectDimension);
|
||||
//setTimeout(function() {
|
||||
@@ -520,7 +520,7 @@ function setFightStyleCommand(command, params, client) {
|
||||
|
||||
if(!fightStyle) {
|
||||
messagePlayerError(client, `That fight style doesn't exist!`);
|
||||
messagePlayerError(client, `Fight styles: ${getGameConfig().fightStyles[getServerGame()].map(fs => fs[0]).join(", ")}`);
|
||||
messagePlayerError(client, `Fight styles: ${getGameConfig().fightStyles[getGame()].map(fs => fs[0]).join(", ")}`);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -532,7 +532,7 @@ function setFightStyleCommand(command, params, client) {
|
||||
}
|
||||
|
||||
setPlayerFightStyle(client, fightStyleId);
|
||||
messagePlayerSuccess(client, `Your fight style has been set to ${getGameConfig().fightStyles[getServerGame()][fightStyleId][0]}`)
|
||||
messagePlayerSuccess(client, `Your fight style has been set to ${getGameConfig().fightStyles[getGame()][fightStyleId][0]}`)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -19,53 +19,65 @@ function saveServerDataToDatabase() {
|
||||
logToConsole(LOG_DEBUG, "[VRR.Utilities]: Saving all server data to database ...");
|
||||
|
||||
try {
|
||||
saveClientsToDatabase();
|
||||
saveAllPlayersToDatabase();
|
||||
} catch(error) {
|
||||
logToConsole(LOG_ERROR, `Could not save clients to database: ${error}`);
|
||||
logToConsole(LOG_ERROR, `Could not save players to database: ${error}`);
|
||||
}
|
||||
|
||||
try {
|
||||
saveClansToDatabase();
|
||||
saveAllClansToDatabase();
|
||||
} catch(error) {
|
||||
logToConsole(LOG_ERROR, `Could not save clans to database: ${error}`);
|
||||
}
|
||||
|
||||
try {
|
||||
saveHousesToDatabase();
|
||||
saveAllHousesToDatabase();
|
||||
} catch(error) {
|
||||
logToConsole(LOG_ERROR, `Could not save houses to database: ${error}`);
|
||||
}
|
||||
|
||||
try {
|
||||
saveBusinessesToDatabase();
|
||||
saveAllBusinessesToDatabase();
|
||||
} catch(error) {
|
||||
logToConsole(LOG_ERROR, `Could not save businesses to database: ${error}`);
|
||||
}
|
||||
|
||||
try {
|
||||
saveVehiclesToDatabase();
|
||||
saveAllVehiclesToDatabase();
|
||||
} catch(error) {
|
||||
logToConsole(LOG_ERROR, `Could not save vehicles to database: ${error}`);
|
||||
}
|
||||
|
||||
try {
|
||||
saveItemTypesToDatabase();
|
||||
saveAllItemTypesToDatabase();
|
||||
} catch(error) {
|
||||
logToConsole(LOG_ERROR, `Could not save item types to database: ${error}`);
|
||||
}
|
||||
|
||||
try {
|
||||
saveItemsToDatabase();
|
||||
saveAllItemsToDatabase();
|
||||
} catch(error) {
|
||||
logToConsole(LOG_ERROR, `Could not save items to database: ${error}`);
|
||||
}
|
||||
|
||||
try {
|
||||
saveJobsToDatabase();
|
||||
saveAllJobsToDatabase();
|
||||
} catch(error) {
|
||||
logToConsole(LOG_ERROR, `Could not save jobs to database: ${error}`);
|
||||
}
|
||||
|
||||
try {
|
||||
saveAllNPCsToDatabase();
|
||||
} catch(error) {
|
||||
logToConsole(LOG_ERROR, `Could not save NPCs to database: ${error}`);
|
||||
}
|
||||
|
||||
try {
|
||||
saveAllGatesToDatabase();
|
||||
} catch(error) {
|
||||
logToConsole(LOG_ERROR, `Could not save gates to database: ${error}`);
|
||||
}
|
||||
|
||||
try {
|
||||
saveServerConfigToDatabase();
|
||||
} catch(error) {
|
||||
@@ -93,7 +105,7 @@ function oneMinuteTimerFunction() {
|
||||
checkServerGameTime();
|
||||
|
||||
logToConsole(LOG_DEBUG, `[VRR.Event] Checking rentable vehicles`);
|
||||
vehicleRentCheck();
|
||||
checkVehicleRenting();
|
||||
|
||||
logToConsole(LOG_DEBUG, `[VRR.Event] Updating all player name tags`);
|
||||
updateAllPlayerNameTags();
|
||||
@@ -118,19 +130,18 @@ function thirtyMinuteTimerFunction() {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function vehicleRentCheck() {
|
||||
// Loop through players, not vehicles. Much more efficient (and doesn't consume resources when no players are connected)
|
||||
let clients = getClients();
|
||||
for(let i in clients) {
|
||||
if(isClientInitialized(clients[i])) {
|
||||
if(getPlayerData(clients[i]) != false) {
|
||||
if(isPlayerLoggedIn(clients[i] && isPlayerSpawned(clients[i]))) {
|
||||
if(getPlayerData(clients[i]).rentingVehicle != false) {
|
||||
if(getPlayerCurrentSubAccount(clients[i]).cash < getServerData().vehicles[getPlayerData(clients[i]).rentingVehicle].rentPrice) {
|
||||
messagePlayerAlert(clients[i], `You do not have enough money to continue renting this vehicle!`);
|
||||
stopRentingVehicle(clients[i]);
|
||||
function checkVehicleRenting() {
|
||||
let renting = getServerData().rentingVehicleCache;
|
||||
for(let i in renting) {
|
||||
if(isClientInitialized(renting[i])) {
|
||||
if(getPlayerData(renting[i]) != false) {
|
||||
if(isPlayerLoggedIn(renting[i] && isPlayerSpawned(renting[i]))) {
|
||||
if(getPlayerData(renting[i]).rentingVehicle != false) {
|
||||
if(getPlayerCurrentSubAccount(renting[i]).cash < getServerData().vehicles[getPlayerData(renting[i]).rentingVehicle].rentPrice) {
|
||||
messagePlayerAlert(renting[i], `You do not have enough money to continue renting this vehicle!`);
|
||||
stopRentingVehicle(renting[i]);
|
||||
} else {
|
||||
takePlayerCash(clients[i], getServerData().vehicles[getPlayerData(clients[i]).rentingVehicle].rentPrice);
|
||||
takePlayerCash(renting[i], getServerData().vehicles[getPlayerData(renting[i]).rentingVehicle].rentPrice);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,19 +7,7 @@
|
||||
// TYPE: Server (JavaScript)
|
||||
// ===========================================================================
|
||||
|
||||
let disconnectReasons = [
|
||||
"Lost Connection",
|
||||
"Disconnected",
|
||||
"Unsupported Client",
|
||||
"Wrong Game",
|
||||
"Incorrect Password",
|
||||
"Unsupported Executable",
|
||||
"Disconnected",
|
||||
"Banned",
|
||||
"Failed",
|
||||
"Invalid Name",
|
||||
"Crashed"
|
||||
];
|
||||
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
@@ -28,7 +16,7 @@ function getPositionArea(position) {
|
||||
position = vec3ToVec2(position);
|
||||
}
|
||||
|
||||
let gameAreas = getGameAreas(getServerGame());
|
||||
let gameAreas = getGameAreas(getGame());
|
||||
for(let i in gameAreas) {
|
||||
if(isPositionInArea(position, gameAreas[i][1])) {
|
||||
return i;
|
||||
@@ -64,7 +52,7 @@ function getGameAreas(gameId) {
|
||||
function getPlayerData(client) {
|
||||
if(client != null) {
|
||||
if(isClientInitialized(client)) {
|
||||
return getServerData().clients[client.index];
|
||||
return getServerData().clients[getPlayerId(client)];
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@@ -94,9 +82,11 @@ function updateServerRules() {
|
||||
|
||||
if(isWeatherSupported()) {
|
||||
if(getServerConfig() != false) {
|
||||
let value = getGameConfig().weatherNames[getServerGame()][getServerConfig().weather];
|
||||
logToConsole(LOG_DEBUG, `[VRR.Utilities]: Setting server rule "Weather" as ${value}`);
|
||||
server.setRule("Weather", value);
|
||||
if(typeof getGameConfig().weatherNames[getGame()] != "undefined") {
|
||||
let value = getGameConfig().weatherNames[getGame()][getServerConfig().weather];
|
||||
logToConsole(LOG_DEBUG, `[VRR.Utilities]: Setting server rule "Weather" as ${value}`);
|
||||
server.setRule("Weather", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,13 +104,13 @@ function updateServerRules() {
|
||||
|
||||
function getWeatherFromParams(params) {
|
||||
if(isNaN(params)) {
|
||||
for(let i in getGameConfig().weatherNames[getServerGame()]) {
|
||||
if(toLowerCase(getGameConfig().weatherNames[getServerGame()][i]).indexOf(toLowerCase(params)) != -1) {
|
||||
for(let i in getGameConfig().weatherNames[getGame()]) {
|
||||
if(toLowerCase(getGameConfig().weatherNames[getGame()][i]).indexOf(toLowerCase(params)) != -1) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(typeof getGameConfig().weatherNames[getServerGame()][params] != "undefined") {
|
||||
if(typeof getGameConfig().weatherNames[getGame()][params] != "undefined") {
|
||||
return toInteger(params);
|
||||
}
|
||||
}
|
||||
@@ -132,13 +122,13 @@ function getWeatherFromParams(params) {
|
||||
|
||||
function getFightStyleFromParams(params) {
|
||||
if(isNaN(params)) {
|
||||
for(let i in getGameConfig().fightStyles[getServerGame()]) {
|
||||
if(toLowerCase(getGameConfig().fightStyles[getServerGame()][i][0]).indexOf(toLowerCase(params)) != -1) {
|
||||
for(let i in getGameConfig().fightStyles[getGame()]) {
|
||||
if(toLowerCase(getGameConfig().fightStyles[getGame()][i][0]).indexOf(toLowerCase(params)) != -1) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(typeof getGameConfig().fightStyles[getServerGame()][params] != "undefined") {
|
||||
if(typeof getGameConfig().fightStyles[getGame()][params] != "undefined") {
|
||||
return toInteger(params);
|
||||
}
|
||||
}
|
||||
@@ -149,27 +139,35 @@ function getFightStyleFromParams(params) {
|
||||
// ===========================================================================
|
||||
|
||||
function getClosestHospital(position) {
|
||||
let closest = 0;
|
||||
for(let i in getGameConfig().hospitals[getServerGame()]) {
|
||||
if(getDistance(getGameConfig().hospitals[getServerGame()][i].position, position) < getDistance(getGameConfig().hospitals[getServerGame()][closest].position, position)) {
|
||||
closest = i;
|
||||
if(typeof getGameConfig().hospitals[getGame()] == "undefined") {
|
||||
return {position: getServerConfig().newCharacter.spawnPosition};
|
||||
} else {
|
||||
let closest = 0;
|
||||
for(let i in getGameConfig().hospitals[getGame()]) {
|
||||
if(getDistance(getGameConfig().hospitals[getGame()][i].position, position) < getDistance(getGameConfig().hospitals[getGame()][closest].position, position)) {
|
||||
closest = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return getGameConfig().hospitals[getServerGame()][closest];
|
||||
return getGameConfig().hospitals[getGame()][closest];
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getClosestPoliceStation(position) {
|
||||
let closest = 0;
|
||||
for(let i in getGameConfig().policeStations[getServerGame()]) {
|
||||
if(getDistance(getGameConfig().policeStations[getServerGame()][i].position, position) < getDistance(getGameConfig().policeStations[getServerGame()][closest].position, position)) {
|
||||
closest = i;
|
||||
if(typeof getGameConfig().policeStations[getGame()] == "undefined") {
|
||||
return {position: getServerConfig().newCharacter.spawnPosition};
|
||||
} else {
|
||||
let closest = 0;
|
||||
for(let i in getGameConfig().policeStations[getGame()]) {
|
||||
if(getDistance(getGameConfig().policeStations[getGame()][i].position, position) < getDistance(getGameConfig().policeStations[getGame()][closest].position, position)) {
|
||||
closest = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return getGameConfig().policeStations[getServerGame()][closest];
|
||||
return getGameConfig().policeStations[getGame()][closest];
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -178,7 +176,7 @@ function getPlayerDisplayForConsole(client) {
|
||||
if(isNull(client)) {
|
||||
return "(Unknown client)";
|
||||
}
|
||||
return `${getPlayerName(client)}[${client.index}]`;
|
||||
return `${getPlayerName(client)}[${getPlayerId(client)}]`;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -208,8 +206,8 @@ function getPlayerIsland(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function isAtPayAndSpray(position) {
|
||||
for(let i in getGameConfig().payAndSprays[getServerGame()]) {
|
||||
if(getDistance(position, getGameConfig().payAndSprays[getServerGame()][i]) <= getGlobalConfig().payAndSprayDistance) {
|
||||
for(let i in getGameConfig().payAndSprays[getGame()]) {
|
||||
if(getDistance(position, getGameConfig().payAndSprays[getGame()][i]) <= getGlobalConfig().payAndSprayDistance) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -295,19 +293,16 @@ function showCharacterSelectCameraToPlayer(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function getClosestPlayer(position, exemptPlayer) {
|
||||
//let clients = getClients();
|
||||
//let closest = 0;
|
||||
//for(let i in clients) {
|
||||
// if(exemptClient != clients[i]) {
|
||||
// if(getDistance(getPlayerPosition(clients[i]), position) < getDistance(getPlayerPosition(clients[closest]), position)) {
|
||||
// closest = i;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
return getElementsByType(ELEMENT_PLAYER).filter((fp) => fp != exemptPlayer).reduce((i, j) => ((i.position.distance(position) <= j.position.distance(position)) ? i : j));
|
||||
|
||||
//return clients[closest];
|
||||
let clients = getClients();
|
||||
let closest = 0;
|
||||
for(let i in clients) {
|
||||
if(exemptClient != clients[i]) {
|
||||
if(getDistance(getPlayerPosition(clients[i]), position) < getDistance(getPlayerPosition(clients[closest]), position)) {
|
||||
closest = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
return clients[closest];
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -358,6 +353,10 @@ function updateConnectionLogOnAuth(client, authId) {
|
||||
// ===========================================================================
|
||||
|
||||
function updateConnectionLogOnClientInfoReceive(client, clientVersion, screenWidth, screenHeight) {
|
||||
if(getPlayerData(client) != false) {
|
||||
getPlayerData(client).clientVersion = clientVersion;
|
||||
}
|
||||
|
||||
let dbConnection = connectToDatabase();
|
||||
if(dbConnection) {
|
||||
let safeClientVersion = escapeDatabaseString(dbConnection, clientVersion);
|
||||
@@ -396,6 +395,10 @@ function getClientFromSyncerId(syncerId) {
|
||||
// ===========================================================================
|
||||
|
||||
function triggerWebHook(messageString, serverId = getServerId(), type = VRR_DISCORD_WEBHOOK_LOG) {
|
||||
if(!getGlobalConfig().discord.webhook.enabled) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let tempURL = getGlobalConfig().discord.webhook.webhookBaseURL;
|
||||
tempURL = tempURL.replace("{0}", encodeURI(messageString));
|
||||
tempURL = tempURL.replace("{1}", serverId);
|
||||
@@ -449,7 +452,7 @@ function clearTemporaryPeds() {
|
||||
|
||||
function kickAllClients() {
|
||||
getClients().forEach((client) => {
|
||||
client.disconnect();
|
||||
disconnectPlayer(client);
|
||||
})
|
||||
}
|
||||
|
||||
@@ -464,7 +467,7 @@ function updateTimeRule() {
|
||||
// ===========================================================================
|
||||
|
||||
function isClientInitialized(client) {
|
||||
return (typeof getServerData().clients[client.index] != "undefined");
|
||||
return (typeof getServerData().clients[getPlayerId(client)] != "undefined");
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -494,3 +497,13 @@ function getPlayerConnectionsInLastMonthByName(name) {
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function addPrefixNumberFill(number, amount) {
|
||||
let numberString = toString(number);
|
||||
while(numberString.length < amount) {
|
||||
numberString = toString(`0${numberString}`);
|
||||
}
|
||||
return toString(numberString);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -9,12 +9,6 @@
|
||||
|
||||
function initVehicleScript() {
|
||||
logToConsole(LOG_INFO, "[VRR.Vehicle]: Initializing vehicle script ...");
|
||||
if(!getServerConfig().devServer) {
|
||||
getServerData().vehicles = loadVehiclesFromDatabase();
|
||||
}
|
||||
|
||||
spawnAllVehicles();
|
||||
setAllVehicleIndexes();
|
||||
logToConsole(LOG_INFO, "[VRR.Vehicle]: Vehicle script initialized successfully!");
|
||||
return true;
|
||||
}
|
||||
@@ -28,10 +22,13 @@ function loadVehiclesFromDatabase() {
|
||||
let dbAssoc;
|
||||
if(dbConnection) {
|
||||
let dbQueryString = `SELECT * FROM veh_main WHERE veh_server = ${getServerId()} AND veh_deleted = 0`;
|
||||
dbAssoc = await fetchQueryAssoc(dbConnection, dbQueryString);
|
||||
for(let i in dbAssoc) {
|
||||
let tempVehicleData = new VehicleData(dbAssoc[i]);
|
||||
tempVehicles.push(tempVehicleData);
|
||||
let dbQuery = queryDatabase(dbConnection, dbQueryString);
|
||||
if(dbQuery) {
|
||||
while(dbAssoc = fetchQueryAssoc(dbQuery)) {
|
||||
let tempVehicleData = new VehicleData(dbAssoc);
|
||||
tempVehicles.push(tempVehicleData);
|
||||
}
|
||||
freeDatabaseQuery(dbQuery);
|
||||
}
|
||||
disconnectFromDatabase(dbConnection);
|
||||
}
|
||||
@@ -42,7 +39,7 @@ function loadVehiclesFromDatabase() {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function saveVehiclesToDatabase() {
|
||||
function saveAllVehiclesToDatabase() {
|
||||
if(getServerConfig().devServer) {
|
||||
return false;
|
||||
}
|
||||
@@ -147,7 +144,7 @@ function saveVehicleToDatabase(vehicleDataId) {
|
||||
getServerData().vehicles[vehicleDataId].needsSaved = false;
|
||||
} else {
|
||||
let queryString = createDatabaseUpdateQuery("veh_main", data, `veh_id=${tempVehicleData.databaseId}`);
|
||||
dbQuery = queryDatabase(dbConnection, queryString);
|
||||
dbQuery = queryDatabase(dbConnection, queryString, true);
|
||||
getServerData().vehicles[vehicleDataId].needsSaved = false;
|
||||
}
|
||||
|
||||
@@ -174,9 +171,9 @@ function spawnAllVehicles() {
|
||||
// ===========================================================================
|
||||
|
||||
/**
|
||||
* @param {Vehicle} vehicle - The vehicle element
|
||||
* @return {VehicleData} The vehicles's data (class instance)
|
||||
*/
|
||||
* @param {Vehicle} vehicle - The vehicle element
|
||||
* @return {VehicleData} The vehicles's data (class instance)
|
||||
*/
|
||||
function getVehicleData(vehicle) {
|
||||
if(getGame() != VRR_GAME_GTA_IV) {
|
||||
if(isVehicleObject(vehicle)) {
|
||||
@@ -215,7 +212,7 @@ function createVehicleCommand(command, params, client) {
|
||||
let frontPos = getPosInFrontOfPos(getPlayerPosition(client), getPlayerHeading(client), getGlobalConfig().spawnCarDistance);
|
||||
let vehicle = createPermanentVehicle(modelIndex, frontPos, heading, getPlayerInterior(client), getPlayerDimension(client));
|
||||
|
||||
messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}created a {vehiclePurple}${getVehicleName(vehicle)}!`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} created a {vehiclePurple}${getVehicleName(vehicle)}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -236,22 +233,38 @@ function createTemporaryVehicleCommand(command, params, client) {
|
||||
let frontPos = getPosInFrontOfPos(getPlayerPosition(client), getPlayerHeading(client), getGlobalConfig().spawnCarDistance);
|
||||
let vehicle = createTemporaryVehicle(modelIndex, frontPos, getPlayerHeading(client), getPlayerInterior(client), getPlayerDimension(client));
|
||||
|
||||
messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}created a temporary {vehiclePurple}${getVehicleName(vehicle)}`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} created a temporary {vehiclePurple}${getVehicleName(vehicle)}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getNearbyVehiclesCommand(command, params, client) {
|
||||
let distance = getParam(params, " ", 1) || 10.0;
|
||||
let distance = 10.0;
|
||||
|
||||
let nearbyVehicles = getElementsByTypeInRange(ELEMENT_VEHICLE, getPlayerPosition, distance);
|
||||
if(!areParamsEmpty(params)) {
|
||||
distance = getParam(params, " ", 1);
|
||||
}
|
||||
|
||||
if(isNaN(distance)) {
|
||||
messagePlayerError(client, "The distance must be a number!");
|
||||
return false;
|
||||
}
|
||||
|
||||
distance = toFloat(distance);
|
||||
|
||||
if(distance <= 0) {
|
||||
messagePlayerError(client, "The distance must be more than 0!");
|
||||
return false;
|
||||
}
|
||||
|
||||
let nearbyVehicles = getVehiclesInRange(getPlayerPosition(client), distance);
|
||||
|
||||
if(nearbyVehicles.length == 0) {
|
||||
messagePlayerAlert(client, getLocaleString(client, "NoVehiclesWithinRange", distance));
|
||||
return false;
|
||||
}
|
||||
|
||||
let vehiclesList = getServerData().radioStations.map(function(x) { return `{ALTCOLOUR}${getVehicleData(x).index}: {MAINCOLOUR}${getVehicleName(x)} {darkGrey}(${getDistance(getPlayerPosition(client), getVehiclePosition(x))} ${getLocaleString(client, "Meters")} ${getGroupedLocaleString(client, "CardinalDirections")[getCardinalDirection(getPlayerPosition(client), getVehiclePosition(x))]}})`; });
|
||||
let vehiclesList = nearbyVehicles.map(function(x) { return `{ALTCOLOUR}${getVehicleData(x).index}: {MAINCOLOUR}${getVehicleName(x)} {darkGrey}(${getDistance(getPlayerPosition(client), getVehiclePosition(x))} ${getLocaleString(client, "Meters")} ${getGroupedLocaleString(client, "CardinalDirections")[getCardinalDirection(getPlayerPosition(client), getVehiclePosition(x))]}})`; });
|
||||
let chunkedList = splitArrayIntoChunks(vehiclesList, 4);
|
||||
|
||||
messagePlayerNormal(client, makeChatBoxSectionHeader(getLocaleString(client, "HeaderVehiclesInRangeList")));
|
||||
@@ -262,42 +275,6 @@ function getNearbyVehiclesCommand(command, params, client) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function vehicleLockCommand(command, params, client) {
|
||||
let vehicle = getClosestVehicle(getPlayerPosition(client));
|
||||
|
||||
if(!getPlayerVehicle(client) && getDistance(getVehiclePosition(vehicle), getPlayerPosition(client)) > getGlobalConfig().vehicleLockDistance) {
|
||||
messagePlayerError(client, getLocaleString(client, "MustBeInOrNearVehicle"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!getVehicleData(vehicle)) {
|
||||
messagePlayerError(client, getLocaleString(client, "RandomVehicleCommandsDisabled"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(isPlayerInAnyVehicle(client)) {
|
||||
vehicle = getPlayerVehicle(client);
|
||||
if(!isPlayerInFrontVehicleSeat(client)) {
|
||||
messagePlayerError(client, getLocaleString(client, "MustBeInVehicleFrontSeat"));
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if(!doesPlayerHaveVehicleKeys(client, vehicle)) {
|
||||
messagePlayerError(client, getLocaleString(client, "DontHaveVehicleKey"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
getVehicleData(vehicle).locked = !getVehicleData(vehicle).locked;
|
||||
vehicle.locked = getVehicleData(vehicle).locked;
|
||||
|
||||
getVehicleData(vehicle).needsSaved = true;
|
||||
|
||||
meActionToNearbyPlayers(client, `${toLowerCase(getLockedUnlockedFromBool(getVehicleData(vehicle).locked))} the ${getVehicleName(vehicle)}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function vehicleTrunkCommand(command, params, client) {
|
||||
let vehicle = getClosestVehicle(getPlayerPosition(client));
|
||||
|
||||
@@ -318,8 +295,8 @@ function vehicleTrunkCommand(command, params, client) {
|
||||
}
|
||||
|
||||
getVehicleData(vehicle).trunk = !getVehicleData(vehicle).trunk;
|
||||
|
||||
getVehicleData(vehicle).needsSaved = true;
|
||||
setVehicleTrunkState(vehicle, getVehicleData(vehicle).trunk);
|
||||
|
||||
meActionToNearbyPlayers(client, `${toLowerCase(getOpenedClosedFromBool(getVehicleData(vehicle).trunk))} the ${getVehicleName(vehicle)}'s trunk.`);
|
||||
}
|
||||
@@ -345,8 +322,8 @@ function vehicleLightsCommand(command, params, client) {
|
||||
}
|
||||
|
||||
getVehicleData(vehicle).lights = !getVehicleData(vehicle).lights;
|
||||
setVehicleLightsState(vehicle, getVehicleData(vehicle).lights);
|
||||
getVehicleData(vehicle).needsSaved = true;
|
||||
setVehicleLightsState(vehicle, getVehicleData(vehicle).lights);
|
||||
|
||||
meActionToNearbyPlayers(client, `turned the ${getVehicleName(vehicle)}'s lights ${toLowerCase(getOnOffFromBool(getVehicleData(vehicle).lights))}`);
|
||||
}
|
||||
@@ -570,6 +547,7 @@ function buyVehicleCommand(command, params, client) {
|
||||
setPlayerBuyingVehicleState(client, VRR_VEHBUYSTATE_TESTDRIVE, vehicle.id, getVehiclePosition(vehicle));
|
||||
meActionToNearbyPlayers(client, `receives a set of keys to test drive the ${getVehicleName(vehicle)} and starts the engine`);
|
||||
messagePlayerInfo(client, getLocaleString(client, "DealershipPurchaseTestDrive"));
|
||||
getServerData().purchasingVehicleCache.push(client);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -608,10 +586,15 @@ function rentVehicleCommand(command, params, client) {
|
||||
}
|
||||
}
|
||||
|
||||
if(getVehicleData(vehicle).rentPrice > getPlayerCurrentSubAccount(client).cash) {
|
||||
messagePlayerError(client, getLocaleString(client, "NotEnoughCashNeedAmountMore", getVehicleData(vehicle).rentPrice-getPlayerCurrentSubAccount(client).cash));
|
||||
return false;
|
||||
}
|
||||
|
||||
getVehicleData(vehicle).rentedBy = client;
|
||||
getPlayerData(client).rentingVehicle = vehicle;
|
||||
getVehicleData(vehicle).rentStart = getCurrentUnixTimestamp();
|
||||
|
||||
getServerData().rentingVehicleCache.push(client);
|
||||
getVehicleData(vehicle).needsSaved = true;
|
||||
|
||||
meActionToNearbyPlayers(client, `rents the ${getVehicleName(vehicle)} and receives a set of vehicle keys!`);
|
||||
@@ -731,6 +714,11 @@ function setVehicleJobCommand(command, params, client) {
|
||||
|
||||
let vehicle = getPlayerVehicle(client);
|
||||
|
||||
if(!getVehicleData(vehicle)) {
|
||||
messagePlayerError(client, getLocaleString(client, "RandomVehicleCommandsDisabled"));
|
||||
return false;
|
||||
}
|
||||
|
||||
let closestJobLocation = getClosestJobLocation(getVehiclePosition(vehicle));
|
||||
let jobId = closestJobLocation.job;
|
||||
|
||||
@@ -749,7 +737,7 @@ function setVehicleJobCommand(command, params, client) {
|
||||
|
||||
getVehicleData(vehicle).needsSaved = true;
|
||||
|
||||
messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}set their {vehiclePurple}${getVehicleName(vehicle)} {MAINCOLOUR}owner to the {jobYellow}${getJobData(jobId).name} {MAINCOLOUR}job! (Job ID ${jobId})`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} set their {vehiclePurple}${getVehicleName(vehicle)}{MAINCOLOUR} owner to the {jobYellow}${getJobData(jobId).name} {MAINCOLOUR}job! (Job ID ${jobId})`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -766,9 +754,13 @@ function setVehicleRankCommand(command, params, client) {
|
||||
}
|
||||
|
||||
let vehicle = getPlayerVehicle(client);
|
||||
|
||||
let rankId = params;
|
||||
|
||||
if(!getVehicleData(vehicle)) {
|
||||
messagePlayerError(client, getLocaleString(client, "RandomVehicleCommandsDisabled"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getVehicleData(vehicle).ownerType == VRR_VEHOWNER_CLAN) {
|
||||
rankId = getClanRankFromParams(getVehicleData(vehicle).ownerId, params);
|
||||
if(!getClanRankData(getVehicleData(vehicle).ownerId, rankId)) {
|
||||
@@ -776,10 +768,10 @@ function setVehicleRankCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
getVehicleData(vehicle).rank = getClanRankData(getVehicleData(vehicle).ownerId, rankId).databaseId;
|
||||
messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}set their {vehiclePurple}${getVehicleName(vehicle)} {MAINCOLOUR}rank to {ALTCOLOUR}${getClanRankData(getVehicleData(vehicle).ownerId, rankId).name} {MAINCOLOUR}of the {clanOrange}${getClanData(getVehicleData(vehicle).ownerId).name} [#FFFFFFclan!`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} set their {vehiclePurple}${getVehicleName(vehicle)}{MAINCOLOUR} rank to {ALTCOLOUR}${getClanRankData(getVehicleData(vehicle).ownerId, rankId).name}{MAINCOLOUR} of the {clanOrange}${getClanData(getVehicleData(vehicle).ownerId).name}{MAINCOLOUR} clan!`);
|
||||
} else if(getVehicleData(vehicle).ownerType == VRR_VEHOWNER_JOB) {
|
||||
getVehicleData(vehicle).rank = rankId;
|
||||
messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}set their {vehiclePurple}${getVehicleName(vehicle)} {MAINCOLOUR}rank to {ALTCOLOUR}${rankId} {MAINCOLOUR}of the {jobYellow}${getJobData(getJobIdFromDatabaseId(getVehicleData(vehicle).ownerId)).name} {MAINCOLOUR}job!`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} set their {vehiclePurple}${getVehicleName(vehicle)}{MAINCOLOUR} rank to {ALTCOLOUR}${rankId}{MAINCOLOUR} of the {jobYellow}${getJobData(getJobIdFromDatabaseId(getVehicleData(vehicle).ownerId)).name}{MAINCOLOUR} job!`);
|
||||
}
|
||||
|
||||
getVehicleData(vehicle).needsSaved = true;
|
||||
@@ -796,6 +788,11 @@ function setVehicleClanCommand(command, params, client) {
|
||||
let vehicle = getPlayerVehicle(client);
|
||||
let clanId = getPlayerClan(client);
|
||||
|
||||
if(!getVehicleData(vehicle)) {
|
||||
messagePlayerError(client, getLocaleString(client, "RandomVehicleCommandsDisabled"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!getClanData(clanId)) {
|
||||
messagePlayerError(client, "That clan is invalid or doesn't exist!");
|
||||
return false;
|
||||
@@ -811,7 +808,7 @@ function setVehicleClanCommand(command, params, client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
showPlayerPromptGUI(client, getLocaleString(client, "SetVehicleClanConfirmMessage"), getLocaleString(client, "SetVehicleClanConfirm"), getLocaleString(client, "Yes"), getLocaleString(client, "No"));
|
||||
showPlayerPrompt(client, getLocaleString(client, "SetVehicleClanConfirmMessage"), getLocaleString(client, "SetVehicleClanConfirmTitle"), getLocaleString(client, "Yes"), getLocaleString(client, "No"));
|
||||
getPlayerData(client).promptType = VRR_PROMPT_GIVEVEHTOCLAN;
|
||||
|
||||
getVehicleData(vehicle).needsSaved = true;
|
||||
@@ -826,12 +823,22 @@ function setVehicleToBusinessCommand(command, params, client) {
|
||||
}
|
||||
|
||||
let vehicle = getPlayerVehicle(client);
|
||||
let businessId = toInteger(isPlayerInAnyBusiness(client)) ? getPlayerBusiness(client) : getClosestBusinessEntrance(getPlayerPosition(client));
|
||||
let businessId = getPlayerBusiness(client);
|
||||
|
||||
if(!getVehicleData(vehicle)) {
|
||||
messagePlayerError(client, getLocaleString(client, "RandomVehicleCommandsDisabled"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
getVehicleData(vehicle).ownerType = VRR_VEHOWNER_BIZ;
|
||||
getVehicleData(vehicle).ownerId = getBusinessData(businessId).databaseId;
|
||||
|
||||
messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}set their {vehiclePurple}${getVehicleName(vehicle)} {MAINCOLOUR}owner to the {businessBlue}${getBusinessData(businessId).name} {MAINCOLOUR}business`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} set their {vehiclePurple}${getVehicleName(vehicle)}{MAINCOLOUR} owner to the {businessBlue}${getBusinessData(businessId).name} {MAINCOLOUR}business`);
|
||||
|
||||
getVehicleData(vehicle).needsSaved = true;
|
||||
}
|
||||
@@ -847,6 +854,11 @@ function setVehicleOwnerCommand(command, params, client) {
|
||||
let vehicle = getPlayerVehicle(client);
|
||||
let targetClient = getPlayerFromParams(params);
|
||||
|
||||
if(!getVehicleData(vehicle)) {
|
||||
messagePlayerError(client, getLocaleString(client, "RandomVehicleCommandsDisabled"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!targetClient) {
|
||||
messagePlayerError(client, "That player is invalid or isn't connected!");
|
||||
return false;
|
||||
@@ -855,7 +867,7 @@ function setVehicleOwnerCommand(command, params, client) {
|
||||
getVehicleData(vehicle).ownerType = VRR_VEHOWNER_PLAYER;
|
||||
getVehicleData(vehicle).ownerId = getPlayerCurrentSubAccount(targetClient).databaseId;
|
||||
|
||||
messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}set their {vehiclePurple}${getVehicleName(vehicle)} {MAINCOLOUR}owner to {ALTCOLOUR}${getClientSubAccountName(targetClient)}`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} set their {vehiclePurple}${getVehicleName(vehicle)}{MAINCOLOUR} owner to {ALTCOLOUR}${getClientSubAccountName(targetClient)}`);
|
||||
|
||||
getVehicleData(vehicle).needsSaved = true;
|
||||
}
|
||||
@@ -870,10 +882,15 @@ function setVehiclePublicCommand(command, params, client) {
|
||||
|
||||
let vehicle = getPlayerVehicle(client);
|
||||
|
||||
if(!getVehicleData(vehicle)) {
|
||||
messagePlayerError(client, getLocaleString(client, "RandomVehicleCommandsDisabled"));
|
||||
return false;
|
||||
}
|
||||
|
||||
getVehicleData(vehicle).ownerType = VRR_VEHOWNER_PUBLIC;
|
||||
getVehicleData(vehicle).ownerId = 0;
|
||||
|
||||
messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}set their {vehiclePurple}${getVehicleName(vehicle)} {MAINCOLOUR}a public vehicle!`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} set their {vehiclePurple}${getVehicleName(vehicle)}{MAINCOLOUR} to a public vehicle!`);
|
||||
|
||||
getVehicleData(vehicle).needsSaved = true;
|
||||
}
|
||||
@@ -888,6 +905,11 @@ function setVehicleRentPriceCommand(command, params, client) {
|
||||
|
||||
let vehicle = getPlayerVehicle(client);
|
||||
|
||||
if(!getVehicleData(vehicle)) {
|
||||
messagePlayerError(client, getLocaleString(client, "RandomVehicleCommandsDisabled"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!doesClientOwnVehicle(client, vehicle)) {
|
||||
if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageVehicles"))) {
|
||||
messagePlayerError(client, "You can't set the rent price for this vehicle!");
|
||||
@@ -899,9 +921,7 @@ function setVehicleRentPriceCommand(command, params, client) {
|
||||
getVehicleData(vehicle).rentPrice = amount;
|
||||
getVehicleData(vehicle).needsSaved = true;
|
||||
|
||||
messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}set their {vehiclePurple}${getVehicleName(vehicle)} {MAINCOLOUR}rent price to {ALTCOLOUR}$${makeLargeNumberReadable(amount)}`);
|
||||
|
||||
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} set their {vehiclePurple}${getVehicleName(vehicle)}{MAINCOLOUR} rent price to {ALTCOLOUR}$${makeLargeNumberReadable(amount)}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -914,6 +934,11 @@ function setVehicleBuyPriceCommand(command, params, client) {
|
||||
|
||||
let vehicle = getPlayerVehicle(client);
|
||||
|
||||
if(!getVehicleData(vehicle)) {
|
||||
messagePlayerError(client, getLocaleString(client, "RandomVehicleCommandsDisabled"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!doesClientOwnVehicle(client, vehicle)) {
|
||||
if(!doesPlayerHaveStaffPermission(client, getStaffFlagValue("ManageVehicles"))) {
|
||||
messagePlayerError(client, "You can't set the buy price for this vehicle!");
|
||||
@@ -925,7 +950,7 @@ function setVehicleBuyPriceCommand(command, params, client) {
|
||||
getVehicleData(vehicle).buyPrice = amount;
|
||||
getVehicleData(vehicle).needsSaved = true;
|
||||
|
||||
messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}set their {vehiclePurple}${getVehicleName(vehicle)}'s {MAINCOLOUR}buy price to {ALTCOLOUR}$${makeLargeNumberReadable(amount)}`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} set their {vehiclePurple}${getVehicleName(vehicle)}'s{MAINCOLOUR} buy price to {ALTCOLOUR}$${makeLargeNumberReadable(amount)}`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -939,6 +964,11 @@ function removeVehicleOwnerCommand(command, params, client) {
|
||||
let vehicle = getPlayerVehicle(client);
|
||||
let targetClient = getPlayerFromParams(params);
|
||||
|
||||
if(!getVehicleData(vehicle)) {
|
||||
messagePlayerError(client, getLocaleString(client, "RandomVehicleCommandsDisabled"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!targetClient) {
|
||||
messagePlayerError(client, "That player is invalid or isn't connected!");
|
||||
return false;
|
||||
@@ -949,7 +979,7 @@ function removeVehicleOwnerCommand(command, params, client) {
|
||||
|
||||
getVehicleData(vehicle).needsSaved = true;
|
||||
|
||||
messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}set their {vehiclePurple}${getVehicleName(vehicle)} {MAINCOLOUR}owner to nobody!`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} set their {vehiclePurple}${getVehicleName(vehicle)}{MAINCOLOUR} owner to nobody!`);
|
||||
messagePlayerInfo(client, `Nobody will be able to use this vehicle until it receives a new owner (either bought or set by admin).`);
|
||||
}
|
||||
|
||||
@@ -964,7 +994,7 @@ function getVehicleInfoCommand(command, params, client) {
|
||||
let vehicle = getPlayerVehicle(client);
|
||||
|
||||
if(!getVehicleData(vehicle)) {
|
||||
messagePlayerError(client, "This is a random traffic vehicle and doesn't have any info");
|
||||
messagePlayerError(client, getLocaleString(client, "RandomVehicleCommandsDisabled"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -975,7 +1005,7 @@ function getVehicleInfoCommand(command, params, client) {
|
||||
ownerType = toLowerCase(getVehicleOwnerTypeText(vehicleData.ownerType));
|
||||
switch(vehicleData.ownerType) {
|
||||
case VRR_VEHOWNER_CLAN:
|
||||
ownerName = getClanData(vehicleData.ownerId).name;
|
||||
ownerName = getClanData(getClanIdFromDatabaseId(vehicleData.ownerId)).name;
|
||||
ownerType = "clan";
|
||||
break;
|
||||
|
||||
@@ -991,7 +1021,7 @@ function getVehicleInfoCommand(command, params, client) {
|
||||
break;
|
||||
|
||||
case VRR_VEHOWNER_BIZ:
|
||||
ownerName = getBusinessData(vehicleData.ownerId).name;
|
||||
ownerName = getBusinessData(getBusinessIdFromDatabaseId(vehicleData.ownerId)).name;
|
||||
ownerType = "business";
|
||||
break;
|
||||
|
||||
@@ -1013,7 +1043,7 @@ function getLastVehicleInfoCommand(command, params, client) {
|
||||
let vehicle = getPlayerLastVehicle(client);
|
||||
|
||||
if(!getVehicleData(vehicle)) {
|
||||
messagePlayerError(client, "This is a random traffic vehicle and doesn't have any info");
|
||||
messagePlayerError(client, getLocaleString(client, "RandomVehicleCommandsDisabled"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1067,7 +1097,7 @@ function toggleVehicleSpawnLockCommand(command, params, client) {
|
||||
getVehicleData(vehicle).spawnRotation = getVehicleHeading(vehicle);
|
||||
}
|
||||
|
||||
messageAdmins(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}set their {vehiclePurple}${getVehicleName(vehicle)} {MAINCOLOUR}to spawn {ALTCOLOUR}${(getVehicleData(vehicle).spawnLocked) ? "at it's current location" : "wherever a player leaves it."}`);
|
||||
messageAdmins(`{adminOrange}${getPlayerName(client)}{MAINCOLOUR} set their {vehiclePurple}${getVehicleName(vehicle)}{MAINCOLOUR} to spawn {ALTCOLOUR}${(getVehicleData(vehicle).spawnLocked) ? "at it's current location" : "wherever a player leaves it."}`);
|
||||
|
||||
getVehicleData(vehicle).needsSaved = true;
|
||||
}
|
||||
@@ -1203,11 +1233,11 @@ function respawnBusinessVehiclesCommand(command, params, client) {
|
||||
// ===========================================================================
|
||||
|
||||
function stopRentingVehicle(client) {
|
||||
getServerData().rentingVehicleCache.splice(getServerData().rentingVehicleCache.indexOf(client), 1);
|
||||
let vehicle = getPlayerData(client).rentingVehicle;
|
||||
getPlayerData(client).rentingVehicle = false;
|
||||
getVehicleData(vehicle).rentedBy = false;
|
||||
respawnVehicle(vehicle);
|
||||
getVehicleData(vehicle).needsSaved = true;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -1241,13 +1271,18 @@ function respawnVehicle(vehicle) {
|
||||
function spawnVehicle(vehicleData) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Vehicle]: Spawning ${getVehicleNameFromModel(vehicleData.model)} at ${vehicleData.spawnPosition.x}, ${vehicleData.spawnPosition.y}, ${vehicleData.spawnPosition.z} with heading ${vehicleData.spawnRotation}`);
|
||||
let vehicle = createGameVehicle(vehicleData.model, vehicleData.spawnPosition, vehicleData.spawnRotation);
|
||||
setVehicleHeading(vehicle, vehicleData.spawnRotation);
|
||||
setElementTransient(vehicle, false);
|
||||
addToWorld(vehicle);
|
||||
|
||||
if(!vehicle) {
|
||||
return false;
|
||||
}
|
||||
|
||||
setVehicleHeading(vehicle, vehicleData.spawnRotation)
|
||||
setVehicleHeading(vehicle, vehicleData.spawnRotation);
|
||||
setElementDimension(vehicle, vehicleData.dimension);
|
||||
addToWorld(vehicle);
|
||||
|
||||
vehicleData.vehicle = vehicle;
|
||||
|
||||
if(isGameFeatureSupported("vehicleColours")) {
|
||||
@@ -1267,8 +1302,7 @@ function spawnVehicle(vehicleData) {
|
||||
setVehicleEngine(vehicle, false);
|
||||
logToConsole(LOG_VERBOSE, `[VRR.Vehicle]: Setting vehicle ${vehicle.id}'s engine to OFF`);
|
||||
} else {
|
||||
setVehicleEngine(vehicle, intToBool(vehicleData.engine));
|
||||
logToConsole(LOG_VERBOSE, `[VRR.Vehicle]: Setting vehicle ${vehicle.id}'s engine to ${toUpperCase(getOnOffFromBool(getVehicleEngine(vehicle)))}`);
|
||||
setVehicleEngine(vehicle, intToBool(vehicleData.engine));logToConsole(LOG_VERBOSE, `[VRR.Vehicle]: Setting vehicle ${vehicle.id}'s engine to ${toUpperCase(getOnOffFromBool(getVehicleEngine(vehicle)))}`);
|
||||
}
|
||||
|
||||
if(typeof vehicle.locked != "undefined") {
|
||||
@@ -1276,8 +1310,6 @@ function spawnVehicle(vehicleData) {
|
||||
logToConsole(LOG_VERBOSE, `[VRR.Vehicle]: Setting vehicle ${vehicle.id}'s lock state to ${toUpperCase(getOnOffFromBool(getVehicleLocked(vehicle)))}`);
|
||||
}
|
||||
|
||||
setElementDimension(vehicle, vehicleData.dimension);
|
||||
|
||||
//setVehicleHealth(vehicle, 1000);
|
||||
repairVehicle(vehicle);
|
||||
|
||||
@@ -1287,14 +1319,16 @@ function spawnVehicle(vehicleData) {
|
||||
setEntityData(vehicle, "vrr.engine", vehicleData.engine, true);
|
||||
|
||||
forcePlayerToSyncElementProperties(null, vehicle);
|
||||
|
||||
|
||||
return vehicle;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function isVehicleAtPayAndSpray(vehicle) {
|
||||
for(let i in getServerData().payAndSprays[getServerGame()]) {
|
||||
if(getDistance(getVehiclePosition(vehicle), getServerData().payAndSprays[getServerGame()][i].position) <= getGlobalConfig().payAndSprayDistance) {
|
||||
for(let i in getServerData().payAndSprays[getGame()]) {
|
||||
if(getDistance(getVehiclePosition(vehicle), getServerData().payAndSprays[getGame()][i].position) <= getGlobalConfig().payAndSprayDistance) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1433,9 +1467,9 @@ function processVehiclePurchasing() {
|
||||
return false;
|
||||
}
|
||||
|
||||
let clients = getClients();
|
||||
for(let i in clients) {
|
||||
checkVehicleBuying(clients[i]);
|
||||
let purchasingVehicles = getServerData().purchasingVehicleCache;
|
||||
for(let i in purchasingVehicles) {
|
||||
checkVehiclePurchasing(purchasingVehicles[i]);
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -1443,7 +1477,7 @@ function processVehiclePurchasing() {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function checkVehicleBuying(client) {
|
||||
function checkVehiclePurchasing(client) {
|
||||
if(!isPlayerLoggedIn(client)) {
|
||||
setPlayerBuyingVehicleState(client, VRR_VEHBUYSTATE_NONE, null, null);
|
||||
return false;
|
||||
@@ -1466,6 +1500,7 @@ function checkVehicleBuying(client) {
|
||||
|
||||
if(!isPlayerInAnyVehicle(client)) {
|
||||
if(getPlayerData(client).buyingVehicle != false) {
|
||||
getServerData().purchasingVehicleCache.splice(getServerData().purchasingVehicleCache.indexOf(client), 1);
|
||||
messagePlayerError(client, getLocaleString(client, "DealershipPurchaseExitedVehicle"));
|
||||
respawnVehicle(getPlayerData(client).buyingVehicle);
|
||||
getPlayerData(client).buyingVehicle = false;
|
||||
@@ -1476,6 +1511,7 @@ function checkVehicleBuying(client) {
|
||||
|
||||
if(getDistance(getVehiclePosition(getPlayerData(client).buyingVehicle), getVehicleData(getPlayerData(client).buyingVehicle).spawnPosition) > getGlobalConfig().buyVehicleDriveAwayDistance) {
|
||||
if(getPlayerCurrentSubAccount(client).cash < getVehicleData(getPlayerData(client).buyingVehicle).buyPrice) {
|
||||
getServerData().purchasingVehicleCache.splice(getServerData().purchasingVehicleCache.indexOf(client), 1);
|
||||
messagePlayerError(client, getLocaleString(client, "VehiclePurchaseNotEnoughMoney"));
|
||||
respawnVehicle(getPlayerData(client).buyingVehicle);
|
||||
getPlayerData(client).buyingVehicle = false;
|
||||
@@ -1483,6 +1519,7 @@ function checkVehicleBuying(client) {
|
||||
return false;
|
||||
}
|
||||
|
||||
getServerData().purchasingVehicleCache.splice(getServerData().purchasingVehicleCache.indexOf(client), 1);
|
||||
createNewDealershipVehicle(getVehicleData(getPlayerData(client).buyingVehicle).model, getVehicleData(getPlayerData(client).buyingVehicle).spawnPosition, getVehicleData(getPlayerData(client).buyingVehicle).spawnRotation, getVehicleData(getPlayerData(client).buyingVehicle).buyPrice, getVehicleData(getPlayerData(client).buyingVehicle).ownerId);
|
||||
takePlayerCash(client, getVehicleData(getPlayerData(client).buyingVehicle).buyPrice);
|
||||
updatePlayerCash(client);
|
||||
@@ -1501,10 +1538,16 @@ function checkVehicleBuying(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function processVehicleBurning() {
|
||||
if(!getGlobalConfig().useServerSideVehicleBurnCheck) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let vehicles = getElementsByType(ELEMENT_VEHICLE);
|
||||
for(let i in vehicles) {
|
||||
if(vehicles[i].health <= 250) {
|
||||
return false;
|
||||
if(vehicles[i].syncer == null) {
|
||||
if(vehicles[i].health <= 250) {
|
||||
vehicles[i].health = 250;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ const VRR_GAME_GTA_III = 1;
|
||||
const VRR_GAME_GTA_VC = 2;
|
||||
const VRR_GAME_GTA_SA = 3;
|
||||
const VRR_GAME_GTA_IV = 5;
|
||||
const VRR_GAME_GTA_IV_EFLC = 6;
|
||||
const VRR_GAME_GTA_V = 50;
|
||||
const VRR_GAME_MAFIA_ONE = 10;
|
||||
const VRR_GAME_MAFIA_TWO = 11;
|
||||
|
||||
@@ -178,6 +178,7 @@ let serverColours = {
|
||||
clanOrange: "FF9900",
|
||||
vehiclePurple: "960096",
|
||||
jobYellow: "FFFF00",
|
||||
adminOrange: "ED4337",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -193,6 +194,22 @@ let serverColours = {
|
||||
alertMessage: toColour(255, 255, 0, 255),
|
||||
successMessage: toColour(0, 180, 0, 255),
|
||||
clanChatMessage: toColour(0, 190, 0, 255),
|
||||
policeBlue: toColour(50, 80, 200, 255),
|
||||
medicPink: toColour(219, 112, 147, 255),
|
||||
firefighterRed: toColour(205, 60, 60, 255),
|
||||
busDriverGreen: toColour(50, 160, 50, 255),
|
||||
taxiDriverYellow: toColour(240, 230, 100, 255),
|
||||
deliveryPurple: toColour(177, 156, 217, 255),
|
||||
civilianWhite: toColour(200, 200, 200, 255),
|
||||
burntYellow: toColour(210, 210, 0, 255),
|
||||
burntOrange: toColour(210, 120, 0, 255),
|
||||
bankGreen: toColour(0, 150, 0, 255),
|
||||
softYellow: toColour(234, 198, 126, 255),
|
||||
businessBlue: toColour(0, 153, 255, 255),
|
||||
houseGreen: toColour(17, 204, 17, 255),
|
||||
clanOrange: toColour(255, 153, 0, 255),
|
||||
npcPink: toColour(219, 112, 147, 255),
|
||||
adminOrange: toColour(205, 60, 60, 255),
|
||||
},
|
||||
byName: {
|
||||
white: toColour(255, 255, 255, 255),
|
||||
@@ -223,6 +240,7 @@ let serverColours = {
|
||||
houseGreen: toColour(17, 204, 17, 255),
|
||||
clanOrange: toColour(255, 153, 0, 255),
|
||||
npcPink: toColour(219, 112, 147, 255),
|
||||
adminOrange: toColour(205, 60, 60, 255),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1341,19 +1359,17 @@ function getDistance(vec1, vec2) {
|
||||
// ===========================================================================
|
||||
|
||||
function logToConsole(tempLogLevel, text) {
|
||||
if(typeof server != "undefined") {
|
||||
text = removeColoursInMessage(text);
|
||||
}
|
||||
text = removeColoursInMessage(text);
|
||||
|
||||
if((logLevel & tempLogLevel)) {
|
||||
if(hasBitFlag(logLevel|LOG_WARN|LOG_ERROR, tempLogLevel)) {
|
||||
if(tempLogLevel & LOG_ERROR) {
|
||||
console.error(text);
|
||||
consoleError(text);
|
||||
return true;
|
||||
} else if(tempLogLevel & LOG_WARN) {
|
||||
console.warn(text);
|
||||
consoleWarn(text);
|
||||
return true;
|
||||
} else {
|
||||
console.log(text);
|
||||
consolePrint(text);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1373,9 +1389,7 @@ function Enum(constantsList) {
|
||||
// ===========================================================================
|
||||
|
||||
function clearArray(array) {
|
||||
if(array != null) {
|
||||
array.splice(0, array.length);
|
||||
}
|
||||
array.length = 0;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -1398,16 +1412,6 @@ function getMultiplayerMod() {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getGame() {
|
||||
if(isServerScript()) {
|
||||
return server.game;
|
||||
} else {
|
||||
return game.game;
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function isSnowSupported(gameId) {
|
||||
return supportedFeatures.snow[getGame()];
|
||||
}
|
||||
@@ -1493,6 +1497,7 @@ function getAllowedSkins(gameId = getGame()) {
|
||||
// ===========================================================================
|
||||
|
||||
function getAllowedSkinIndexFromSkin(skin) {
|
||||
let allowedSkins = getAllowedSkins();
|
||||
for(let i in allowedSkins) {
|
||||
if(allowedSkins[i][0] == skin) {
|
||||
return i;
|
||||
@@ -1722,11 +1727,9 @@ function getObjectModelFromName(name, gameId = getGame()) {
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function getPosToRightOfPos(pos, angle, distance) {
|
||||
let x = (pos.x+((Math.cos((-angle+1.57)+(Math.PI/2)))*distance));
|
||||
let y = (pos.y+((Math.sin((-angle+1.57)+(Math.PI/2)))*distance));
|
||||
let x = (pos.x+((Math.cos((angle-1.57)+(Math.PI/2)))*distance));
|
||||
let y = (pos.y+((Math.sin((angle-1.57)+(Math.PI/2)))*distance));
|
||||
|
||||
let rightPos = toVector3(x, y, pos.z);
|
||||
|
||||
@@ -2687,6 +2690,14 @@ function removeColoursInMessage(messageText) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if(typeof messageText != "string") {
|
||||
return "";
|
||||
}
|
||||
|
||||
if(messageText == "") {
|
||||
return "";
|
||||
}
|
||||
|
||||
let tempFind = `{RESETCOLOUR}`;
|
||||
let tempRegex = new RegExp(tempFind, 'g');
|
||||
messageText = messageText.replace(tempRegex, "");
|
||||
@@ -2787,4 +2798,50 @@ function isPosInPoly(poly, position) {
|
||||
return c;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function createBitFlagTable(keyNames) {
|
||||
let bitVal = 0;
|
||||
let bitTable = {};
|
||||
let incVal = 1;
|
||||
|
||||
for(let i in keyNames) {
|
||||
let key = keyNames[i];
|
||||
bitTable[key] = bitVal;
|
||||
bitVal = 1 << incVal;
|
||||
incVal++;
|
||||
}
|
||||
return bitTable;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function hasBitFlag(allFlags, checkForFlag) {
|
||||
if(allFlags == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(allFlags == -1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if((allFlags & checkForFlag) == checkForFlag) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function addBitFlag(allFlags, flagValue) {
|
||||
return allFlags | flagValue;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function removeBitFlag(allFlags, flagValue) {
|
||||
return allFlags ^ flagValue;
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||