Advertisement
RISKSCRIPTS

Untitled

Dec 1st, 2024
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.42 KB | None | 0 0
  1. Config = {}
  2.  
  3. -- General Configurations
  4. Config.Framework = "auto" -- auto, esx, qb
  5. Config.Target = false
  6. Config.Language = "en" -- en, de, fr, sp
  7. Config.WeaponAsItem = false -- If you are not using weapons as items but instead using the weapon wheel, set this to false.
  8.  
  9. -- Crafting Stations Configuration
  10. Config.CraftingStations = {
  11. [1] = {
  12. enableNPC = true,
  13. theme = "metal", -- Theme for Crafting Station 1
  14. npc = "a_m_m_eastsa_01",
  15. location = {
  16. vec4(-294.8039, 2543.8181, 74.4158, 0.0284) -- Coordinates for NPC, Blip, Prop, and Marker
  17. },
  18. blip = {
  19. enable = true,
  20. label = "Weapon Crafting Station",
  21. sprite = 566,
  22. color = 40,
  23. scale = 0.8
  24. },
  25. prop = {
  26. enable = true,
  27. model = "prop_tool_bench02_ld",
  28. heading = 267.9657,
  29. offsetX = 0.00,
  30. offsetY = 0.78
  31. },
  32. marker = {
  33. enable = true,
  34. type = 1,
  35. size = vector3(1.0, 1.0, 1.0),
  36. color = { r = 0, g = 0, b = 0, a = 100 },
  37. rotate = true,
  38. bobUpAndDown = true,
  39. faceCamera = false
  40. },
  41. items = {
  42. {
  43. item = "weapon_pistol",
  44. label = "Pistol",
  45. amount = 1,
  46. description = "A reliable semi-automatic handgun for self-defense.",
  47. type = "weapon",
  48. time = 10 * 1000, -- 10 seconds
  49.  
  50. requirements = {
  51. {
  52. item = "metal_scrap",
  53. label = "Metal Scrap",
  54. amount = 5,
  55. remove = true
  56. },
  57. {
  58. item = "gunpowder",
  59. label = "Gunpowder",
  60. amount = 3,
  61. remove = true
  62. }
  63. }
  64. },
  65. {
  66. item = "weapon_snspistol",
  67. label = "SNS Pistol",
  68. amount = 1,
  69. description = "A compact and concealable pistol with decent power.",
  70. type = "weapon",
  71. time = 8 * 1000, -- 8 seconds
  72.  
  73. requirements = {
  74. {
  75. item = "metal_scrap",
  76. label = "Metal Scrap",
  77. amount = 3,
  78. remove = true
  79. },
  80. {
  81. item = "grip",
  82. label = "Grip",
  83. amount = 1,
  84. remove = true
  85. }
  86. }
  87. },
  88. {
  89. item = "weapon_combatpistol",
  90. label = "Combat Pistol",
  91. amount = 1,
  92. description = "A compact, lightweight pistol designed for combat.",
  93. type = "weapon",
  94. time = 12 * 1000, -- 12 seconds
  95.  
  96. requirements = {
  97. {
  98. item = "metal_scrap",
  99. label = "Metal Scrap",
  100. amount = 6,
  101. remove = true
  102. },
  103. {
  104. item = "gunpowder",
  105. label = "Gunpowder",
  106. amount = 4,
  107. remove = true
  108. },
  109. {
  110. item = "grip",
  111. label = "Grip",
  112. amount = 2,
  113. remove = true
  114. }
  115. }
  116. },
  117. {
  118. item = "weapon_microsmg",
  119. label = "Micro SMG",
  120. amount = 1,
  121. description = "A lightweight submachine gun for fast engagements.",
  122. type = "weapon",
  123. time = 15 * 1000, -- 15 seconds
  124.  
  125. requirements = {
  126. {
  127. item = "metal_scrap",
  128. label = "Metal Scrap",
  129. amount = 8,
  130. remove = true
  131. },
  132. {
  133. item = "gunpowder",
  134. label = "Gunpowder",
  135. amount = 6,
  136. remove = true
  137. },
  138. {
  139. item = "spring",
  140. label = "Spring",
  141. amount = 2,
  142. remove = true
  143. }
  144. }
  145. },
  146. {
  147. item = "weapon_assaultrifle",
  148. label = "Assault Rifle",
  149. amount = 1,
  150. description = "A powerful full-sized rifle for heavy engagements.",
  151. type = "weapon",
  152. time = 20 * 1000, -- 20 seconds
  153.  
  154. requirements = {
  155. {
  156. item = "metal_scrap",
  157. label = "Metal Scrap",
  158. amount = 12,
  159. remove = true
  160. },
  161. {
  162. item = "gunpowder",
  163. label = "Gunpowder",
  164. amount = 8,
  165. remove = true
  166. },
  167. {
  168. item = "grip",
  169. label = "Grip",
  170. amount = 3,
  171. remove = true
  172. }
  173. }
  174. }
  175. }
  176. },
  177. [2] = {
  178. enableNPC = true,
  179. theme = "wood", -- Theme for Crafting Station 2
  180. npc = "s_m_m_dockwork_01",
  181. location = {
  182. vec4(-128.2356, -1033.9167, 26.6540, 239.2586), -- Coordinates for NPC, Blip, Prop, and Marker
  183. },
  184. blip = {
  185. enable = true,
  186. label = "Crafting Station",
  187. sprite = 779,
  188. color = 0,
  189. scale = 0.8
  190. },
  191. prop = {
  192. enable = true,
  193. model = "prop_tool_bench02_ld",
  194. heading = 152.7539,
  195. offsetX = 0.95,
  196. offsetY = 0.95
  197. },
  198. marker = {
  199. enable = true,
  200. type = 1,
  201. size = vector3(1.0, 1.0, 1.0),
  202. color = { r = 255, g = 0, b = 0, a = 100 },
  203. rotate = true,
  204. bobUpAndDown = true,
  205. faceCamera = false
  206. },
  207. items = {
  208. {
  209. item = "medikit",
  210. label = "Medikit",
  211. amount = 1,
  212. description = "A complete first-aid kit for emergencies.",
  213. type = "item",
  214. time = 10 * 1000, -- 10 seconds
  215.  
  216. requirements = {
  217. {
  218. item = "bandage",
  219. label = "Bandage",
  220. amount = 2,
  221. remove = true
  222. },
  223. {
  224. item = "painkillers",
  225. label = "Painkillers",
  226. amount = 1,
  227. remove = true
  228. }
  229. }
  230. },
  231. {
  232. item = "repairkit",
  233. label = "Repair Kit",
  234. amount = 1,
  235. description = "A toolkit for repairing vehicles.",
  236. type = "item",
  237. time = 15 * 1000, -- 15 seconds
  238.  
  239. requirements = {
  240. {
  241. item = "metal_scrap",
  242. label = "Metal Scrap",
  243. amount = 3,
  244. remove = true
  245. },
  246. {
  247. item = "duct_tape",
  248. label = "Duct Tape",
  249. amount = 1,
  250. remove = true
  251. }
  252. }
  253. },
  254. {
  255. item = "sandwich",
  256. label = "Sandwich",
  257. amount = 1,
  258. description = "A quick snack to regain energy.",
  259. type = "item",
  260. time = 5 * 1000, -- 5 seconds
  261.  
  262. requirements = {
  263. {
  264. item = "brot",
  265. label = "Bread",
  266. amount = 1,
  267. remove = true
  268. },
  269. {
  270. item = "cheese",
  271. label = "Cheese",
  272. amount = 1,
  273. remove = true
  274. }
  275. }
  276. },
  277. {
  278. item = "syringe",
  279. label = "Syringe",
  280. amount = 1,
  281. description = "Just Syringe.",
  282. type = "item",
  283. time = 12 * 1000, -- 12 seconds
  284.  
  285. requirements = {
  286. {
  287. item = "bandage",
  288. label = "Bandage",
  289. amount = 3,
  290. remove = true
  291. },
  292. {
  293. item = "painkillers",
  294. label = "Painkillers",
  295. amount = 2,
  296. remove = true
  297. }
  298. }
  299. },
  300. {
  301. item = "lockpick",
  302. label = "Lockpick",
  303. amount = 1,
  304. description = "A handy tool to pick simple locks.",
  305. type = "item",
  306. time = 8 * 1000, -- 8 seconds
  307.  
  308. requirements = {
  309. {
  310. item = "metal_scrap",
  311. label = "Metal Scrap",
  312. amount = 2,
  313. remove = true
  314. },
  315. {
  316. item = "duct_tape",
  317. label = "Duct Tape",
  318. amount = 1,
  319. remove = true
  320. }
  321. }
  322. },
  323. {
  324. item = "flashlight",
  325. label = "Flashlight",
  326. amount = 1,
  327. description = "A portable light source for dark areas.",
  328. type = "item",
  329. time = 7 * 1000, -- 7 seconds
  330.  
  331. requirements = {
  332. {
  333. item = "metal_scrap",
  334. label = "Metal Scrap",
  335. amount = 2,
  336. remove = true
  337. },
  338. {
  339. item = "grip",
  340. label = "Grip",
  341. amount = 1,
  342. remove = true
  343. }
  344. }
  345. },
  346. {
  347. item = "weapon_pistol",
  348. label = "Pistol",
  349. amount = 1,
  350. description = "A reliable semi-automatic handgun for self-defense.",
  351. type = "weapon",
  352. time = 10 * 1000, -- 10 seconds
  353.  
  354. requirements = {
  355. {
  356. item = "metal_scrap",
  357. label = "Metal Scrap",
  358. amount = 5,
  359. remove = true
  360. },
  361. {
  362. item = "license",
  363. label = "License",
  364. amount = 1,
  365. remove = false
  366. },
  367. {
  368. item = "gunpowder",
  369. label = "Gunpowder",
  370. amount = 3,
  371. remove = true
  372. }
  373. }
  374. },
  375. {
  376. item = "coffee",
  377. label = "Coffee",
  378. amount = 1,
  379. description = "A warm cup of coffee to boost energy.",
  380. type = "item",
  381. time = 5 * 1000, -- 5 seconds
  382.  
  383. requirements = {
  384. {
  385. item = "wasser",
  386. label = "Wasser",
  387. amount = 1,
  388. remove = true
  389. },
  390. {
  391. item = "coffee_beans",
  392. label = "Coffee Beans",
  393. amount = 1,
  394. remove = true
  395. }
  396. }
  397. }
  398. }
  399. },
  400. }
  401.  
  402. Config.Locales = {
  403. ["en"] = {
  404. open_craft = "[E] Open Craft Menu",
  405. success = "You successfully crafted.",
  406. no_item = "Not enough items for crafting."
  407. },
  408. ["de"] = {
  409. open_craft = "[E] Öffne das Craft-Menü",
  410. success = "Du hast erfolgreich hergestellt.",
  411. no_item = "Nicht genügend Gegenstände zum Herstellen."
  412. },
  413. ["sp"] = {
  414. open_craft = "[E] Abrir menú de creación",
  415. success = "Has creado con éxito.",
  416. no_item = "No tienes suficientes objetos para crear."
  417. },
  418. ["fr"] = {
  419. open_craft = "[E] Ouvrir le menu d'artisanat",
  420. success = "Vous avez fabriqué avec succès.",
  421. no_item = "Pas assez d'objets pour fabriquer."
  422. }
  423. }
  424.  
  425. function getFramework()
  426. if Config.Framework == "esx" then
  427. return exports['es_extended']:getSharedObject(), "esx"
  428. elseif Config.Framework == "qb" then
  429. return exports["qb-core"]:GetCoreObject(), "qb"
  430. elseif Config.Framework == "auto" then
  431. if GetResourceState('qb-core') == 'started' then
  432. return exports["qb-core"]:GetCoreObject(), "qb"
  433. elseif GetResourceState('es_extended') == 'started' then
  434. return exports['es_extended']:getSharedObject(), "esx"
  435. end
  436. end
  437. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement