0% fanden dieses Dokument nützlich (0 Abstimmungen)
3 Ansichten9 Seiten

Code

Das Dokument beschreibt das 'PHOENIX ASCENSION' Mod Menü für ein Spiel, das verschiedene Funktionen wie ein klassisches Menü, einen Freecam-Modus und einen Entity Grabber kombiniert. Es enthält Sicherheitswarnungen bezüglich der Nutzung in Verbindung mit Anti-Cheat-Systemen und bietet Konfigurationsmöglichkeiten sowie Kernfunktionen für Spielerinteraktionen. Zudem werden riskante Funktionen aufgeführt, die potenziell das Spielerlebnis anderer beeinträchtigen können.

Hochgeladen von

epicyanni84
Copyright
© All Rights Reserved
Wir nehmen die Rechte an Inhalten ernst. Wenn Sie vermuten, dass dies Ihr Inhalt ist, beanspruchen Sie ihn hier.
Verfügbare Formate
Als TXT, PDF, TXT herunterladen oder online auf Scribd lesen
0% fanden dieses Dokument nützlich (0 Abstimmungen)
3 Ansichten9 Seiten

Code

Das Dokument beschreibt das 'PHOENIX ASCENSION' Mod Menü für ein Spiel, das verschiedene Funktionen wie ein klassisches Menü, einen Freecam-Modus und einen Entity Grabber kombiniert. Es enthält Sicherheitswarnungen bezüglich der Nutzung in Verbindung mit Anti-Cheat-Systemen und bietet Konfigurationsmöglichkeiten sowie Kernfunktionen für Spielerinteraktionen. Zudem werden riskante Funktionen aufgeführt, die potenziell das Spielerlebnis anderer beeinträchtigen können.

Hochgeladen von

epicyanni84
Copyright
© All Rights Reserved
Wir nehmen die Rechte an Inhalten ernst. Wenn Sie vermuten, dass dies Ihr Inhalt ist, beanspruchen Sie ihn hier.
Verfügbare Formate
Als TXT, PDF, TXT herunterladen oder online auf Scribd lesen

--

===================================================================================
==============
-- PHOENIX ASCENSION - All-in-One Mod Menü (Finale, debuggte & kommentierte
Version)
--
-- Inspiriert von professionellen Executoren und den besten Community-Skripten.
-- Kombiniert ein klassisches Menü (F5/F6) mit einem interaktiven Freecam-Modus (H)
und einem Entity Grabber.
--
-- SICHERHEITSHINWEIS: Anti-Cheats wie PhoenixAC/FIREAC sind mächtig. Dieses Skript
minimiert
-- Risiken durch Fokus auf client-seitige Funktionen. Server-seitige Trigger und
Crasher sind extrem
-- riskant und sollten nur mit Bedacht verwendet werden. Nutzung auf eigene Gefahr!
--
===================================================================================
==============

--
[[---------------------------------------------------------------------------------
---------------
-- KONFIGURATION & EINSTELLUNGEN
-- Hier kannst du das Menü an deine Bedürfnisse anpassen.
-----------------------------------------------------------------------------------
---------------]]
local CLASSIC_MENU_KEY = 166 -- F5 (Standard: Menü öffnen / Im Fahrzeug:
Reparieren)
local FREECAM_KEY = 74 -- H (Freecam Modus an/aus)
local FORCE_ENGINE_KEY = 167 -- F6 (Motor an erzwingen)
local ENTITY_GRABBER_KEY = 246 -- Y (Entität aufheben/loslassen)
local MENU_TITLE = "~b~♦~s~ PHOENIX ASCENSION ~b~♦~s~"

-- Globale Tabelle zur Statusverfolgung aller aktivierbaren Funktionen


local Toggles = {
godmode = false,
noclip = false,
super_run = false,
infinite_ammo = false,
vehicle_puller = false,
}

-- Globale Variable für das persönliche Fahrzeug


local personalVehicle = nil

-- Konfiguration für den Fahrzeug-Magnet


local VEHICLE_PULLER_CONFIG = {
MAX_PULL = 5,
PULL_FORCE = 11.25,
PULL_STEPS = 40,
PULL_DURATION = 3000, -- ms
UPDATE_INTERVAL = 4000 -- ms
}

-- [EXTREM RISKANT] Bibliothek bekannter, potenziell ausnutzbarer Events


local TRIGGER_LIBRARY = {
{ name = "Geld (Trucker Job)", event = "esx_truckerjob:pay", args =
{1000000} },
{ name = "Geld (Slotmaschine)", event = "esx_slotmachine:sv:2", args = {100000}
},
{ name = "Alle wiederbeleben (ESX)", event = "esx_ambulancejob:revive", args =
{-1} },
{ name = "Admin: Gib dreckiges Geld", event = "AdminMenu:giveDirtyMoney", args
= {500000} },
{ name = "Admin: Gib Bargeld", event = "AdminMenu:giveCash", args = {60000} },
{ name = "Skin Menü öffnen (ESX)", event = "esx_skin:openSaveableMenu", args =
{} },
}

--
[[---------------------------------------------------------------------------------
---------------
-- HELFER FUNKTIONEN (Tools, die das Skript sauber und wiederverwendbar halten)
-----------------------------------------------------------------------------------
---------------]]
-- Zeichnet Text auf dem Bildschirm
function DrawText(x, y, text, color, scale, centered) SetTextFont(0);
SetTextProportional(1); SetTextScale(0.0, scale or 0.35); SetTextColour(color.r,
color.g, color.b, color.a or 255); SetTextDropShadow(0,0,0,0,255);
SetTextEdge(1,0,0,0,255); SetTextEntry("STRING"); if centered then
SetTextCentre(true) end; AddTextComponentString(text); DrawText(x, y) end
-- Gibt die aktuelle Entität des Spielers zurück (Fahrzeug oder Ped)
function GetPlayerEntity() return IsPedInAnyVehicle(PlayerPedId(), false) and
GetVehiclePedIsIn(PlayerPedId(), false) or PlayerPedId() end
-- Konvertiert eine Rotations-Vektor in eine Richtungs-Vektor
function RotationToDirection(rot) local rZ=[Link](rot.z); local
rX=[Link](rot.x); local cX=[Link](rX); return vector3(-[Link](rZ)*cX,
[Link](rZ)*cX, [Link](rX)) end
-- Öffnet eine Tastatur-Eingabeaufforderung auf dem Bildschirm
function KeyboardInput(title, defaultText, maxLength) AddTextEntry("FMMC_KEY_TIP1",
title); DisplayOnscreenKeyboard(1, "FMMC_KEY_TIP1", "", defaultText, "", "", "",
maxLength); while (UpdateOnscreenKeyboard()~=1 and UpdateOnscreenKeyboard()~=2) do
[Link](0) end; if (UpdateOnscreenKeyboard()==1) then return
GetOnscreenKeyboardResult() end; return nil end
-- Findet die Entität, auf die der Spieler gerade zielt
function GetEntityInCrosshair() local
_,h,_,_,ent=GetShapeTestResult(StartShapeTestRay(GetGameplayCamCoord(),GetGameplayC
amCoord()+RotationToDirection(GetGameplayCamRot(2))*100.0,-1,PlayerPedId(),0)); if
h==1 then return ent end; return nil end

--
[[---------------------------------------------------------------------------------
---------------
-- KERNFUNKTIONEN (Die eigentlichen Aktionen des Menüs)
-----------------------------------------------------------------------------------
---------------]]
-- [Sicher] Heilt den Spieler und gibt ihm Rüstung.
function HealPlayer() SetEntityHealth(PlayerPedId(),
GetEntityMaxHealth(PlayerPedId())); SetPedArmour(PlayerPedId(), 100) end
-- [Sicher] Repariert und wäscht ein Fahrzeug.
function RepairVehicle(veh) if veh and DoesEntityExist(veh) then
SetVehicleFixed(veh); SetVehicleDirtLevel(veh, 0.0) end end
-- [Sicher] Gibt dem Spieler ein Basis-Waffenset.
function GiveAllWeapons() local weapons = {"WEAPON_PISTOL", "WEAPON_CARBINERIFLE",
"WEAPON_MINIGUN"}; for _, w in ipairs(weapons) do GiveWeaponToPed(PlayerPedId(),
GetHashKey(w), 999, 0, 1) end end
-- [Sicher] Spawnt ein Fahrzeug und setzt den Spieler hinein.
function SpawnAndEnterVehicle(modelName) local modelHash=GetHashKey(modelName);
RequestModel(modelHash); while not HasModelLoaded(modelHash) do [Link](10)
end; local c=GetOffsetFromEntityInWorldCoords(PlayerPedId(),0.0,5.0,0.5); local
v=CreateVehicle(modelHash,c.x,c.y,c.z,GetEntityHeading(PlayerPedId()),1,1);
SetModelAsNoLongerNeeded(modelHash); TaskWarpPedIntoVehicle(PlayerPedId(),v,-1) end
-- [Moderat Riskant] Teleportiert zum Wegpunkt.
function TeleportToWaypoint() local w=GetFirstBlipInfoId(8); if DoesBlipExist(w)
then local c=GetBlipInfoIdCoord(w); local e=GetPlayerEntity();
SetEntityCoords(e,c.x,c.y,1000.0,0,0,0,1); [Link](200); local
z,f=GetGroundZFor_3dCoord(c.x,c.y,1000.0,0); if f then
SetEntityCoords(e,c.x,c.y,z+1.0,0,0,0,1) end end end
-- [Sicher] Bereinigt temporäre Spieldaten.
function deepWipeMemory() collectgarbage("collect"); RemoveNamedPtfxAsset("core");
ClearAllBrokenGlass(); ClearFocus(); ClearAllHelpMessages(); ClearDrawOrigin();
DestroyAllCams(true); SetStreamedTextureDictAsNoLongerNeeded("core");
PlaySoundFrontend(-1, "CONFIRM_BEEP", "HUD_MINI_GAME_SOUNDSET", true) end
-- [EXTREM RISKANT] Crasht den Client eines Zielspielers durch Ped-Spam.
function PedCrasher(targetPlayerId)
local targetPed = GetPlayerPed(targetPlayerId)
if not targetPed or not DoesEntityExist(targetPed) then return end
local targetCoords = GetEntityCoords(targetPed)
local pedModel = GetHashKey("u_m_y_wade")
RequestModel(pedModel); while not HasModelLoaded(pedModel) do [Link](10)
end
local spawnedPeds = {}
for i = 1, 150 do -- Reduziert auf 150 für mehr Stabilität
local ped = CreatePed(4, pedModel, targetCoords.x+[Link](-10,10),
targetCoords.y+[Link](-10,10), targetCoords.z, 0.0, true, true)
SetEntityAsMissionEntity(ped, true, true)
NetworkSetEntityInvisibleToNetwork(ped, true)
[Link](spawnedPeds, ped)
end
[Link](7000, function() for _, ped in ipairs(spawnedPeds) do if
DoesEntityExist(ped) then DeleteEntity(ped) end end end)
end

--
[[---------------------------------------------------------------------------------
---------------
-- FREECAM MODUS (H)
-----------------------------------------------------------------------------------
---------------]]
local freecam_active = false
local freecam = nil
local freecam_features = {
{ name = "Teleport", func = function(coords) SetEntityCoords(GetPlayerEntity(),
coords.x, coords.y, coords.z, 0,0,0,1) end, desc = "Teleportiert dich zur
anvisierten Position." },
{ name = "Explosion", func = function(coords) AddExplosion(coords.x, coords.y,
coords.z, 1, 10.0, true, false, 0.0) end, desc = "Erzeugt eine Explosion." },
{ name = "Entität löschen", func = function(_, entity) if entity and entity ~=
0 then SetEntityAsMissionEntity(entity, 1, 1); DeleteEntity(entity) end end, desc =
"Löscht das anvisierte Fahrzeug/Objekt/NPC." },
{ name = "Spieler klonen", func = function(_, entity) if entity and
IsEntityAPed(entity) and IsPedAPlayer(entity) then ClonePed(entity,
GetEntityHeading(entity), true, true) end end, desc = "Erstellt einen Doppelgänger
des anvisierten Spielers." },
{ name = "🚽 anheften", func = function(_, entity)
if entity and IsEntityAPed(entity) and IsPedAPlayer(entity) then
local model = GetHashKey("prop_toilet_01")
RequestModel(model); while not HasModelLoaded(model) do [Link](1)
end
local obj = CreateObject(model, 0, 0, 0, true, false, true)
AttachEntityToEntity(obj, entity, GetPedBoneIndex(entity, 0x796e), 0.0,
0.2, 0.1, 0.0, 90.0, 0.0, false, false, false, false, 2, true)
end
end, desc = "Heftet dem anvisierten Spieler eine Toilette an den Kopf." },
{ name = "Panther spwanen", func = function(coords)
local model = GetHashKey("a_c_panther")
RequestModel(model); while not HasModelLoaded(model) do [Link](1) end
CreatePed(4, model, coords.x, coords.y, coords.z, 0.0, true, true)
end, desc = "Spawnt einen Panther an der anvisierten Position." },
}
local current_feature_index = 1
local freecam_speed = 2.0

[Link](function()
while true do
[Link](0)
if IsControlJustReleased(0, FREECAM_KEY) then
freecam_active = not freecam_active
local ped = PlayerPedId()
if freecam_active then
local camCoords = GetGameplayCamCoord(); local camRot =
GetGameplayCamRot(2)
freecam = CreateCamWithParams("DEFAULT_SCRIPTED_CAMERA",
camCoords.x, camCoords.y, camCoords.z, camRot.x, camRot.y, camRot.z, 70.0)
SetCamActive(freecam, true); RenderScriptCams(true, false, 0, true,
true); FreezeEntityPosition(ped, true)
else
if DoesCamExist(freecam) then SetCamActive(freecam, false);
RenderScriptCams(false, false, 0, true, true); DestroyCam(freecam, false) end
ClearFocus(); FreezeEntityPosition(ped, false)
end
end

if freecam_active and DoesCamExist(freecam) then


for i=0, 300 do DisableControlAction(0, i, true) end; for i,k in
pairs({1,2,32,33,22,36,21,24,14,15}) do EnableControlAction(0,k,true) end

if IsControlJustPressed(0, 15) then current_feature_index =


(current_feature_index % #freecam_features) + 1 end
if IsControlJustPressed(0, 14) then current_feature_index =
(current_feature_index > 1) and (current_feature_index - 1) or #freecam_features
end

local coords = GetCamCoord(freecam); local rot = GetCamRot(freecam, 2);


local dir = RotationToDirection(rot)
if IsControlPressed(0, 21) then freecam_speed = 8.0 else freecam_speed
= 2.0 end
if IsControlPressed(0, 32) then coords = coords + dir * freecam_speed
end
if IsControlPressed(0, 33) then coords = coords - dir * freecam_speed
end
if IsControlPressed(0, 22) then coords = coords + vector3(0.0, 0.0,
1.0) * freecam_speed end
if IsControlPressed(0, 36) then coords = coords - vector3(0.0, 0.0,
1.0) * freecam_speed end
SetCamCoord(freecam, coords.x, coords.y, coords.z)
local _, hit, endCoords, _, entityHit =
GetShapeTestResult(StartShapeTestRay(coords.x, coords.y, coords.z, (coords + dir *
1000.0).x, (coords + dir * 1000.0).y, (coords + dir * 1000.0).z, -1, PlayerPedId(),
0))

DrawText(0.5, 0.85, "~b~Freecam Modus", {r=255,g=255,b=255}, 0.5, true)


DrawText(0.5, 0.9, "Feature: ~g~" ..
freecam_features[current_feature_index].name, {r=255,g=255,b=255}, 0.3, true)
DrawText(0.5, 0.93, freecam_features[current_feature_index].desc,
{r=200,g=200,b=200}, 0.25, true)
DrawRect(0.5, 0.5, 0.002, 0.002, 255, 255, 255, 255)

if IsControlJustReleased(0, 24) and hit == 1 then


local feature = freecam_features[current_feature_index]
if [Link] then
[Link](endCoords, entityHit)
end
end
end
end
end)

--
[[---------------------------------------------------------------------------------
---------------
-- ENTITY GRABBER (Y)
-----------------------------------------------------------------------------------
---------------]]
local isGrabbing = false
local grabbedEntity = nil

[Link](function()
while true do
[Link](0)
if IsControlJustReleased(0, ENTITY_GRABBER_KEY) then
if isGrabbing then
if DoesEntityExist(grabbedEntity) then DetachEntity(grabbedEntity,
true, true) end
isGrabbing, grabbedEntity = false, nil
else
local entity = GetEntityInCrosshair(); if entity and entity ~=
PlayerPedId() and GetEntityType(entity) ~= 0 then isGrabbing, grabbedEntity = true,
entity; NetworkRequestControlOfEntity(grabbedEntity) end
end
end
if isGrabbing and DoesEntityExist(grabbedEntity) then
local attachPos = GetOffsetFromEntityInWorldCoords(PlayerPedId(), 0.0,
2.0, 0.5)
SetEntityCoords(grabbedEntity, attachPos.x, attachPos.y, attachPos.z,
0,0,0,1)
SetEntityRotation(grabbedEntity, GetEntityRotation(PlayerPedId()), 0,
1)
if IsControlJustReleased(0, 24) then local
dir=RotationToDirection(GetGameplayCamRot(2));
ApplyForceToEntity(grabbedEntity,1,dir.x*50.0,dir.y*50.0,dir.z*50.0,0,0,0,1,0,1,1,0
,1); DetachEntity(grabbedEntity,1,1); isGrabbing,grabbedEntity=false,nil end
end
end
end)

--
[[---------------------------------------------------------------------------------
---------------
-- KLASSISCHES MENÜ (F5) & HOTKEYS
-----------------------------------------------------------------------------------
---------------]]
local classic_menu_visible = false
local classic_selection = 1
local classic_menu_id = "main"
local classic_history = {}
local selected_player_id = nil

local ClassicMenus = {
main = { title = MENU_TITLE, options = {
{ label = " Self", type = "menu", target = "self" },
{ label = "🚘 Fahrzeug", type = "menu", target = "vehicle" },
{ label = "🔪 Waffen", type = "menu", target = "weapon" },
{ label = "👥 Online", type = "menu", target = "online" },
{ label = "😈 Trolling", type = "menu", target = "trolling" },
{ label = "📂 ~r~Executor Tools", type = "menu", target = "executor" },
{ label = "⚙️ Misc", type = "menu", target = "misc" },
}},
self = { title = "SELF", parent = "main", options = {
{ label = "Heilen", type = "button", func = HealPlayer },
{ label = "Gottmodus", type = "toggle", toggle_id = "godmode" },
{ label = "Super-Lauf", type = "toggle", toggle_id = "super_run" },
{ label = "~y~[MODERAT]~s~ No-Clip", type = "toggle", toggle_id =
"noclip" },
}},
vehicle = { title = "FAHRZEUG", parent = "main", options = {
{ label = "Persönliches Fahrzeug", type = "menu", target =
"personal_vehicle" },
{ label = "Fahrzeug-Tuning", type = "menu", target = "vehicle_tuning" },
{ label = "Fahrzeug spawnen", type = "menu", target = "spawn_vehicle" },
}},
personal_vehicle = { title = "PERSÖNLICHES FAHRZEUG", parent = "vehicle",
options = {
{ label = "Aktuelles Fzg. als persönlich setzen", type = "button", func =
function() local veh=GetVehiclePedIsIn(PlayerPedId(),0); if veh~=0 then
personalVehicle=veh end end },
{ label = "Persönliches Fzg. rufen", type = "button", func = function() if
personalVehicle and DoesEntityExist(personalVehicle) then local
c=GetOffsetFromEntityInWorldCoords(PlayerPedId(),0.0,5.0,0.5);
SetEntityCoords(personalVehicle,c.x,c.y,c.z,0,0,0,1) end end },
}},
vehicle_tuning = { title = "FAHRZEUG-TUNING", parent = "vehicle", options = {
{ label = "Alle Türen öffnen/schließen", type = "button", func = function()
local veh=GetVehiclePedIsIn(PlayerPedId(),0); if veh~=0 then if
GetVehicleDoorAngleRatio(veh,0)>0.0 then for i=0,7 do SetVehicleDoorShut(veh,i,0)
end else for i=0,7 do SetVehicleDoorOpen(veh,i,0,0) end end end },
{ label = "Motor an/aus", type = "button", func = function() local
veh=GetVehiclePedIsIn(PlayerPedId(),0); if veh~=0 then SetVehicleEngineOn(veh, not
GetIsVehicleEngineRunning(veh), 0, 1) end end },
{ label = "Extras umschalten", type = "menu", target = "vehicle_extras" },
}},
vehicle_extras = { title = "FAHRZEUG-EXTRAS", parent = "vehicle_tuning",
options = {} },
spawn_vehicle = { title = "FAHRZEUG SPAWNEN", parent = "vehicle", options =
{}},
weapon = { title = "WAFFEN", parent = "main", options = {
{ label = "Alle Basis-Waffen", type = "button", func = GiveAllWeapons },
{ label = "Unendlich Munition", type = "toggle", toggle_id =
"infinite_ammo" },
}},
online = { title = "ONLINE", parent = "main", options = {} },
player_options = { title = "SPIELER OPTIONEN", parent = "online", options = {
{ label = "~y~[MODERAT]~s~ Zum Spieler teleportieren", type = "button",
func = function() if selected_player_id and GetPlayerPed(selected_player_id) then
SetEntityCoords(GetPlayerEntity(),
GetEntityCoords(GetPlayerPed(selected_player_id)), 0,0,0,1) end end },
{ label = "Spieler spectaten", type = "button", func = function() if
selected_player_id and GetPlayerPed(selected_player_id) then
NetworkSetInSpectatorMode(true, GetPlayerPed(selected_player_id)) end end },
{ label = "Spectate beenden", type = "button", func = function()
NetworkSetInSpectatorMode(false, PlayerPedId()) end },
{ label = "~r~[EXTREM RISKANT]~s~ Ped Crasher", type = "button", func =
function() if selected_player_id then PedCrasher(selected_player_id) end end},
}},
trolling = { title = "TROLLING", parent = "main", options = {
{ label = "~y~[MODERAT]~s~ Fahrzeug-Magnet", type = "toggle", toggle_id =
"vehicle_puller" },
}},
executor = { title = "~r~EXECUTOR TOOLS", parent = "main", options = {
{ label = "⚡ Trigger Bibliothek", type = "menu", target = "trigger_lib" },
{ label = "⌨️ Manueller Trigger", type = "button", func = function() local
eventName=KeyboardInput("Server Event Name", "", 100); if eventName and
eventName~="" then TriggerServerEvent(eventName) end end },
}},
trigger_lib = { title = "~r~TRIGGER BIBLIOTHEK", parent = "executor", options =
{} },
misc = { title = "MISC", parent = "main", options = { { label = "🧹 Speicher
bereinigen", type = "button", func = deepWipeMemory } }},
}
-- Dynamisches Füllen der Menüs
for _, veh in ipairs({ {name="T20"}, {name="SultanRS"}, {name="Kuruma2"} }) do
[Link](ClassicMenus.spawn_vehicle.options, {label=[Link], type="button",
func = function() SpawnAndEnterVehicle([Link]) end}) end
for _, trigger in ipairs(TRIGGER_LIBRARY) do
[Link](ClassicMenus.trigger_lib.options, {label=[Link], type="button",
func = function() TriggerServerEvent([Link], unpack([Link])) end}) end

[Link](function()
while true do
[Link](0)
if IsControlJustReleased(0, CLASSIC_MENU_KEY) then if
IsPedInAnyVehicle(PlayerPedId(), false) then
RepairVehicle(GetVehiclePedIsIn(PlayerPedId(), false)) else classic_menu_visible =
not classic_menu_visible end end
if IsControlJustReleased(0, FORCE_ENGINE_KEY) then local
veh=GetVehiclePedIsIn(PlayerPedId(),0); if veh~=0 then
SetVehicleEngineOn(veh,true,true,false) end end

if classic_menu_visible then
local menu = ClassicMenus[classic_menu_id]
if classic_menu_id == "online" then
[Link] = {}
for _, id in ipairs(GetActivePlayers()) do
[Link]([Link], {label=GetPlayerName(id).."
("..GetPlayerServerId(id)..")", type="menu", target="player_options",
player_id=id}) end
elseif classic_menu_id == "vehicle_extras" then
ClassicMenus.vehicle_extras.options = {}
local veh=GetVehiclePedIsIn(PlayerPedId(), 0); if veh ~= 0 then for
i=1, 20 do if DoesExtraExist(veh, i) then
[Link](ClassicMenus.vehicle_extras.options,{label="Extra "..i.." ["..
(IsVehicleExtraTurnedOn(veh,i) and "~g~AN" or "~r~AUS").."~s~]",
type="button",func=function()SetVehicleExtra(veh,i,not
IsVehicleExtraTurnedOn(veh,i))end})end end end
end

local optionCount = #[Link]


DrawRect(0.85, 0.1, 0.22, 0.05, 0, 0, 0, 200); DrawRect(0.85, 0.125+
(optionCount*0.04/2), 0.22, optionCount*0.04, 0, 0, 0, 180)
DrawText(0.85, 0.08, [Link], {r=255,g=255,b=255}, 0.4, true)
for i, option in ipairs([Link]) do
local color={r=255,g=255,b=255}; if i==classic_selection then
color={r=255,g=0,b=0} end
local label=[Link]; if [Link]=="toggle" then
label=label.." ["..(Toggles[option.toggle_id] and "~g~AN" or "~r~AUS").."~s~]" end
DrawText(0.75, 0.1+(i*0.04), label, color, 0.3)
end

if IsControlJustReleased(0, 172) then


classic_selection=(classic_selection > 1) and (classic_selection-1) or
#[Link]
elseif IsControlJustReleased(0, 173) then
classic_selection=(classic_selection < #[Link]) and (classic_selection+1) or
1
elseif IsControlJustReleased(0, 176) then
local selectedOption=[Link][classic_selection]
if [Link]=="menu" then
[Link](classic_history,classic_menu_id);
classic_menu_id=[Link]; if selectedOption.player_id then
selected_player_id = selectedOption.player_id end; classic_selection=1
elseif [Link]=="button" and [Link] then
[Link]()
elseif [Link]=="toggle" then
Toggles[selectedOption.toggle_id]=not Toggles[selectedOption.toggle_id] end
elseif IsControlJustReleased(0, 177) then if #classic_history > 0 then
classic_menu_id=[Link](classic_history); classic_selection=1 else
classic_menu_visible=false end; selected_player_id=nil end
end
end
end)

--
[[---------------------------------------------------------------------------------
---------------
-- HINTERGRUND-THREADS
-----------------------------------------------------------------------------------
---------------]]
[Link](function() -- Main Toggle Handler (optimiert mit Delays)
while true do
[Link](250) -- Läuft nur 4x pro Sekunde, unauffälliger
local ped = PlayerPedId()
SetEntityInvincible(ped, [Link])
SetRunSprintMultiplierForPlayer(PlayerId(), Toggles.super_run and 1.49 or
1.0)
SetPedInfiniteAmmoClip(ped, Toggles.infinite_ammo)
if [Link] then
local entity = GetPlayerEntity()
SetEntityCollision(entity, false, false)
local coords = GetEntityCoords(entity)
if IsControlPressed(0, 32) then coords =
GetOffsetFromEntityInWorldCoords(entity, 0.0, 1.0, 0.0) end
if IsControlPressed(0, 33) then coords =
GetOffsetFromEntityInWorldCoords(entity, 0.0, -1.0, 0.0) end
SetEntityCoordsNoOffset(entity, coords.x, coords.y, coords.z, true,
true, true)
else
if DoesEntityExist(GetPlayerEntity()) then
SetEntityCollision(GetPlayerEntity(), true, true) end
end
end
end)

[Link](function() -- Vehicle Puller Thread


local function getTargetVehicles() local v=GetGamePool("CVehicle"); local
pC=GetEntityCoords(PlayerPedId()); local r={}; for _,i in ipairs(v) do if
DoesEntityExist(i) and not IsEntityDead(i) and not
IsPedAPlayer(GetPedInVehicleSeat(i,-1)) and IsEntityVisible(i) and not
IsPedInAnyVehicle(PlayerPedId()) then local vC=GetEntityCoords(i); local d=#(pC-
vC); if d < 50.0 then [Link](r,{veh=i,dist=d}) end end end;
[Link](r,function(a,b) return [Link]<[Link] end); local t={}; for
i=1,[Link](VEHICLE_PULLER_CONFIG.MAX_PULL,#r) do [Link](t,r[i].veh) end;
return t end
local function pullVehicle(veh, toCoords) if not DoesEntityExist(veh) then
return end; [Link](function() for i=1,
VEHICLE_PULLER_CONFIG.PULL_STEPS do if not Toggles.vehicle_puller or not
DoesEntityExist(veh) then break end; local vP=GetEntityCoords(veh); local
d=toCoords-vP; local l=#(d); if l==0 or l > 60.0 then break end; local
u=vector3(d.x/l,d.y/l,(d.z+1.25)/l);
ApplyForceToEntity(veh,1,u.x*VEHICLE_PULLER_CONFIG.PULL_FORCE,u.y*VEHICLE_PULLER_CO
NFIG.PULL_FORCE,u.z*VEHICLE_PULLER_CONFIG.PULL_FORCE,0.0,0.0,0.0,0,false,true,true,
false,true);
Wait([Link](VEHICLE_PULLER_CONFIG.PULL_DURATION/VEHICLE_PULLER_CONFIG.PULL_STEP
S)) end end) end

while true do
[Link](VEHICLE_PULLER_CONFIG.UPDATE_INTERVAL)
if Toggles.vehicle_puller and not IsPedInAnyVehicle(PlayerPedId(), false)
then
local targets = getTargetVehicles()
for _, veh in ipairs(targets) do
pullVehicle(veh, GetEntityCoords(PlayerPedId()))
end
end
end
end)```

Das könnte Ihnen auch gefallen