diff --git a/KeramiScriptLib.lua b/KeramiScriptLib.lua index 46a2c59..430a8b8 100644 --- a/KeramiScriptLib.lua +++ b/KeramiScriptLib.lua @@ -64,7 +64,19 @@ function GetTableFromV3Instance(v3int) return tbl end +function DoesTableContainValue(table, value) + for _, v in pairs(table) do + if v == value then return true end + end + return false +end +function GetValueIndexFromTable(table, value) + for i, v in pairs(table) do + if v == value then return i end + end + return nil +end ---- >> ---- ---- >> ---- ---- >> ---- ---- >> ---- MISC FUNCTIONS END ---- >> ---- ---- >> ---- ---- >> ---- ---- >> ---- @@ -424,6 +436,47 @@ function GetClosestPlayerWithRange_Whitelist(range) --variation of getClosestPla end end +function GetClosestPlayerWithRange_Whitelist_DisallowEntities(range, disallowedEntities) --variation of GetClosestPlayerWithRange_Whitelist, that makes entities not returned if they are in the table. + local pedPointers = entities.get_all_peds_as_pointers() + local rangesq = range * range + local ourCoords = getEntityCoords(GetLocalPed()) + local tbl = {} + local closest_player = 0 + for i = 1, #pedPointers do + local tarcoords = entities.get_position(pedPointers[i]) + local vdist = SYSTEM.VDIST2(ourCoords.x, ourCoords.y, ourCoords.z, tarcoords.x, tarcoords.y, tarcoords.z) + if vdist <= rangesq then + local handle = entities.pointer_to_handle(pedPointers[i]) + local playerID = NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(handle) + if not AIM_WHITELIST[playerID] then --this is the whitelist check. + if not DoesTableContainValue(disallowedEntities, handle) then --this is the disallowed entities table check + tbl[#tbl+1] = handle + end + end + end + end + if tbl ~= nil then + local dist = 999999 + for i = 1, #tbl do + if tbl[i] ~= GetLocalPed() then + if PED.IS_PED_A_PLAYER(tbl[i]) then + local tarcoords = getEntityCoords(tbl[i]) + local e = SYSTEM.VDIST2(ourCoords.x, ourCoords.y, ourCoords.z, tarcoords.x, tarcoords.y, tarcoords.z) + if e < dist then + dist = e + closest_player = tbl[i] + end + end + end + end + end + if closest_player ~= 0 then + return closest_player + else + return nil + end +end + function GetClosestNonPlayerPedWithRange(range) local pedPointers = entities.get_all_peds_as_pointers() local rangesq = range * range @@ -459,6 +512,44 @@ function GetClosestNonPlayerPedWithRange(range) end end +function GetClosestNonPlayerPedWithRange_DisallowedEntities(range, disallowedEntities) --modified version of GetClosestNonPlayerPedWithRange that takes a table of disallowed entities (blacklisted peds) + local pedPointers = entities.get_all_peds_as_pointers() + local rangesq = range * range + local ourCoords = getEntityCoords(GetLocalPed()) + local tbl = {} + local closest_ped = 0 + for i = 1, #pedPointers do + local tarcoords = entities.get_position(pedPointers[i]) + local vdist = SYSTEM.VDIST2(ourCoords.x, ourCoords.y, ourCoords.z, tarcoords.x, tarcoords.y, tarcoords.z) + if vdist <= rangesq then + local handle = entities.pointer_to_handle(pedPointers[i]) + if not DoesTableContainValue(disallowedEntities, handle) then + tbl[#tbl+1] = handle + end + end + end + if tbl ~= nil then + local dist = 999999 + for i = 1, #tbl do + if tbl[i] ~= GetLocalPed() then + if not PED.IS_PED_A_PLAYER(tbl[i]) then + local tarcoords = getEntityCoords(tbl[i]) + local e = SYSTEM.VDIST2(ourCoords.x, ourCoords.y, ourCoords.z, tarcoords.x, tarcoords.y, tarcoords.z) + if e < dist then + dist = e + closest_ped = tbl[i] + end + end + end + end + end + if closest_ped ~= 0 then + return closest_ped + else + return nil + end +end + ---- >> ---- ---- >> ---- ---- >> ---- ---- >> ---- POSITION FUNCTIONS START ---- >> ---- ---- >> ---- ---- >> ---- ---- >> ---- ---- >> ---- ---- >> ---- ---- >> ---- ---- >> ---- MODEL FUNCTIONS START ---- >> ---- ---- >> ---- ---- >> ---- ---- >> ---- @@ -1037,6 +1128,20 @@ function CheckLobbyForGodmode() util.toast(godcount .. " people in godmode!") end +local join_ing = false +function CheckLobbyForPlayers() + local buffer = join_ing + join_ing = NETWORK.NETWORK_IS_SESSION_STARTED() + wait(2000) + local playersTable = players.list() + if buffer ~= join_ing then + for i = 1, 100 do + util.toast("Players in session: " .. #playersTable) + util.yield(10) + end + end +end + ---- >> ---- ---- >> ---- ---- >> ---- ---- >> ---- OTHER LOBBY FEATURES END ---- >> ---- ---- >> ---- ---- >> ---- ---- >> ---- ---- >> ---- ---- >> ---- ---- >> ---- ---- >> ---- MISSILE SPEED FEATURES START ---- >> ---- ---- >> ---- ---- >> ---- ---- >> ---- @@ -1139,7 +1244,8 @@ function FastTurnVehicleWithKeys(scale) local vvYaw = v3.getZ(vv) if PAD.IS_CONTROL_PRESSED(0, 63) then --63 || INPUT_VEH_MOVE_LEFT_ONLY || A - if velocity > 0 then --if velocity is greater than 0, we do usual turning logic. + --OLD LOGIC || if velocity > 0 then --if velocity is greater than 0, we do usual turning logic. + if PAD.IS_CONTROL_PRESSED(0, 71) or velocity > -0.1 then local yawAfterPress = vvYaw + scale if yawAfterPress > 180 then -- check for overflow local overFlowNeg = math.abs(vvYaw)*-1 --negative bypass overflow @@ -1149,7 +1255,7 @@ function FastTurnVehicleWithKeys(scale) ENTITY.SET_ENTITY_ROTATION(veh, vvPitch, vvRoll, yawAfterPress, 2, true) end - else --if not, then we do opposite turning logic. + elseif PAD.IS_CONTROL_PRESSED(0, 72) or velocity < -0.1 then --if not, then we do opposite turning logic. local yawAfterPress = vvYaw - scale if yawAfterPress < -180 then -- check for overflow @@ -1165,7 +1271,8 @@ function FastTurnVehicleWithKeys(scale) if PAD.IS_CONTROL_PRESSED(0, 64) then --64 ||INPUT_VEH_MOVE_RIGHT_ONLY || D - if velocity > 0 then --if velocity is greater than 0, we do usual turning logic. + --OLD LOGIC || if velocity > 0 then --if velocity is greater than 0, we do usual turning logic. + if PAD.IS_CONTROL_PRESSED(0, 71) or velocity > -0.1 then local yawAfterPress = vvYaw - scale if yawAfterPress < -180 then -- check for overflow local overFlowNeg = math.abs(vvYaw) --positive bypass overflow @@ -1175,7 +1282,7 @@ function FastTurnVehicleWithKeys(scale) ENTITY.SET_ENTITY_ROTATION(veh, vvPitch, vvRoll, yawAfterPress, 2, true) end - else --if not, then we do opposite turning logic. + elseif PAD.IS_CONTROL_PRESSED(0, 72) or velocity < -0.1 then --if not, then we do opposite turning logic. local yawAfterPress = vvYaw + scale if yawAfterPress > 180 then -- check for overflow diff --git a/V8.lua b/V8.lua new file mode 100644 index 0000000..820ef3b --- /dev/null +++ b/V8.lua @@ -0,0 +1,1869 @@ +--[[Thanks to: + -Ren (for helping me out a ton) + -Jayphen (for helping me a ton with memory) + -Nowiry (hella help, very cool gamer) + -Aaron (helped with the whitelisting feature) + -Lance (steal his player functions setup xD) + -zPrism, for letting me test stuff with him + -ValidLocket, for being a homie + -Chloe, for being really sweet <3 + +]] + +--require("natives-1640181023") +util.require_natives(1640181023) +require("Universal_ped_list") +util.toast("Loaded univesal ped list!") +require("Universal_objects_list") +util.toast("Loaded universal objects list!") +require("KeramiScriptLib") +util.toast("Loaded functions lib!") +require("KeramiScriptLang") +util.toast("Loaded language lib!") + +util.keep_running() + +local scriptName = "KeramisScript V.7.0" + +local menuroot = menu.my_root() +local menuAction = menu.action +local menuToggle = menu.toggle +local menuToggleLoop = menu.toggle_loop +local joaat = util.joaat +local wait = util.yield + +local createPed = PED.CREATE_PED +local getEntityCoords = ENTITY.GET_ENTITY_COORDS +local getPlayerPed = PLAYER.GET_PLAYER_PED +local requestModel = STREAMING.REQUEST_MODEL +local hasModelLoaded = STREAMING.HAS_MODEL_LOADED +local noNeedModel = STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED +local setPedCombatAttr = PED.SET_PED_COMBAT_ATTRIBUTES +local giveWeaponToPed = WEAPON.GIVE_WEAPON_TO_PED + +CCAM = 0 +STP_SPEED_MODIFIER = 0.02 +STP_COORD_HEIGHT = 300 + +local function onStartup() + SE_LocalPed = GetLocalPed() + SE_Notifications = false -- notifications globally + SEisExploInvis = true + SEisExploAudible = true + -------- + util.toast("Ran startup of " .. scriptName) +end + +onStartup() + +----------------------------------------------------------------------------------------------------------------------------------- +----------------------------------------------------------------------------------------------------------------------------------- + +local lobbyFeats = menu.list(menuroot, KER_LANG_TABLE[1], {}, "") + +local expFeats = menu.list(lobbyFeats, KER_LANG_TABLE[2], {}, "") + +menuAction(expFeats, KER_LANG_TABLE[3], {"allsuicide"}, "Makes everyone commit suicide, with an explosion.", function() + EveryoneExplodeSuicides() +end) + +menu.divider(lobbyFeats, KER_LANG_TABLE[4]) + +----------------------------------------------------------------------------------------------------------------- + +Pizzaall = menuAction(lobbyFeats, KER_LANG_TABLE[5], {"plagueall"}, "Blocked by most menus.", function () + menu.show_warning(Pizzaall, 1, KER_LANG_TABLE[6], PizzaCAll) +end) + +local lobbyremove = menu.list(lobbyFeats, KER_LANG_TABLE[7], {}, "") + +menuAction(lobbyremove, KER_LANG_TABLE[8], {"allfdeath"}, "Will probably not work on some/most menus. A 'delayed kick' of sorts.", function () + FreemodeDeathAll() +end) + +TXC_SLOW = false + +menuAction(lobbyremove, KER_LANG_TABLE[9], {"allaiokick", "allaiok"}, "Will probably not work on some menus.", function () + AIOKickAll() +end) + +menuAction(lobbyremove, "Breakup Kick All", {"ker_allbreakup"}, "", function() + for i = 0, 31 do + if i ~= players.user() and NETWORK.NETWORK_IS_PLAYER_CONNECTED(i) then + local name = NETWORK.NETWORK_PLAYER_GET_NAME(i) + menu.trigger_commands("breakup " .. name) + wait() + end + wait() + end +end) + +menuToggle(lobbyremove, KER_LANG_TABLE[10], {}, "", function (on) + TXC_SLOW = on + if SE_Notifications then + util.toast("Better AIO set to " .. tostring(on)) + end +end) + +---------------------------------------------------------------------------- + +local otherFeats = menu.list(lobbyFeats, KER_LANG_TABLE[11], {}, "") +VehTeleportLoadIterations = 20 + +menuAction(otherFeats, KER_LANG_TABLE[12], {"allremovevehgod"}, "Removes everyone's vehicle godmode, making them easier to kill :)", function () + RemoveVehicleGodmodeForAll() +end) + +menuAction(otherFeats, KER_LANG_TABLE[13], {"alltpvehocean"}, "Teleports everyone's vehicles into the ocean.", function() + TeleportEveryonesVehicleToOcean() +end) + +menuAction(otherFeats, KER_LANG_TABLE[14], {"alltpvehmazebank"}, "Teleports everyone's vehicles on top of the Maze Bank tower.", function() + TeleportEveryonesVehicleToMazeBank() +end) + +menu.slider(otherFeats, KER_LANG_TABLE[15], {"vehloaditerations"}, "How many times we teleport to the selected person to load their vehicle in. Keep in mind that every iteration is one-tenth of a second. Default is 20, or 2 seconds.", 1, 100, 20, 1, function(value) + VehTeleportLoadIterations = value +end) + +menuAction(otherFeats, KER_LANG_TABLE[16], {}, "Checks the entire lobby for godmode, and notifies you of their names.", function() + CheckLobbyForGodmode() +end) + + +menuToggleLoop(otherFeats, "Toast Players When Joining", {}, "Toasts number of players when you join a new session.", function () + CheckLobbyForPlayers() +end) + +----------------------------------------------------------------------------------------------------------------------------------- + +--preload + +local mFunFeats = menu.list(menuroot, KER_LANG_TABLE[17], {"wpfeats"}, "") +menu.divider(mFunFeats, KER_LANG_TABLE[18]) + +SE_stickyEntities = {} +SE_stickyCount = 1 +---- +SE_stickyvec3 = {} +SE_stickyvec3count = 1 +---- +menuToggleLoop(mFunFeats, KER_LANG_TABLE[19], {"sbgun"}, "Notes where or what you shot, to explode it later.", function () + local pped = GetLocalPed() --get local ped, assign to "pped" + if PED.IS_PED_SHOOTING(pped) then --check for shooting + local tarEnt = memory.alloc() --allocate memory to get Target Entity + local isEntFound = PLAYER.GET_ENTITY_PLAYER_IS_FREE_AIMING_AT(players.user(), tarEnt) --is the entity found withing our aiming range? + if isEntFound then --if the entity is found, then... + local entt = memory.read_int(tarEnt) --get the entity handle + SE_stickyEntities[SE_stickyCount] = entt --assign it to our table + SE_stickyCount = SE_stickyCount + 1 --make our counter + 1 + if SE_Notifications then + util.toast("Entity marked.") + end + else --if we WEREN't aiming at an entity, then... + local minevec3 = memory.alloc() --allocate memory for target coords + local junk = WEAPON.GET_PED_LAST_WEAPON_IMPACT_COORD(pped, minevec3) --get target coords + local mv3 = memory.read_vector3(minevec3) --get v3 coords + SE_stickyvec3[SE_stickyvec3count] = mv3 --assign to table + SE_stickyvec3count = SE_stickyvec3count + 1 --counter + 1 + memory.free(minevec3) + if SE_Notifications then + util.toast("Coordinate marked.") + end + end + memory.free(tarEnt) + end +end) + +menuAction(mFunFeats, KER_LANG_TABLE[20], {"expsb"}, "Explodes all marked entities and coordinate with one stickybomb.", function () + for i = 1, #SE_stickyEntities do + local targetC = getEntityCoords(SE_stickyEntities[i]) + SE_add_owned_explosion(GetLocalPed(), targetC.x, targetC.y, targetC.z, 2, 10, SEisExploAudible, SEisExploInvis, 0) + end + for i = 1, #SE_stickyvec3 do + local tarc = SE_stickyvec3[i] + SE_add_owned_explosion(GetLocalPed(), tarc.x, tarc.y, tarc.z, 2, 10, SEisExploAudible, SEisExploInvis, 0) + end + if SE_Notifications then + util.toast("Exploded all stickybombs!") + end +end) + +menuAction(mFunFeats, KER_LANG_TABLE[21], {"clearsb"}, "Clears all stickybombs from this script.", function () + if SE_Notifications then + util.toast("Stickybombs deleted!") + end + SE_stickyEntities = {} + SE_stickyCount = 1 + SE_stickyvec3 = {} + SE_stickyvec3count = 1 +end) + + +---- +menu.divider(mFunFeats, KER_LANG_TABLE[22]) +---- + + +MarkedForExt = {} +MarkedForExtCount = 1 +---- +menuToggleLoop(mFunFeats, KER_LANG_TABLE[23], {}, "", function () + local localPed = GetLocalPed() + if PED.IS_PED_SHOOTING(localPed) then + local point = memory.alloc(4) + local isEntFound = PLAYER.GET_ENTITY_PLAYER_IS_FREE_AIMING_AT(players.user(), point) + if isEntFound then + local entt = memory.read_int(point) + if ENTITY.IS_ENTITY_A_PED(entt) and PED.IS_PED_IN_ANY_VEHICLE(entt) then + local pedVeh = PED.GET_VEHICLE_PED_IS_IN(entt, false) + local maxPassengers = VEHICLE.GET_VEHICLE_MAX_NUMBER_OF_PASSENGERS(pedVeh) - 1 + for i = -1, maxPassengers do + local seatFree = VEHICLE.IS_VEHICLE_SEAT_FREE(pedVeh, i, false) + if not seatFree then + local targetPed = VEHICLE.GET_PED_IN_VEHICLE_SEAT(pedVeh, i, false) + MarkedForExt[MarkedForExtCount] = targetPed + if SE_Notifications then + util.toast("Marked for extinction! Index " .. MarkedForExtCount) + end + MarkedForExtCount = MarkedForExtCount + 1 + end + end + MarkedForExt[MarkedForExtCount] = pedVeh + if SE_Notifications then + util.toast("Marked for extinction! Index " .. MarkedForExtCount) + end + MarkedForExtCount = MarkedForExtCount + 1 + else + MarkedForExt[MarkedForExtCount] = entt + if SE_Notifications then + util.toast("Marked for extinction! Index " .. MarkedForExtCount) + end + MarkedForExtCount = MarkedForExtCount + 1 + end + end + memory.free(point) + end +end) + +menuAction(mFunFeats, KER_LANG_TABLE[24], {}, "", function () + for i = 1, #MarkedForExt, 1 do + entities.delete_by_handle(MarkedForExt[i]) + end + MarkedForExt = {} + MarkedForExtCount = 1 + -- resets the extinction + if SE_Notifications then + util.toast("Deleted! Clearing extinction list...") + end +end) +menuAction(mFunFeats, KER_LANG_TABLE[25], {}, "", function () + MarkedForExt = {} + MarkedForExtCount = 1 +end) + + +---------------------------------------------------------------------------------------------------- + +menu.divider(mFunFeats, KER_LANG_TABLE[26]) + +PROX_Coords = {} +PROX_Count = 1 + +menuToggleLoop(mFunFeats, KER_LANG_TABLE[27], {"proxgun"}, "Only works on coordinates, not entities. For that, use sticky bomb gun.", function () + local localped = GetLocalPed() + if PED.IS_PED_SHOOTING(localped) then --check if we shooting + local pointer = memory.alloc() --allocate memory for coords + local junk = WEAPON.GET_PED_LAST_WEAPON_IMPACT_COORD(localped, pointer) --get pointer to coord + local coord = memory.read_vector3(pointer) --get coord (read from pointer) + if coord.x ~= 0.0 and coord.y ~= 0.0 and coord.z ~= 0.0 then --check for dud (if we didn't register the shot) + PROX_Coords[PROX_Count] = coord --assign coord to table + PROX_Count = PROX_Count + 1 --make the counter go up + if SE_Notifications then + util.toast("Proximity mine placed at " .. coord.x .. " " .. coord.y .. " " .. coord.z) + end + end + memory.free(pointer) --free the memory so we don't bruh moment the script + end +end) + + + +menuToggleLoop(mFunFeats, KER_LANG_TABLE[28], {"enableprox", "proxon"}, "Makes the proximity mines actually check for if entities are by them.", function () + if PROX_Coords ~= nil then + for i = 1, #PROX_Coords do + local pedTable = entities.get_all_peds_as_handles() + for a = 1, #pedTable do + if ENTITY.IS_ENTITY_IN_AREA(pedTable[a], PROX_Coords[i].x + 2, PROX_Coords[i].y + 2, PROX_Coords[i].z, PROX_Coords[i].x - 2, PROX_Coords[i].y - 2, PROX_Coords[i].z + 2, true, true, true) then + SE_add_owned_explosion(GetLocalPed(), PROX_Coords[i].x, PROX_Coords[i].y, PROX_Coords[i].z, 2, 10, true, false, 0.4) + end + end + end + end +end) + +menuAction(mFunFeats, KER_LANG_TABLE[29], {"clearprox"}, "Clears all proximity mines that you've placed.", function () + util.toast("Cleared all " .. #PROX_Coords .. " proximity mines!") + PROX_Coords = {} + PROX_Count = 1 +end) + +---------------------------------------------------------------------------------------------------- +menu.divider(mFunFeats, KER_LANG_TABLE[30]) + +--preload +KA_Radius = 20 +KA_Blame = true +KA_Players = false +KA_Onlyplayers = false +KA_Delvehs = false +KA_Delpeds = false + +menuToggleLoop(mFunFeats, KER_LANG_TABLE[31], {"killaura"}, "Kills peds, optionally players, optionally friends, in a raidus.", function () + local tKCount = 1 + local toKill = {} + local ourcoords = getEntityCoords(GetLocalPed()) + local ourped = GetLocalPed() + local weaponhash = 177293209 -- heavy sniper mk2 hash + -- + local pedPointers = entities.get_all_peds_as_pointers() + for i = 1, #pedPointers do + local v3 = entities.get_position(pedPointers[i]) + local vdist = MISC.GET_DISTANCE_BETWEEN_COORDS(ourcoords.x, ourcoords.y, ourcoords.z, v3.x, v3.y, v3.z, true) + if vdist <= KA_Radius then + toKill[tKCount] = entities.pointer_to_handle(pedPointers[i]) + tKCount = tKCount + 1 + end + end + for i = 1, #toKill do + if (not KA_Onlyplayers and not PED.IS_PED_A_PLAYER(toKill[i])) or (KA_Players) or (KA_Onlyplayers and PED.IS_PED_A_PLAYER(toKill[i])) then + if toKill[i] ~= GetLocalPed() then + if not PED.IS_PED_DEAD_OR_DYING(toKill[i]) then + if PED.IS_PED_IN_ANY_VEHICLE(toKill[i]) then + local veh = PED.GET_VEHICLE_PED_IS_IN(toKill[i], false) + local pedcoords = getEntityCoords(toKill[i]) + if not PED.IS_PED_A_PLAYER(toKill[i]) and KA_Delvehs then + entities.delete_by_handle(veh) + end + if KA_Blame then + MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x, pedcoords.y, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, ourped, false, FastNet, -1, veh, true) + MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x, pedcoords.y, pedcoords.z - 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, ourped, false, FastNet, -1, veh, true) + MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x + 1, pedcoords.y, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, ourped, false, FastNet, -1, veh, true) + MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x - 1, pedcoords.y, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, ourped, false, FastNet, -1, veh, true) + MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x, pedcoords.y + 1, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, ourped, false, FastNet, -1, veh, true) + MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x, pedcoords.y - 1, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, ourped, false, FastNet, -1, veh, true) + else + MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x, pedcoords.y, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, 0, false, false, -1, veh, true) + MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x, pedcoords.y, pedcoords.z - 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, 0, false, false, -1, veh, true) + MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x + 1, pedcoords.y, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, 0, false, false, -1, veh, true) + MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x - 1, pedcoords.y, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, 0, false, false, -1, veh, true) + MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x, pedcoords.y + 1, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, 0, false, false, -1, veh, true) + MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x, pedcoords.y - 1, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, 0, false, false, -1, veh, true) + end + wait(50) + if not PED.IS_PED_A_PLAYER(toKill[i]) and PED.IS_PED_DEAD_OR_DYING(toKill[i]) and KA_Delpeds then + entities.delete_by_handle(toKill[i]) + end + else + local pedcoords = getEntityCoords(toKill[i]) + if KA_Blame then + MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(pedcoords.x, pedcoords.y, pedcoords.z + 2, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, ourped, false, false, -1) + else + MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(pedcoords.x, pedcoords.y, pedcoords.z + 2, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, 0, false, false, -1) + end + wait(50) + if not PED.IS_PED_A_PLAYER(toKill[i]) and PED.IS_PED_DEAD_OR_DYING(toKill[i]) and KA_Delpeds then + entities.delete_by_handle(toKill[i]) + end + end + end + end + end + end + wait(100) +end) + +local killAuraSettings = menu.list(mFunFeats, KER_LANG_TABLE[32], {}, "Settings for the KillAura functionality.") +menu.divider(killAuraSettings, KER_LANG_TABLE[33]) + +menu.slider(killAuraSettings, KER_LANG_TABLE[34], {"karadius"}, "Radius for killaura.", 1, 100, 20, 1, function (value) + KA_Radius = value +end) + +menuToggle(killAuraSettings, KER_LANG_TABLE[35], {"kablame"}, "If toggled off, bullets will not be blamed on you.", function (toggle) + KA_Blame = toggle +end, true) + +menuToggle(killAuraSettings, KER_LANG_TABLE[36], {"kaplayers"}, "If toggled off, will only target peds.", function (toggle) + KA_Players = toggle + if toggle then + if KA_Onlyplayers then + menu.trigger_commands("kaonlyplayers") + end + end +end) + +menuToggle(killAuraSettings, KER_LANG_TABLE[37], {"kaonlyplayers"}, "If toggled on, will target ONLY players.", function (toggle) + KA_Onlyplayers = toggle + if toggle then + if KA_Players then + menu.trigger_commands("kaplayers") + end + end +end) + +menuToggle(killAuraSettings, KER_LANG_TABLE[38], {"kadelvehs"}, "If toggled on, will delete vehicles of non-player peds, which makes them easier to kill.", function (toggle) + KA_Delvehs = toggle +end) + +menuToggle(killAuraSettings, KER_LANG_TABLE[39], {"kasilent"}, "If toggled on, will delete the peds that you have killed.", function (toggle) + KA_Delpeds = toggle +end) + +menuToggleLoop(killAuraSettings, KER_LANG_TABLE[40], {"kasphere"}, "Draws a sphere that shows your killaura range.", function () + local myC = getEntityCoords(GetLocalPed()) + GRAPHICS._DRAW_SPHERE(myC.x, myC.y, myC.z, KA_Radius, 255, 0, 0, 0.3) +end) + +menuToggleLoop(killAuraSettings, KER_LANG_TABLE[41], {"kadrawpeds"}, "If toggled on, will draw the number of peds in the selected radius. Does not need KillAura to be enabled.", function () + local dcount = 1 + local dtable = {} + local ourcoords = getEntityCoords(GetLocalPed()) + -- + local pedPointers = entities.get_all_peds_as_pointers() + for i = 1, #pedPointers do + local v3 = entities.get_position(pedPointers[i]) + local vdist = MISC.GET_DISTANCE_BETWEEN_COORDS(ourcoords.x, ourcoords.y, ourcoords.z, v3.x, v3.y, v3.z, true) + if vdist <= KA_Radius then + dtable[dcount] = entities.pointer_to_handle(pedPointers[i]) + dcount = dcount + 1 + end + end + local cc = {r = 1.0, g = 1.0, b = 1.0, a = 1.0} + directx.draw_text(0.0, 0.11, "Peds in radius of >> " .. KA_Radius .. " << " .. #dtable, ALIGN_TOP_LEFT, 0.5, cc, false) +end) + +menuAction(killAuraSettings, KER_LANG_TABLE[42], {}, "", function () + local hash = joaat("G_M_M_ChiGoon_02") + local coords = getEntityCoords(GetLocalPed()) + requestModel(hash) + while not hasModelLoaded(hash) do wait() end + PED.CREATE_PED(24, hash, coords.x, coords.y, coords.z, 0, true, false) + noNeedModel(hash) +end) + +menuAction(killAuraSettings, KER_LANG_TABLE[43], {}, "After killing a bit too many peds, you can re-populate the map with this neat button. How cool!", function () + MISC.POPULATE_NOW() +end) + +---------------------------------------------------------------------------------------------------- + +menu.divider(mFunFeats, KER_LANG_TABLE[44]) +local pvphelp = menu.list(mFunFeats, KER_LANG_TABLE[45], {"pvphelp"}, "") + +--preload +AIM_Spine2 = false +AIM_Toe0 = false +AIM_Pelvis = false +AIM_Head = false +AIM_RHand = false +---- +AIM_FOV = 1 +AIM_Dist = 300 +AIM_DMG = 30 +---- +LOS_CHECK = true +FOV_CHECK = true +-- +AIM_WHITELIST = {} +AIM_NPCS = false +-- +AIM_LEGITSILENT = true +AIM_HEADVEH = false + +menu.divider(pvphelp, KER_LANG_TABLE[46]) + +menuToggleLoop(pvphelp, KER_LANG_TABLE[47], {"silentaim", "saimbot"}, "A silent aimbot with bone selection.", function () + local ourped = GetLocalPed() + if PED.IS_PED_SHOOTING(ourped) then + local ourc = getEntityCoords(ourped) + -- local entTable = entities.get_all_peds_as_pointers() + -- local inRange = {} + -- local inCount = 1 + -- for i = 1, #entTable do + -- local ed = entities.get_position(entTable[i]) + -- local entdist = DistanceBetweenTwoCoords(ourc, ed) + -- if entdist < AIM_Dist + 1 then + -- local handle = entities.pointer_to_handle(entTable[i]) + -- if handle ~= GetLocalPed() then + -- inRange[inCount] = handle + -- inCount = inCount + 1 + -- end + -- end + -- end + -- (( OLD TARGETTING USED MULTIPLE TARGETS, WITH INRANGE[i] )) + local targetplayer = GetClosestPlayerWithRange_Whitelist(10000) + local weaponHash = 177293209 --heavy sniper mk2 hash + local bulletSpeed = 1000 + --util.toast("Entities in range of // " .. AIM_Dist .. " // :" .. #inRange) + --for i = 1, #inRange do + local coord = getEntityCoords(targetplayer) + if (PED.IS_PED_A_PLAYER(targetplayer) and not AIM_NPCS) or (not PED.IS_PED_A_PLAYER(targetplayer) and AIM_NPCS) then --check if player + if not PED.IS_PED_DEAD_OR_DYING(targetplayer, 1) then --check for dead/dying + if (ENTITY.HAS_ENTITY_CLEAR_LOS_TO_ENTITY(ourped, targetplayer, 17) and LOS_CHECK == true) or (LOS_CHECK == false) then --check if we have line of sight + if (PED.IS_PED_FACING_PED(ourped, targetplayer, AIM_FOV) and FOV_CHECK == true) or (FOV_CHECK == false) then --check for FOV + if not AIM_WHITELIST[NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(targetplayer)] then --check if PID doesn't match the whitelist + if DistanceBetweenTwoCoords(coord, getEntityCoords(ourped)) < 401 and AIM_LEGITSILENT and ENTITY.HAS_ENTITY_CLEAR_LOS_TO_ENTITY(ourped, targetplayer, 17) then --check if they're less than 401 meters away (hitscan), and in LOS + --shooting done here, we have all preloads + local playerID = NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(targetplayer) + local playerName = NETWORK.NETWORK_PLAYER_GET_NAME(playerID) + local pveh = PED.GET_VEHICLE_PED_IS_IN(targetplayer, false) + if SE_Notifications then + util.toast("Targeted: " .. tostring(playerName) .. " with Legit Aim") + end + local forwardOffset = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(ourped, 0, 1, 2) + if AIM_Head then + local bonec = PED.GET_PED_BONE_COORDS(targetplayer, 12844, 0, 0, 0) + MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(forwardOffset.x, forwardOffset.y, forwardOffset.z, bonec.x, bonec.y, bonec.z, AIM_DMG, true, weaponHash, GetLocalPed(), true, false, bulletSpeed, pveh, true) + elseif not AIM_HEAD and AIM_HEADVEH and PED.IS_PED_IN_ANY_VEHICLE(targetplayer, false) then --check for "target head if target in is vehicle" + util.toast("VehChecked " .. tostring(playerName)) + local bonec = PED.GET_PED_BONE_COORDS(targetplayer, 12844, 0, 0, 0) + MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(forwardOffset.x, forwardOffset.y, forwardOffset.z, bonec.x, bonec.y, bonec.z, AIM_DMG, true, weaponHash, GetLocalPed(), true, false, bulletSpeed, pveh, true) + end + if AIM_Spine2 then + --(​Ped ped, int boneId, float offsetX, float offsetY, float offsetZ) + local bonec = PED.GET_PED_BONE_COORDS(targetplayer, 24817, 0, 0, 0) + MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(forwardOffset.x, forwardOffset.y, forwardOffset.z, bonec.x, bonec.y, bonec.z, AIM_DMG, true, weaponHash, GetLocalPed(), true, false, bulletSpeed, pveh, true) + end + if AIM_Pelvis then + local bonec = PED.GET_PED_BONE_COORDS(targetplayer, 11816, 0, 0, 0) + MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(forwardOffset.x, forwardOffset.y, forwardOffset.z, bonec.x, bonec.y, bonec.z, AIM_DMG, true, weaponHash, GetLocalPed(), true, false, bulletSpeed, pveh, true) + end + if AIM_Toe0 then + local bonec = PED.GET_PED_BONE_COORDS(targetplayer, 20781, 0, 0, 0) + MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(forwardOffset.x, forwardOffset.y, forwardOffset.z, bonec.x, bonec.y, bonec.z, AIM_DMG, true, weaponHash, GetLocalPed(), true, false, bulletSpeed, pveh, true) + end + if AIM_RHand then + local bonec = PED.GET_PED_BONE_COORDS(targetplayer, 6286, 0, 0, 0) + MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(forwardOffset.x, forwardOffset.y, forwardOffset.z, bonec.x, bonec.y, bonec.z, AIM_DMG, true, weaponHash, GetLocalPed(), true, false, bulletSpeed, pveh, true) + end + else + --shooting done here, we have all preloads + local playerID = NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(targetplayer) + local playerName = NETWORK.NETWORK_PLAYER_GET_NAME(playerID) + local pveh = PED.GET_VEHICLE_PED_IS_IN(targetplayer, false) + if SE_Notifications then + util.toast("Targeted: " .. tostring(playerName)) + end + local forwardOffset = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(targetplayer, 0, 1, 1) + if AIM_Head then + local bonec = PED.GET_PED_BONE_COORDS(targetplayer, 12844, 0, 0, 0) + MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(forwardOffset.x, forwardOffset.y, forwardOffset.z, bonec.x, bonec.y, bonec.z, AIM_DMG, true, weaponHash, GetLocalPed(), true, false, bulletSpeed, pveh, true) + elseif not AIM_HEAD and AIM_HEADVEH and PED.IS_PED_IN_ANY_VEHICLE(targetplayer, false) then + util.toast("VehChecked " .. tostring(playerName)) + local bonec = PED.GET_PED_BONE_COORDS(targetplayer, 12844, 0, 0, 0) + MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(forwardOffset.x, forwardOffset.y, forwardOffset.z, bonec.x, bonec.y, bonec.z, AIM_DMG, true, weaponHash, GetLocalPed(), true, false, bulletSpeed, pveh, true) + end + if AIM_Spine2 then + --(​Ped ped, int boneId, float offsetX, float offsetY, float offsetZ) + local bonec = PED.GET_PED_BONE_COORDS(targetplayer, 24817, 0, 0, 0) + MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(forwardOffset.x, forwardOffset.y, forwardOffset.z, bonec.x, bonec.y, bonec.z, AIM_DMG, true, weaponHash, GetLocalPed(), true, false, bulletSpeed, pveh, true) + end + if AIM_Pelvis then + local bonec = PED.GET_PED_BONE_COORDS(targetplayer, 11816, 0, 0, 0) + MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(forwardOffset.x, forwardOffset.y, forwardOffset.z, bonec.x, bonec.y, bonec.z, AIM_DMG, true, weaponHash, GetLocalPed(), true, false, bulletSpeed, pveh, true) + end + if AIM_Toe0 then + local bonec = PED.GET_PED_BONE_COORDS(targetplayer, 20781, 0, 0, 0) + MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(forwardOffset.x, forwardOffset.y, forwardOffset.z, bonec.x, bonec.y, bonec.z, AIM_DMG, true, weaponHash, GetLocalPed(), true, false, bulletSpeed, pveh, true) + end + if AIM_RHand then + local bonec = PED.GET_PED_BONE_COORDS(targetplayer, 6286, 0, 0, 0) + MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(forwardOffset.x, forwardOffset.y, forwardOffset.z, bonec.x, bonec.y, bonec.z, AIM_DMG, true, weaponHash, GetLocalPed(), true, false, bulletSpeed, pveh, true) + end + end + end + end + end + end + end + --end + end +end) + +local silentAimSettings = menu.list(pvphelp, KER_LANG_TABLE[48], {}, "") + +menu.slider(silentAimSettings, KER_LANG_TABLE[49], {"silentaimdamage", "silentdamage", "saimdamage"}, "The amount of damage Silent Aimbot does. Not accurate, sadly...", 1, 10000, 30, 10, function(value) + AIM_DMG = value +end) + +menu.slider(silentAimSettings, KER_LANG_TABLE[50], {"silentaimrange", "silentrange", "saimrange"}, "Silent Aimbot Range", 1, 10000, 300, 1, function (value) + AIM_Dist = value +end) + +menu.slider(silentAimSettings, KER_LANG_TABLE[51], {"silentaimfov", "silentfov", "saimfov"}, "The FOV of which players can be targeted. (divided by 10)", 1, 2700, 1, 10, function (value) + AIM_FOV = value / 10 +end) + +menuToggle(silentAimSettings, KER_LANG_TABLE[52], {"silentaimvehicle", "silentvehice", "saveh"}, "Removes line-of-sight checks. Done to make silent aim work for vehicles. Please do note that the FOV is taken FROM THE VEHICLE, NOT FROM WHERE YOU ARE FACING.", function (on) + LOS_CHECK = not on +end) + +menuToggle(silentAimSettings, KER_LANG_TABLE[53], {"silentlegit"}, "If you have Line-of-Sight, attempts to shoot a bullet from you to the player. Doesn't always work if they're moving too fast.", function (on) + AIM_LEGITSILENT = on +end, true) + +menuToggle(silentAimSettings, KER_LANG_TABLE[54], {"silentcheckveh"}, "Will check if the selected player is in a vehicle. If they are in a vehicle, and HEAD isn't selected, will target their head automatically to increase chances of killing.", function (on) + AIM_HEADVEH = on +end) + +menuToggle(silentAimSettings, KER_LANG_TABLE[55], {"silentnpc"}, "Toggle this to ONLY silent aimbot NPCs. Toggle off for ONLY players.", function (on) + AIM_NPCS = on +end) + +menu.divider(silentAimSettings, "-----------------") + +menuToggle(silentAimSettings, KER_LANG_TABLE[56], {"silentaimhead", "silenthead", "saimhead"}, "Makes the aimbot target the head. Probably doesn't look legitimate, but ok.", function(on) + AIM_Head = on +end) + +menuToggle(silentAimSettings, KER_LANG_TABLE[57], {"silentaimspine2", "silentspine2", "saimspine2"}, "Makes the aimbot target the body, also known as spine2.", function(on) + AIM_Spine2 = on +end) + +menuToggle(silentAimSettings, KER_LANG_TABLE[58], {"silentaimpelvis", "silentpelvis", "saimpelvis"}, "Makes the aimbot target the pelvis.", function (on) + AIM_Pelvis = on +end) + +menuToggle(silentAimSettings, KER_LANG_TABLE[59], {"silentaimtoe", "silenttoe", "saimtoe"}, "Makes the aimbot target the toe, otherwise known as toe0", function (on) + AIM_Toe0 = on +end) + +menuToggle(silentAimSettings, KER_LANG_TABLE[60], {"silentaimhand", "silenthand", "saimhand"}, "Makes the aimbot target the hand, otherwise known as R_Hand", function (on) + AIM_RHand = on +end) + +--GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS --for shooting the kneecaps +--https://wiki.gtanet.work/index.php?title=Bones +--IK_Head 12844 +--SKEL_Spine2 24817 +--SKEL_Pelvis 11816 +--SKEL_R_Toe0 20781 +--IK_R_Hand 6286 + +---------------------------------------------------------------------------------------------------- + +menu.divider(pvphelp, KER_LANG_TABLE[61]) +--TYSM NOWIRY AND AARON! + +VEH_MISSILE_SPEED = 10000 + +menuToggleLoop(pvphelp, KER_LANG_TABLE[62], {}, "Makes the heli aim at the closest player. Combine this with 'silent aimbot' for it to look like you're super good :)", function () + local p = GetClosestPlayerWithRange_Whitelist(200) + local localped = GetLocalPed() + local localCoords = getEntityCoords(localped) + if p ~= nil and not PED.IS_PED_DEAD_OR_DYING(p) and ENTITY.HAS_ENTITY_CLEAR_LOS_TO_ENTITY(localped, p, 17) and not AIM_WHITELIST[NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(p)] and (not players.is_in_interior(NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(p))) and (not players.is_godmode(NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(p))) then + if PED.IS_PED_IN_ANY_VEHICLE(localped) then + local veh = PED.GET_VEHICLE_PED_IS_IN(localped, false) + if VEHICLE.GET_VEHICLE_CLASS(veh) == 15 or VEHICLE.GET_VEHICLE_CLASS(veh) == 16 then --vehicle class of heli + --did all prechecks, time to actually face them + local pcoords = PED.GET_PED_BONE_COORDS(p, 24817, 0, 0, 0) + local look = util.v3_look_at(localCoords, pcoords) --x = pitch (vertical), y = roll (fuck no), z = heading (horizontal) + ENTITY.SET_ENTITY_ROTATION(veh, look.x, look.y, look.z, 1, true) + end + end + end +end) + +menuAction(pvphelp, KER_LANG_TABLE[63], {}, "Thank you so much Nowiry for this.", function () + local localped = GetLocalPed() + if PED.IS_PED_IN_ANY_VEHICLE(localped) then + local veh = PED.GET_VEHICLE_PED_IS_IN(localped, false) + if VEHICLE.GET_VEHICLE_CLASS(veh) == 15 or VEHICLE.GET_VEHICLE_CLASS(veh) == 16 then --vehicle class of heli + SetVehicleMissileSpeed(VEH_MISSILE_SPEED) + end + end +end) + +menu.slider(pvphelp, KER_LANG_TABLE[64], {"vehmissilespeed"}, "Sets the speed of your missiles.", 1, 2147483647, 10000, 100, function (value) + VEH_MISSILE_SPEED = value +end) + +---------------------------------------------------------------------------------------------------- + +menu.divider(pvphelp, KER_LANG_TABLE[65]) + +MISL_AIM = false +local missile_settings = { + radius = 300, + speed = 100, + los = true, + cam = false, + ptfx = true, + multitarget = false, + multiped = false +} +local missile_particles = { + name = "exp_grd_rpg_lod", + dictionary = "core" +} + +--Later: block rockets (spawn walls when detecting they are in range) + +ATTACH_CAM_TO_ENTITY_WITH_FIXED_DIRECTION = function (--[[Cam (int)]] cam, --[[Entity (int)]] entity, --[[float]] xRot, --[[float]] yRot, --[[float]] zRot, --[[float]] xOffset, --[[float]] yOffset, --[[float]] zOffset, --[[BOOL (bool)]] isRelative) + native_invoker.begin_call() + native_invoker.push_arg_int(cam) + native_invoker.push_arg_int(entity) + native_invoker.push_arg_float(xRot); native_invoker.push_arg_float(yRot); native_invoker.push_arg_float(zRot) + native_invoker.push_arg_float(xOffset); native_invoker.push_arg_float(yOffset); native_invoker.push_arg_float(zOffset) + native_invoker.push_arg_bool(isRelative) + native_invoker.end_call("202A5ED9CE01D6E7") +end + +--https://github.com/Sainan/gta-v-joaat-hash-db/blob/senpai/out/objects-hex.csv + +Rocket_Hashes = { + {"rpg", util.joaat("w_lr_rpg_rocket")}, + {"oppressor2", util.joaat("w_ex_vehiclemissile_3")}, + {"b11barrage", util.joaat("w_smug_airmissile_01b")}, + {"b11regular", util.joaat("w_battle_airmissile_01")}, + {"grenadelauncher", util.joaat("w_lr_40mm")}, --grenade launcher lmfao + {"teargas", util.joaat("w_ex_grenadesmoke")} --tear gas grenade lmfao +} + +Chosen_Rocket_Hash = Rocket_Hashes[1][2] --default is the regular RPG +MISSILE_ENTITY_TABLE = {} +menu.toggle(pvphelp, KER_LANG_TABLE[66], {"rpgaim"}, "More accurately, rocket aimbot. Will work with the rockets provided in the Rocket Settings list. RPG by default.", function (on) + if on then + MISL_AIM = true + while MISL_AIM do + local localped = GetLocalPed() + local localcoords = getEntityCoords(GetLocalPed()) + local forOffset = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(localped, 0, 5, 0) + RRocket = OBJECT.GET_CLOSEST_OBJECT_OF_TYPE(forOffset.x, forOffset.y, forOffset.z, 10, Chosen_Rocket_Hash, false, true, true, true) + local p + if missile_settings.multitarget then + p = GetClosestPlayerWithRange_Whitelist_DisallowEntities(missile_settings.radius, MISSILE_ENTITY_TABLE) + elseif missile_settings.multiped then + p = GetClosestNonPlayerPedWithRange_DisallowedEntities(missile_settings.radius, MISSILE_ENTITY_TABLE) + elseif not missile_settings.multitarget then + p = GetClosestPlayerWithRange_Whitelist(missile_settings.radius) + end + local ppcoords = getEntityCoords(p) + ---- + if (RRocket ~= 0) and (p ~= nil) and (not PED.IS_PED_DEAD_OR_DYING(p)) and (not AIM_WHITELIST[NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(p)]) and (PED.IS_PED_SHOOTING(localped)) and (not players.is_in_interior(NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(p))) and (ppcoords.z > 1) then + util.create_thread(function () + local plocalized = p + local msl = RRocket + if missile_settings.multitarget then + MISSILE_ENTITY_TABLE[#MISSILE_ENTITY_TABLE+1] = plocalized + end + if (ENTITY.HAS_ENTITY_CLEAR_LOS_TO_ENTITY(localped, plocalized, 17) and missile_settings.los) or not missile_settings.los or MISL_AIR then + if SE_Notifications then + util.toast("Precusors done!") + end + NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(msl) + if not NETWORK.NETWORK_HAS_CONTROL_OF_ENTITY(msl) then + for i = 1, 10 do + NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(msl) + end + else + if SE_Notifications then + util.toast("has control") + end + end + local aircount = 1 + ---- + Missile_Camera = 0 + + --preload the fake rocket and the particle fx + -- > -- Load the particleFX for the fakerocket so it networks to other players + STREAMING.REQUEST_NAMED_PTFX_ASSET(missile_particles.dictionary) + while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(missile_particles.dictionary) do + STREAMING.REQUEST_NAMED_PTFX_ASSET(missile_particles.dictionary) + wait() + end + GRAPHICS.USE_PARTICLE_FX_ASSET(missile_particles.dictionary) + -- > -- we now have loaded our PTFX for our fake rocket. + --GRAPHICS.START_PARTICLE_FX_NON_LOOPED_ON_ENTITY("exp_grd_rpg_lod", msl, 0, 0, 0, 0, 0, 0, 2, false, false, false) + --while the rocket exists, we do this vvvv + while ENTITY.DOES_ENTITY_EXIST(msl) do + if SE_Notifications then + util.toast("rocket exists") + end + local pcoords = PED.GET_PED_BONE_COORDS(plocalized, 20781, 0, 0, 0) + local lc = getEntityCoords(msl) + + local look = util.v3_look_at(lc, pcoords) + local dir = util.rot_to_dir(look) + -- // -- // -- + -- // -- // -- + if missile_settings.ptfx then + STREAMING.REQUEST_NAMED_PTFX_ASSET(missile_particles.dictionary) + while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(missile_particles.dictionary) do + STREAMING.REQUEST_NAMED_PTFX_ASSET(missile_particles.dictionary) + wait() + end + GRAPHICS.USE_PARTICLE_FX_ASSET(missile_particles.dictionary) + -- > -- we now have loaded our PTFX for our fake rocket. + --(​const char* effectName, float xPos, float yPos, float zPos, float xRot, float yRot, float zRot, float scale, BOOL xAxis, BOOL yAxis, BOOL zAxis, BOOL p11) + GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(missile_particles.name, lc.x, lc.y, lc.z, 0, 0, 0, 0.4, false, false, false, true) + end + -- // -- // -- + -- // -- // -- + --airstrike air + if aircount < 2 and MISL_AIR then + ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(msl, 1, 0, 0, 99990000, true, false, true, true) + aircount = aircount + 1 + wait(1100) + end + local lookCountD = 0 + if MISL_AIR then + if missile_settings.cam then + if not CAM.DOES_CAM_EXIST(Missile_Camera) then + if SE_Notifications then + util.toast("camera setup") + end + CAM.DESTROY_ALL_CAMS(true) + Missile_Camera = CAM.CREATE_CAM("DEFAULT_SCRIPTED_CAMERA", true) + --ATTACH_CAM_TO_ENTITY_WITH_FIXED_DIRECTION(Missile_Camera, msl, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1) + CAM.SET_CAM_ACTIVE(Missile_Camera, true) + CAM.RENDER_SCRIPT_CAMS(true, false, 0, true, true, 0) + end + end + local distx = math.abs(lc.x - pcoords.x) + local disty = math.abs(lc.y - pcoords.y) + local distz = math.abs(lc.z - pcoords.z) + if missile_settings.cam then + local ddisst = SYSTEM.VDIST(pcoords.x, pcoords.y, pcoords.z, lc.x, lc.y, lc.z) + if ddisst > 50 then + local look2 = util.v3_look_at(CAM.GET_CAM_COORD(Missile_Camera), lc) + --local backoffset = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(p, 0, -30, 10) + local backoffset = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(msl, 10, 10, -2) + CAM.SET_CAM_COORD(Missile_Camera, backoffset.x, backoffset.y, backoffset.z) + if lookCountD < 1 then + CAM.SET_CAM_ROT(Missile_Camera, look2.x, look2.y, look2.z, 2) + lookCountD = lookCountD + 1 + end + else + local look2 = util.v3_look_at(CAM.GET_CAM_COORD(Missile_Camera), pcoords) + CAM.SET_CAM_ROT(Missile_Camera, look2.x, look2.y, look2.z, 2) + end + end + --CAM.SET_CAM_PARAMS(Missile_Camera, lc.x, lc.y, lc.z + 1, look.x, look.y, look.z, 100, 0, 0, 0, 0) --(​Cam cam, float posX, float posY, float posZ, float rotX, float rotY, float rotZ, float fieldOfView, Any p8, int p9, int p10, int p11) + ENTITY.SET_ENTITY_ROTATION(msl, look.x, look.y, look.z, 2, true) + ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(msl, 1, dir.x * missile_settings.speed * distx, dir.y * missile_settings.speed * disty, dir.z * missile_settings.speed * distz, true, false, true, true) + wait() + else + -- vanilla "aimbot" + ENTITY.SET_ENTITY_ROTATION(msl, look.x, look.y, look.z, 2, true) + ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(msl, 1, dir.x * missile_settings.speed, dir.y * missile_settings.speed, dir.z * missile_settings.speed, true, false, true, true) + wait() + end + end + + --rocket has stopped existing + if missile_settings.cam then + wait(2000) + if SE_Notifications then + util.toast("cam remove") + end + CAM.RENDER_SCRIPT_CAMS(false, false, 0, true, true, 0) + if CAM.IS_CAM_ACTIVE(Missile_Camera) then + CAM.SET_CAM_ACTIVE(Missile_Camera, false) + end + CAM.DESTROY_CAM(Missile_Camera, true) + end + end + --improve this logic lmfao + if missile_settings.multitarget then + table.remove(MISSILE_ENTITY_TABLE, GetValueIndexFromTable(MISSILE_ENTITY_TABLE, plocalized)) + util.toast("Removed value " .. tostring(plocalized) .. " at index " .. tostring(GetValueIndexFromTable(MISSILE_ENTITY_TABLE, p))) + end + end) + end + wait() + end + else + MISL_AIM = false + end +end) + +MISL_AIR = false + +local rpgrockets = menu.list(pvphelp, "Rocket Settings", {}, "") + +local function generateRockets() +for i = 1, #Rocket_Hashes do + menu.action(rpgrockets, "Rocket " .. Rocket_Hashes[i][1], {"rocket " .. Rocket_Hashes[i][1]}, "", function () + Chosen_Rocket_Hash = Rocket_Hashes[i][2] + util.toast("Set chosen rocket to " .. Rocket_Hashes[i][1] .. " || " .. Rocket_Hashes[i][2]) + end) +end +end +generateRockets() + +local rpgsettings = menu.list(pvphelp, KER_LANG_TABLE[67], {"rpgsettings"}, "") + +menu.toggle(rpgsettings, KER_LANG_TABLE[68], {"rpgjavelin"}, "Makes the rocket go very up high and kill the closest player to you :) | Advised: Combine 'RPG LOS Remove' for you to fire at targets that you do not see.", function (on) + if on then + MISL_AIR = true + else + MISL_AIR = false + end +end) + +menu.slider(rpgsettings, KER_LANG_TABLE[69], {"msl_frc_rad"}, "Range for missile aimbot, e.g. how far the person can be away.", 1, 10000, 300, 10, function (value) + missile_settings.radius = value +end) + +menu.slider(rpgsettings, KER_LANG_TABLE[70], {"msl_spd_mult"}, "Multiplier for speed. Default is 100, it's good.", 1, 10000, 100, 10, function (value) + missile_settings.speed = value +end) + +menuToggle(rpgsettings, KER_LANG_TABLE[71], {}, "Removes line-of-sight checks. Do not turn this on unless you know what you're doing.", function (on) + missile_settings.los = not on +end) + +menuToggle(rpgsettings, KER_LANG_TABLE[72], {"rpgcamera"}, "Now with a dashcam, you can finally find out where the fuck your rocket goes if you're using javelin mode.", function (on) + missile_settings.cam = on +end) + +menuToggle(rpgsettings, "Enable PTFX", {}, "Enables particle effects for missiles, to make them look more legit. Enabled by default.", function (toggle) + missile_settings.ptfx = toggle +end, true) + +menuToggle(rpgsettings, "Multi-Target", {}, "Will make missiles target different entities. If a missile is already heading to one entity, other missiles will head to others. Useful for multiple people.", function (toggle) + missile_settings.multitarget = toggle +end) + +menuToggle(rpgsettings, "Target Peds (MULTI-TARGET)", {}, "Will target peds instead of players. Multi target is enabled on this one, because no use if it isn't.", function (toggle) + missile_settings.multiped = toggle +end) + +menu.divider(rpgsettings, "------- PTFX (ADVANCED) -------") + +menu.text_input(rpgsettings, "PTFX Name", {"rpgptfx"}, "Particle effects name. ADVANCED USERS ONLY.", function (text) + missile_particles.name = text +end, "exp_grd_rpg_lod") + +menu.text_input(rpgsettings, "PTFX Dictionary", {"rpgdictionary"}, "Particle effect dictionary to use PTFX. ADVANCED ONLY!!", function (text) + missile_particles.dictionary = text +end, "core") + +---------------------------------------------------------------------------------------------------- + +menu.divider(pvphelp, KER_LANG_TABLE[73]) + +--preload +ORB_Sneaky = false + +menuAction(pvphelp, KER_LANG_TABLE[74], {"orbway", "orbwp"}, "Orbital Cannons your selected Waypoint.", function () + local wpos = Get_Waypoint_Pos2() + if SE_Notifications then + util.toast("Selected Waypoint Coordinates: " .. wpos.x .. " " .. wpos.y .. " " .. wpos.z) + end + if ORB_Sneaky then + for a = 1, 30 do + SE_add_explosion(wpos.x, wpos.y, wpos.z + 30 - a, 29, 10, true, false, 1, false) + SE_add_explosion(wpos.x, wpos.y, wpos.z + 30 - a, 59, 10, true, false, 1, false) + wait(30) + end + else + for i = 1, 30 do + SE_add_owned_explosion(GetLocalPed(), wpos.x, wpos.y, wpos.z + 30 - i, 29, 10, true, false, 1) + SE_add_owned_explosion(GetLocalPed(), wpos.x, wpos.y, wpos.z + 30 - i, 59, 10, true, false, 1) + wait(30) + end + end +end) + +menuToggle(pvphelp, KER_LANG_TABLE[75], {}, "Makes the orbital not blamed on you.", function (on) + ORB_Sneaky = on +end) + +---------------------------------------------------------------------------------------------------- + +menu.divider(pvphelp, KER_LANG_TABLE[76]) + +--preload +CAR_S_sneaky = false +CAR_S_BLACKLIST = {} + +menuToggleLoop(pvphelp, KER_LANG_TABLE[77], {"carexplode"}, "Automatically explodes your car when you are next to a player.", function() + local ourped = GetLocalPed() + if PED.IS_PED_IN_ANY_VEHICLE(ourped, false) then + local pedTable = entities.get_all_peds_as_pointers() + local ourCoords = getEntityCoords(ourped) + for i = 1, #pedTable do + local handle = entities.pointer_to_handle(pedTable[i]) + if PED.IS_PED_A_PLAYER(handle) then + local playerID = NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(handle) + local v3 = entities.get_position(pedTable[i]) + local dist = DistanceBetweenTwoCoords(ourCoords, v3) + if dist < 5 and handle ~= GetLocalPed() and not CAR_S_BLACKLIST[playerID] then + if CAR_S_sneaky then + SE_add_explosion(ourCoords.x, ourCoords.y, ourCoords.z, 2, 10, true, false, 0.1, false) + SE_add_explosion(ourCoords.x - 4, ourCoords.y, ourCoords.z, 2, 20, false, true, 0.1, false) + SE_add_explosion(ourCoords.x + 4, ourCoords.y, ourCoords.z, 2, 20, false, true, 0.1, false) + SE_add_explosion(ourCoords.x, ourCoords.y - 4, ourCoords.z, 2, 20, false, true, 0.1, false) + SE_add_explosion(ourCoords.x, ourCoords.y + 4, ourCoords.z, 2, 20, false, true, 0.1, false) + else + SE_add_owned_explosion(ourped, ourCoords.x, ourCoords.y, ourCoords.z, 2, 10, true, false, 0.1) + SE_add_owned_explosion(ourped, ourCoords.x - 4, ourCoords.y, ourCoords.z, 2, 20, false, true, 0.1) + SE_add_owned_explosion(ourped, ourCoords.x + 4, ourCoords.y, ourCoords.z, 2, 20, false, true, 0.1) + SE_add_owned_explosion(ourped, ourCoords.x, ourCoords.y - 4, ourCoords.z, 2, 20, false, true, 0.1) + SE_add_owned_explosion(ourped, ourCoords.x, ourCoords.y + 4, ourCoords.z, 2, 20, false, true, 0.1) + end + end + end + end + end +end) + +menuToggle(pvphelp, KER_LANG_TABLE[78], {"carexplodesneaky"}, "Makes the explosion of the car bomb not blamed on you.", function(on) + CAR_S_sneaky = on +end) + +---------------------------------------------------------------------------------------------------- + +menu.divider(pvphelp, KER_LANG_TABLE[79]) + +LegitRapidFire = false +LegitRapidMS = 100 + +menuToggle(pvphelp, KER_LANG_TABLE[80], {"legitrapidfire"}, "Quickly switches to grenades and back to your weapon after you shot something. Useful with Sniper, RPG, Grenade Launcher.", function(on) + local localped = GetLocalPed() + if on then + LegitRapidFire = true + util.create_thread(function () + while LegitRapidFire do + if PED.IS_PED_SHOOTING(localped) then + local currentWpMem = memory.alloc() + local junk = WEAPON.GET_CURRENT_PED_WEAPON(localped, currentWpMem, 1) + local currentWP = memory.read_int(currentWpMem) + memory.free(currentWpMem) + WEAPON.SET_CURRENT_PED_WEAPON(localped, 2481070269, true) --2481070269 is grenade + wait(LegitRapidMS) + WEAPON.SET_CURRENT_PED_WEAPON(localped, currentWP, true) + end + wait() + end + util.stop_thread() + end) + else + LegitRapidFire = false + end +end) + +menu.slider(pvphelp, KER_LANG_TABLE[81], {"legitrapiddelay"}, "The delay that it takes to switch to grenade and back to the weapon.", 1, 1000, 100, 50, function (value) + LegitRapidMS = value +end) + +----------------------------------------------------------------------------------------------------------------------------------- + +local toolFeats = menu.list(menuroot, KER_LANG_TABLE[82], {}, "") + +menu.divider(toolFeats, KER_LANG_TABLE[83]) + +FRAME_STP = false + +menuAction(toolFeats, KER_LANG_TABLE[84], {"stp"}, "Teleports you to your waypoint with the camera being smooth.", function () + SmoothTeleportToCord(Get_Waypoint_Pos2(), FRAME_STP) +end) + +menuToggle(toolFeats, KER_LANG_TABLE[85], {"stpv2"}, "Makes you or your vehicle teleport along with the camera for a 'smoother' teleport.", function(toggle) + FRAME_STP = toggle +end) + +menuAction(toolFeats, KER_LANG_TABLE[86], {"resetstp"}, "Rendering of script cams to false, along with destroying the current cam. For if you teleport into the ocean, and the camera DIES.", function () + local renderingCam = CAM.GET_RENDERING_CAM() + CAM.RENDER_SCRIPT_CAMS(false, false, 0, true, true, 0) + CAM.DESTROY_CAM(renderingCam, true) +end) + +local stpsettings = menu.list(toolFeats, KER_LANG_TABLE[87], {}, "") + +menu.slider(stpsettings, KER_LANG_TABLE[88], {"stpspeed"}, "Speed Modifider for smooth-tp, multiplicative. This will divide by 10, as sliders cannot take non-integers", 1, 100, 10, 1, function(value) + local multiply = value / 10 + if SE_Notifications then + util.toast("SmoothTP Speed Multiplier set to " .. tostring(multiply) .. "!") + end + STP_SPEED_MODIFIER = 0.02 --set it again so it doesnt multiply over and over. This took too long to figure out.... + STP_SPEED_MODIFIER = STP_SPEED_MODIFIER * multiply +end) + +menu.slider(stpsettings, KER_LANG_TABLE[89], {"stpheight"}, "Set the height for the camera when it's doing the transition.", 0, 10000, 300, 10, function (value) + local height = value + if SE_Notifications then + util.toast("SmoothTP Height set to " .. tostring(height) .. "!") + end + STP_COORD_HEIGHT = height +end) + +menu.divider(toolFeats, "-=-=-=-=-=-=-=-=-") + +-- + +--preload +DR_TXT_SCALE = 0.5 + + +menuToggleLoop(toolFeats, KER_LANG_TABLE[90], {"drawpos"}, "", function () + local pos = getEntityCoords(GetLocalPed()) + local cc = {r = 1.0, g = 1.0, b = 1.0, a = 1.0} + directx.draw_text(0.0, 0.0, "x: " .. pos.x .. " // y: " .. pos.y .. " // z: " .. pos.z, ALIGN_TOP_LEFT, DR_TXT_SCALE, cc, false) +end) + +--preload +EP_drawveh = true +EP_drawped = true +EP_drawobj = true +EP_drawpick = true +---- +EPS_vehx = 0.0 +EPS_vehy = 0.03 +-- +EPS_pedx = 0.0 +EPS_pedy = 0.05 +-- +EPS_objx = 0.0 +EPS_objy = 0.07 +-- +EPS_pickx = 0.0 +EPS_picky = 0.09 +-- + +menuToggleLoop(toolFeats, KER_LANG_TABLE[91], {"drawentpool"}, "", function () + local cc = {r = 1.0, g = 1.0, b = 1.0, a = 1.0} + if EP_drawveh then + local vehpool = entities.get_all_vehicles_as_pointers() + directx.draw_text(EPS_vehx, EPS_vehy, KER_LANG_TABLE[92] .. #vehpool, ALIGN_TOP_LEFT, DR_TXT_SCALE, cc, false) + end + if EP_drawped then + local pedpool = entities.get_all_peds_as_pointers() + directx.draw_text(EPS_pedx, EPS_pedy, KER_LANG_TABLE[93] .. #pedpool, ALIGN_TOP_LEFT, DR_TXT_SCALE, cc, false) + end + if EP_drawobj then + local objpool = entities.get_all_objects_as_pointers() + directx.draw_text(EPS_objx, EPS_objy, KER_LANG_TABLE[94] .. #objpool, ALIGN_TOP_LEFT, DR_TXT_SCALE, cc, false) + end + if EP_drawpick then + local pickpool = entities.get_all_pickups_as_pointers() + directx.draw_text(EPS_pickx, EPS_picky, KER_LANG_TABLE[95] .. #pickpool, ALIGN_TOP_LEFT, DR_TXT_SCALE, cc, false) + end +end) + +local ePS = menu.list(toolFeats, KER_LANG_TABLE[96], {}, "") +menuToggle(ePS, KER_LANG_TABLE[97], {}, "", function (toggle) + EP_drawveh = toggle +end, true) +menu.slider(ePS, KER_LANG_TABLE[98], {"epvehposx"}, "/100", 0, 100, 0, 1, function (value) + EPS_vehx = value / 100 +end) +menu.slider(ePS, KER_LANG_TABLE[99], {"epvehposy"}, "/100", 0, 100, 3, 1, function (value) + EPS_vehy = value / 100 +end) +menuToggle(ePS, KER_LANG_TABLE[100], {}, "", function (toggle) + EP_drawped = toggle +end, true) +menu.slider(ePS, KER_LANG_TABLE[101], {"eppedposx"}, "/100", 0, 100, 0, 1, function (value) + EPS_pedx = value / 100 +end) +menu.slider(ePS, KER_LANG_TABLE[102], {"eppedposy"}, "/100", 0, 100, 5, 1, function (value) + EPS_pedy = value / 100 +end) +menuToggle(ePS, KER_LANG_TABLE[103], {}, "", function (toggle) + EP_drawobj = toggle +end, true) +menu.slider(ePS, KER_LANG_TABLE[104], {"epobjposx"}, "/100", 0, 100, 0, 1, function (value) + EPS_objx = value / 100 +end) +menu.slider(ePS, KER_LANG_TABLE[105], {"epobjposy"}, "/100", 0, 100, 7, 1, function (value) + EPS_objy = value / 100 +end) +menuToggle(ePS, KER_LANG_TABLE[106], {}, "", function (toggle) + EP_drawpick = toggle +end, true) +menu.slider(ePS, KER_LANG_TABLE[107], {"epickjposx"}, "/100", 0, 100, 0, 1, function (value) + EPS_pickx = value / 100 +end) +menu.slider(ePS, KER_LANG_TABLE[108], {"epickjposy"}, "/100", 0, 100, 9, 1, function (value) + EPS_picky = value / 100 +end) + +menu.divider(toolFeats, KER_LANG_TABLE[109]) +menu.slider(toolFeats, KER_LANG_TABLE[110], {"drscale"}, "Sets the scale of the text to the value you assign, divided by 10. This is because it only takes integer values.", 1, 50, 5, 1, function (value) + DR_TXT_SCALE = value / 10 +end) + +menu.divider(toolFeats, KER_LANG_TABLE[111]) + +---- +YOINK_PEDS = false +YOINK_VEHICLES = false +YOINK_OBJECTS = false +YOINK_PICKUPS = false + +YOINK_RANGE = 500 + +Yoinkshit = false + +menuToggle(toolFeats, KER_LANG_TABLE[112], {}, "", function (yoink) + if yoink then + Yoinkshit = true + util.create_thread(function() + while Yoinkshit do + local yoinksq = YOINK_RANGE^2 + local localCoord = getEntityCoords(getPlayerPed(players.user())) + local BigTable = {} + if YOINK_PEDS then + local pedTable = entities.get_all_peds_as_pointers() + for i = 1, #pedTable do + local coord = entities.get_position(pedTable[i]) + local distsq = SYSTEM.VDIST2(coord.x, coord.y, coord.z, localCoord.x, localCoord.y, localCoord.z) + local handle = entities.pointer_to_handle(pedTable[i]) + if not PED.IS_PED_A_PLAYER(handle) then + if distsq <= yoinksq then + BigTable[#BigTable+1] = handle + end + end + end + end + wait() + if YOINK_VEHICLES then + local vehTable = entities.get_all_vehicles_as_pointers() + for i = 1, #vehTable do + local coord = entities.get_position(vehTable[i]) + local distsq = SYSTEM.VDIST2(coord.x, coord.y, coord.z, localCoord.x, localCoord.y, localCoord.z) + if distsq <= yoinksq then + BigTable[#BigTable+1] = entities.pointer_to_handle(vehTable[i]) + end + end + end + wait() + if YOINK_OBJECTS then + local objTable = entities.get_all_objects_as_pointers() + for i = 1, #objTable do + local coord = entities.get_position(objTable[i]) + local distsq = SYSTEM.VDIST2(coord.x, coord.y, coord.z, localCoord.x, localCoord.y, localCoord.z) + if distsq <= yoinksq then + BigTable[#BigTable+1] = entities.pointer_to_handle(objTable[i]) + end + end + end + if YOINK_PICKUPS then + local pickTable = entities.get_all_pickups_as_pointers() + for i = 1, #pickTable do + local coord = entities.get_position(pickTable[i]) + local distsq = SYSTEM.VDIST2(coord.x, coord.y, coord.z, localCoord.x, localCoord.y, localCoord.z) + if distsq <= yoinksq then + BigTable[#BigTable+1] = entities.pointer_to_handle(pickTable[i]) + end + end + end + for i = 1, #BigTable do + NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(BigTable[i]) + wait() + end + util.toast("Requested control of all") + ---- + wait() + end + util.stop_thread() + end) + else + Yoinkshit = false + end +end) + +local yoinkSettings = menu.list(toolFeats, KER_LANG_TABLE[113], {}, "") + +menu.slider(yoinkSettings, KER_LANG_TABLE[114], {"yoinkrange"}, "", 1, 5000, 500, 10, function (value) + YOINK_RANGE = value +end) + +menuToggle(yoinkSettings, KER_LANG_TABLE[115], {}, "", function (peds) + YOINK_PEDS = peds +end) + +menuToggle(yoinkSettings, KER_LANG_TABLE[116], {}, "", function (vehs) + YOINK_VEHICLES = vehs +end) + +menuToggle(yoinkSettings, KER_LANG_TABLE[117], {}, "", function (objs) + YOINK_OBJECTS = objs +end) + +menuToggle(yoinkSettings, KER_LANG_TABLE[118], {}, "", function (pick) + YOINK_PICKUPS = pick +end) + +-------------------------------------------------------------------------------------------------------------------------- + +local vehicleFeats = menu.list(menuroot, KER_LANG_TABLE[119], {"vehicleFeats"}, "") + +menu.divider(vehicleFeats, KER_LANG_TABLE[120]) + +menuToggleLoop(vehicleFeats, KER_LANG_TABLE[121], {}, "", function() + local veh = PED.GET_VEHICLE_PED_IS_IN(GetLocalPed(), false) + local vv = v3.new(ENTITY.GET_ENTITY_ROTATION(veh, 2)) + local velMag = ENTITY.GET_ENTITY_SPEED_VECTOR(veh, true).y + --[[ + x = left/right + y = forward/backward + z = up/down + ]] + local entSpeed = ENTITY.GET_ENTITY_SPEED(veh) + directx.draw_text(0.5, 0.45, "Pitch: " .. v3.getX(vv), 1, 0.7, WhiteText, false) + directx.draw_text(0.5, 0.5, "Roll: " .. v3.getY(vv), 1, 0.7, WhiteText, false) + directx.draw_text(0.5, 0.55, "Yaw: " .. v3.getZ(vv), 1, 0.7, WhiteText, false) + directx.draw_text(0.5, 0.60, "Velocity: " .. tostring(velMag), 1, 0.7, WhiteText, false) + directx.draw_text(0.5, 0.65, "Speed: " .. tostring(entSpeed), 1, 0.7, WhiteText, false) +end) + +menuToggleLoop(vehicleFeats, KER_LANG_TABLE[122], {}, "Vehicle always upside-down. Useful with the mkII.", function () + UpsideDownVehicleRotationWithKeys() + --rotation logic (up-down || PITCH/ROLL) + --[[Notes: + Pitch can be max. 90, min. -90. This means that ROLL will have to account for upside-down behaviour. + We ROLL cuttoff / alternate point will be at 100, for simplicity's sake, but full-upside down, no other values changed is: + -Same pitch + -opposite roll (-180, 180) + -same yaw + ]] +end) + +local fastTurnVehicleScale = 3 + +menuToggleLoop(vehicleFeats, KER_LANG_TABLE[123], {}, "Turn your vehicle with A/D keys, fast.", function () + FastTurnVehicleWithKeys(fastTurnVehicleScale) +end) + +menu.slider(vehicleFeats, KER_LANG_TABLE[124], {"vehfastturn"}, "Set the scale for the custom turn.", 1, 1000, 30, 5, function(value) + fastTurnVehicleScale = value / 10 +end) + +menu.divider(vehicleFeats, KER_LANG_TABLE[125]) + +menuToggleLoop(vehicleFeats, KER_LANG_TABLE[126], {"unlockvehshot"}, "Unlocks a vehicle that you shoot. This will work on locked player cars.", function () + UnlockVehicleShoot() +end) + +menuToggleLoop(vehicleFeats, KER_LANG_TABLE[127], {"unlockvehget"}, "Unlocks a vehicle that you try to get into. This will work on locked player cars.", function () + UnlockVehicleGetIn() +end) + +menuToggleLoop(vehicleFeats, KER_LANG_TABLE[128], {"turnvehonget"}, "Turns the car engine on instantly when you get into it, so you don't have to wait.", function () + TurnCarOnInstantly() +end) + +menu.divider(vehicleFeats, KER_LANG_TABLE[129]) + +menuToggleLoop(vehicleFeats, KER_LANG_TABLE[130], {"autoperf"}, "Executes the command 'perf' upon you getting into a vehicle.", function () + local localped = GetLocalPed() + if PED.IS_PED_GETTING_INTO_A_VEHICLE(localped) then + menu.trigger_commands("perf") + end +end) + +menuToggleLoop(vehicleFeats, KER_LANG_TABLE[131], {"autotune"}, "Executes the command 'tune' upon you getting into a vehicle.", function() + local localped = GetLocalPed() + if PED.IS_PED_GETTING_INTO_A_VEHICLE(localped) then + menu.trigger_commands("tune") + end +end) + +menu.divider(vehicleFeats, KER_LANG_TABLE[132]) + +--preload +SuperVehMultiply = 1.2 + +BetterSuperDrive = false +menuToggle(vehicleFeats, KER_LANG_TABLE[133], {"vehmultiply"}, "Velocity multiplier for when you are in a vehicle.", function (superd) + if superd then + local localped = GetLocalPed() + BetterSuperDrive = true + util.create_thread(function() + while BetterSuperDrive do + if PED.IS_PED_IN_ANY_VEHICLE(localped, false) then + --if PAD.IS_CONTROL_PRESSED(0, 71) then --71 == INPUT_VEH_ACCELERATE + local veh = PED.GET_VEHICLE_PED_IS_IN(localped, false) + local vehVel = ENTITY.GET_ENTITY_VELOCITY(veh) + local newVel = {x = vehVel.x * SuperVehMultiply, y = vehVel.y * SuperVehMultiply, z = vehVel.z * SuperVehMultiply} + ENTITY.SET_ENTITY_VELOCITY(veh, newVel.x, newVel.y, newVel.z) + wait(100) + --end + end + wait() + end + util.stop_thread() + end) + else + BetterSuperDrive = false + end +end) + +menuToggle(vehicleFeats, KER_LANG_TABLE[134], {"vehmultiplyshift"}, "Velocity multiplier for when you are in a vehicle. Already bound to LSHIFT for shift enjoyers.", function (superd) + if superd then + local localped = GetLocalPed() + BetterSuperDrive = true + util.create_thread(function() + while BetterSuperDrive do + if PED.IS_PED_IN_ANY_VEHICLE(localped, false) then + if PAD.IS_CONTROL_PRESSED(0, 21) --[[or PAD.IS_CONTROL_PRESSED(0, 61)]] then --21 == INPUT_SPRINT || 61 == INPUT_VEH_MOVE_UP_ONLY + local veh = PED.GET_VEHICLE_PED_IS_IN(localped, false) + local vehVel = ENTITY.GET_ENTITY_VELOCITY(veh) + local newVel = {x = vehVel.x * SuperVehMultiply, y = vehVel.y * SuperVehMultiply, z = vehVel.z * SuperVehMultiply} + ENTITY.SET_ENTITY_VELOCITY(veh, newVel.x, newVel.y, newVel.z) + wait(100) + end + end + wait() + end + util.stop_thread() + end) + else + BetterSuperDrive = false + end +end) + +menu.slider(vehicleFeats, KER_LANG_TABLE[135], {"vehmultnum"}, "Divide by 100.", 1, 1000, 120, 10, function(val) + SuperVehMultiply = val/100 +end) + +menu.divider(vehicleFeats, "Other Tidbits") + +local upboost = { + multiplier = 1 +} +menuAction(vehicleFeats, "Small Boost Up", {"smallupboost"}, "Does a small little boost up, for jumps :)", function () + local veh = PED.GET_VEHICLE_PED_IS_IN(GetLocalPed(), false) + if veh ~= 0 then + ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(veh, 1, 0, 0, 10 * upboost.multiplier, true, true, true, true) + else + util.toast("Not in a vehicle!") + end +end) + +menu.slider(vehicleFeats, "Up Boost Multiplier", {"smallmultiplier"}, "Multiplier for the \'small boost up\' feature above.", 1, 100, 1, 1, function (slider) + upboost.multiplier = slider +end) + +HAVE_SPAWN_FEATURES_BEEN_GENERATED = false +SPAWN_FROZEN = false +SPAWN_GOD = false +local spawnFeats = menu.list(menuroot, KER_LANG_TABLE[136], {}, "") + +function GenerateSpawnFeatures() + if not HAVE_SPAWN_FEATURES_BEEN_GENERATED then + HAVE_SPAWN_FEATURES_BEEN_GENERATED = true + menu.divider(spawnFeats, "------------------") + + local spawnPeds = menu.list(spawnFeats, KER_LANG_TABLE[137], {}, "") + SPAWNED_PEDS = {} + SPAWNED_PEDS_COUNT = 0 + local timeBeforePeds = util.current_time_millis() + menu.action(spawnPeds, KER_LANG_TABLE[138], {"cleanpeds"}, "Deletes all peds that you have spawned.", function() + if SPAWNED_PEDS_COUNT ~= 0 then + for i = 1, SPAWNED_PEDS_COUNT do + entities.delete_by_handle(SPAWNED_PEDS[i]) + end + SPAWNED_PEDS_COUNT = 0 + SPAWNED_PEDS = {} + else + util.toast("No peds left!") + end + end) + menu.divider(spawnPeds, KER_LANG_TABLE[139]) + for i = 1, #UNIVERSAL_PEDS_LIST do + menu.action(spawnPeds, "Spawn " .. tostring(UNIVERSAL_PEDS_LIST[i]), {"catspawnped " .. tostring(UNIVERSAL_PEDS_LIST[i])}, "", function() + SPAWNED_PEDS_COUNT = SPAWNED_PEDS_COUNT + 1 + SPAWNED_PEDS[SPAWNED_PEDS_COUNT] = SpawnPedOnPlayer(util.joaat(UNIVERSAL_PEDS_LIST[i]), players.user()) + if SPAWN_FROZEN then + ENTITY.FREEZE_ENTITY_POSITION(SPAWNED_PEDS[SPAWNED_PEDS_COUNT], true) + end + if SPAWN_GOD then + ENTITY.SET_ENTITY_INVINCIBLE(SPAWNED_PEDS[SPAWNED_PEDS_COUNT], true) + end + end) + if i % 32 == 0 then + wait() + end + end + local timeAfterPeds = util.current_time_millis() + + util.toast("It took about " .. timeAfterPeds - timeBeforePeds .. " milliseconds to generate ped spawn features!") + ---------------------------------------------------------------------------- + local spawnObjs = menu.list(spawnFeats, KER_LANG_TABLE[140], {}, "") + SPAWNED_OBJS = {} + SPAWNED_OBJ_COUNT = 0 + local timeBeforeObjs = util.current_time_millis() + menu.action(spawnObjs, KER_LANG_TABLE[141], {"cleanobjs"}, "Deletes all objects that you have spawned.", function() + if SPAWNED_OBJ_COUNT ~= 0 then + for i = 1, SPAWNED_OBJ_COUNT do + entities.delete_by_handle(SPAWNED_OBJS[i]) + end + SPAWNED_OBJS = {} + SPAWNED_OBJ_COUNT = 0 + else + util.toast("No objects left!") + end + end) + menu.divider(spawnObjs, KER_LANG_TABLE[142]) + for i = 1, #UNIVERSAL_OBJECTS_LIST do + menu.action(spawnObjs, "Spawn " .. tostring(UNIVERSAL_OBJECTS_LIST[i]), {"catspawnobj " .. tostring(UNIVERSAL_OBJECTS_LIST[i])}, "", function () + SPAWNED_OBJ_COUNT = SPAWNED_OBJ_COUNT + 1 + SPAWNED_OBJS[SPAWNED_OBJ_COUNT] = SpawnObjectOnPlayer(util.joaat(tostring(UNIVERSAL_OBJECTS_LIST[i])), players.user()) + if SPAWN_FROZEN then + ENTITY.FREEZE_ENTITY_POSITION(SPAWNED_OBJS[SPAWNED_OBJ_COUNT], true) + end + if SPAWN_GOD then + ENTITY.SET_ENTITY_INVINCIBLE(SPAWNED_OBJS[SPAWNED_OBJ_COUNT], true) + end + end) + if i % 100 == 0 then + wait() + end + end + local timeAfterObjs = util.current_time_millis() + + util.toast("It took about " .. timeAfterObjs - timeBeforeObjs .. " milliseconds to generate object spawn features!") + + ----- + + menu.toggle(spawnFeats, KER_LANG_TABLE[143], {}, "This will spawn the peds/objects frozen in place.", function(on) + SPAWN_FROZEN = on + end) + menu.toggle(spawnFeats, KER_LANG_TABLE[144], {}, "This will spawn the peds/objects unable to take damage.", function(on) + SPAWN_GOD = on + end) + else + util.toast("Spawn features already have been generated!") + end +end + +menuAction(spawnFeats, KER_LANG_TABLE[145], {}, "Generates the spawn features. This is not done automatically due to it taking time/causing lag.", function() + GenerateSpawnFeatures() +end) + +-------------------------------------------------------------------------------------------------------------------------- + +local helperFeatures = menu.list(menuroot, "Helpers", {}, "") + +menuAction(helperFeatures, "Teleport safe codes", {}, "", function() + local objTable = entities.get_all_objects_as_pointers() + local lookingFor = 367638847 -- || 0x15E9B93F || sf_prop_sf_codes_01a || HEXtoDECIMAL + for i = 1, #objTable do + if entities.get_model_hash(objTable[i]) == lookingFor then + local h = entities.pointer_to_handle(objTable[i]) + local ppos = getEntityCoords(GetLocalPed()) + ENTITY.SET_ENTITY_COORDS(h, ppos.x, ppos.y, ppos.z, false, false, false, false) + break + end + end +end) + +-------------------------------------------------------------------------------------------------------------------------- + +menu.divider(menuroot, KER_LANG_TABLE[146]) + +menuToggle(menuroot, KER_LANG_TABLE[147], {"SE_invis", "seinvis"}, "Toggles whether the explosion will be invisible or not. On = Invisible. // BREAKS THE LONG-LASTING FIRE EFFECT OF THE MOLOTOV", function(on) + SEisExploInvis = on + if SE_Notifications then + util.toast("Explosion invisibility set to " .. tostring(on)) + end +end, true) --last "true" is makes invisibility enabled by default. + +menuToggle(menuroot, KER_LANG_TABLE[148], {"SE_audible", "seaudible"}, "Toggles whether the explosion will be audible or not. On = Audible.", function(on) + SEisExploAudible = on + if SE_Notifications then + util.toast("Explosion audability set to " .. tostring(on)) + end +end) + +menuToggle(menuroot, KER_LANG_TABLE[149], {}, "Disables notifications like 'stickybomb placed!' or 'entity marked.' Stuff like that. Those get annoying with the Pan feature especially.", function(on) + SE_Notifications = on +end) + +-------------------------------------------------------------------------------------------------------------------------- + +--preload explosion delay +SE_explodeDelay = 0 +local function playerActionsSetup(pid) --set up player actions (necessary for each PID) + menu.divider(menu.player_root(pid), scriptName) + local playerMain = menu.list(menu.player_root(pid), scriptName, {}, "") + menu.divider(playerMain, scriptName) + local playerSuicides = menu.list(playerMain, KER_LANG_TABLE[150], {}, "") --suicides parent + local playerWeapons = menu.list(playerMain, KER_LANG_TABLE[151], {}, "") -- weapons parent + local playerTools = menu.list(playerMain, KER_LANG_TABLE[152], {}, "") --tools parent + local playerOtherTrolling = menu.list(playerMain, KER_LANG_TABLE[153], {}, "") + + + --suicides + + menuAction(playerSuicides, KER_LANG_TABLE[154], {"suicide"}, "", function() + MakePlayerExplodeSuicide(pid) + end) + menuToggleLoop(playerSuicides, KER_LANG_TABLE[155], {"loopsuicide"}, "Loops suicidal explosions.", function() + MakePlayerExplodeSuicide(pid) + wait(SE_explodeDelay) + end) + menuAction(playerSuicides, KER_LANG_TABLE[156], {"suimolly", "suimolotov"}, "Fire will not stay on the player if invisibility is enabled.", function() + MakePlayerMolotovSuicide(pid) + end) + menuToggleLoop(playerSuicides, KER_LANG_TABLE[157], {"loopsuimolly", "loopsuimolotov"}, "Loops suicidal molotovs.", function() + MakePlayerMolotovSuicide(pid) + wait(SE_explodeDelay) + end) + + menu.click_slider(playerSuicides, KER_LANG_TABLE[158], {"SEexpdel"}, "Changes the explosion delay in milliseconds. Max 10sec (10000ms)", 0, 10000, 0, 10, function(val) + SE_explodeDelay = val + end) + + ----------------------------------------------------------------------------------------------------------------------------------- + + --weapons + + menuToggleLoop(playerWeapons, KER_LANG_TABLE[159], {"pexplogun"}, "Gives the player an explosion gun.", function () + local pped = getPlayerPed(pid) + local impactCoord = v3.new() + local shot = WEAPON.GET_PED_LAST_WEAPON_IMPACT_COORD(pped, impactCoord) + if shot then + --local explo = {x = v3.getX(impactCoord), y = v3.getY(impactCoord), z = v3.getZ(impactCoord)} + local explo = GetTableFromV3Instance(impactCoord) + SE_add_owned_explosion(pped, explo.x, explo.y, explo.z, 2, 10, SEisExploAudible, SEisExploInvis, 0) + end + v3.free(impactCoord) + end) + + ----------------------------------------------------------------------------------------------------------------------------------- + + --other trolling + + menu.divider(playerOtherTrolling, KER_LANG_TABLE[160]) + local vehicletrolling = menu.list(playerOtherTrolling, KER_LANG_TABLE[161], {}, "") + menuAction(vehicletrolling, KER_LANG_TABLE[162], {}, "Places walls in front of player. Delete after half a second. Use this when they are driving forward for EPIC TROLLING.", function () + PlaceWallInFrontOfPlayer(pid) + end) + + --preload + VehTroll_VehicleName = "adder" + VehTroll_Invis = false + + menu.divider(vehicletrolling, KER_LANG_TABLE[163]) + + menuAction(vehicletrolling, KER_LANG_TABLE[164], {}, "", function () + DropVehicleOnPlayer(pid, VehTroll_VehicleName, VehTroll_Invis) + end) + + menu.text_input(vehicletrolling, KER_LANG_TABLE[165], {"vehtrollname"}, "Input a vehicle name for vehicle drop. The actual NAME that is assigned to it in RAGE, e.g. OppressorMK2 = oppressor2.", function (text) + VehTroll_VehicleName = tostring(text) + end, "adder") + + menuToggle(vehicletrolling, KER_LANG_TABLE[166], {"vehtrollinvis"}, "Makes the vehicle trolling vehicle invisible.", function(toggle) + VehTroll_Invis = toggle + end) + + ----------------------------------------------------------------------------- + + menu.divider(vehicletrolling, KER_LANG_TABLE[167]) + + menuAction(vehicletrolling, KER_LANG_TABLE[168], {"tpocean"}, "Telepots the player's vehicle into the ocean. May need multiple clicks.", function() + TeleportPlayersVehicleToOcean(pid) + end) + + menuAction(vehicletrolling, KER_LANG_TABLE[169], {"tpmazebank"}, "Telepots the player's vehicle onto the Maze Bank tower. May need multiple clicks.", function() + TeleportPlayersVehicleToMazeBank(pid) + end) + + menuToggleLoop(vehicletrolling, KER_LANG_TABLE[170], {"vehfakelag"}, "Teleports the player's vehicle behind them a bit, simulating lag.", function () + FakeLagPlayerVehicle(pid) + end) + + ----------------------------------------------------------------------------------------------------------------------------------- + + + + + + menu.divider(playerOtherTrolling, KER_LANG_TABLE[171]) + local ptossf = menu.list(playerOtherTrolling, KER_LANG_TABLE[172], {}, "") + + menuToggleLoop(ptossf, KER_LANG_TABLE[173], {"tossplayer", "toss", "ragtoss"}, "Loops no-damage explosions on the player. They will be invisible if you set them as such.", function() + local playerCoords = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid), true) + + SE_add_explosion(playerCoords['x'], playerCoords['y'], playerCoords['z'], 1, 1, SEisExploAudible, SEisExploInvis, 0, true) + end) + + ----------------------------------- + + menu.divider(playerOtherTrolling, KER_LANG_TABLE[178]) + local ptoxic = menu.list(playerOtherTrolling, KER_LANG_TABLE[179], {}, "") + ----------------------------------- + + --DELDEL + menuAction(ptoxic, KER_LANG_TABLE[180], {}, "", function () + util.trigger_script_event(1 << pid, {-446275082, pid, 0, 1, 0}) + end) + + menu.divider(ptoxic, KER_LANG_TABLE[181]) + + menuAction(ptoxic, KER_LANG_TABLE[182], {"fdeath"}, "Freemode death on player.", function () + FreemodeDeathPlayer(pid) + end) + + menuAction(ptoxic, KER_LANG_TABLE[183], {"aiok", "aiokick"}, "If 'slower, but better aio' is enabled in lobby features, then uses it here as well.", function () + AIOKickPlayer(pid) + end) + + menuAction(ptoxic, KER_LANG_TABLE[184], {"byeplague"}, "Works on very few menus, but works on legits.", function () + PlagueCrashPlayer(pid) + end) + + menu.divider(playerTools, KER_LANG_TABLE[185]) + + --preload + SE_waittime = 1000 + menuToggleLoop(playerTools, KER_LANG_TABLE[186], {"movecheck"}, "Notifies you if the selected player is moving. Useful for people who were AFK.", function () + local pped = getPlayerPed(pid) + local pcoords1 = getEntityCoords(pped) + wait(SE_waittime) + local pcoords2 = getEntityCoords(pped) + if pcoords1.x ~= pcoords2.x or pcoords1.y ~= pcoords2.y or pcoords1.z ~= pcoords2.z then + local playerName = tostring(PLAYER.GET_PLAYER_NAME(pid)) + util.toast(playerName .. " is moving!") + end + end) + + menu.slider(playerTools, KER_LANG_TABLE[187], {"movecheckms"}, "How many milliseconds need to pass for it to check for movement, 1000ms = 1sec", 1, 60000, 1000, 100, function(value) + SE_waittime = value + if SE_Notifications then + util.toast("Set move check interval to " .. SE_waittime) + end + end) + + menu.divider(playerTools, KER_LANG_TABLE[188]) + + Ptools_PanTable = {} + Ptools_PanCount = 1 + Ptools_FishPan = 20 + + menuAction(playerTools, KER_LANG_TABLE[189], {"pan"}, "Pan feature.", function () + local targetped = getPlayerPed(pid) + local targetcoords = getEntityCoords(targetped) + + local hash = joaat("tug") + requestModel(hash) + while not hasModelLoaded(hash) do wait() end + + for i = 1, Ptools_FishPan do + Ptools_PanTable[Ptools_PanCount] = VEHICLE.CREATE_VEHICLE(hash, targetcoords.x, targetcoords.y, targetcoords.z, 0, true, true, true) + ---- + local netID = NETWORK.NETWORK_GET_NETWORK_ID_FROM_ENTITY(Ptools_PanTable[Ptools_PanCount]) + NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(Ptools_PanTable[Ptools_PanCount]) + NETWORK.NETWORK_REQUEST_CONTROL_OF_NETWORK_ID(netID) + NETWORK.SET_NETWORK_ID_EXISTS_ON_ALL_MACHINES(netID) + NETWORK.SET_NETWORK_ID_CAN_MIGRATE(netID, false) + NETWORK.SET_NETWORK_ID_ALWAYS_EXISTS_FOR_PLAYER(netID, pid, true) + ENTITY.SET_ENTITY_AS_MISSION_ENTITY(Ptools_PanTable[Ptools_PanCount], true, false) + ENTITY.SET_ENTITY_VISIBLE(Ptools_PanTable[Ptools_PanCount], false, 0) + ---- + if SE_Notifications then + util.toast("Spawned with index of " .. Ptools_PanCount) + end + Ptools_PanCount = Ptools_PanCount + 1 + end + end) + + --preload + + menu.slider(playerTools, KER_LANG_TABLE[190], {"friedfish"}, "The number of flippity flops", 1, 300, 20, 1, function(value) + Ptools_FishPan = value + end) + + menuAction(playerTools, KER_LANG_TABLE[191], {"rmpan"}, "Yep", function () + for x = 1, 5, 1 do + for i = 1, #Ptools_PanTable do + entities.delete_by_handle(Ptools_PanTable[i]) + wait(10) + end + end + -- + Ptools_PanCount = 1 + Ptools_PanTable = {} + noNeedModel(util.joaat("tug")) + end) + + menu.divider(playerTools, KER_LANG_TABLE[192]) + + menuAction(playerTools, KER_LANG_TABLE[193], {"godcheck"}, "", function() + if (players.is_godmode(pid) and not players.is_in_interior(pid)) then + util.toast(players.get_name(pid) .. " is in godmode!") + elseif (players.is_in_interior(pid)) then + util.toast(players.get_name(pid) .. " is in an interior!") + else + util.toast(players.get_name(pid) .. " is not in godmode!") + end + end) + + menuToggleLoop(playerTools, KER_LANG_TABLE[194], {"rmgod"}, "Removes the player's godmode, if they're not on a good paid menu.", function () + util.trigger_script_event(1 << pid, {801199324, pid, 869796886}) + end) + + menuToggleLoop(playerTools, KER_LANG_TABLE[195], {"rmvehgod"}, "Removes the player's vehicle godmode, recursively.", function() + local ped = getPlayerPed(pid) + if PED.IS_PED_IN_ANY_VEHICLE(ped, false) and not PED.IS_PED_DEAD_OR_DYING(ped) then + local veh = PED.GET_VEHICLE_PED_IS_IN(ped, false) + ENTITY.SET_ENTITY_CAN_BE_DAMAGED(veh, true) + ENTITY.SET_ENTITY_INVINCIBLE(veh, false) + end + end) + + menu.divider(playerTools, KER_LANG_TABLE[196]) + + menuAction(playerTools, KER_LANG_TABLE[197], {"stp"}, "Smooth-Teleport to player. If they are in a vehicle, it smooth-teleports into their vehicle.", function() + local targetPed = getPlayerPed(pid) + local targetCoords = getEntityCoords(targetPed) + if not PED.IS_PED_IN_ANY_VEHICLE(targetPed, true) then + SmoothTeleportToCord(targetCoords) + else + SmoothTeleportToVehicle(targetPed) + end + end) + + ---------------------------------------------------------------------------- + + menu.divider(playerMain, KER_LANG_TABLE[198]) + + menuToggle(playerMain, KER_LANG_TABLE[199], {"aimblacklist"}, "Blacklists the selected player from silent aimbot.", function(on) + AIM_WHITELIST[pid] = on + end) + + menuToggle(playerMain, KER_LANG_TABLE[200], {"carbombblacklist"}, "Blacklists the selected player from flagging a Car Suicide Explosion.", function(on) + CAR_S_BLACKLIST[pid] = on + end) + + menuToggle(playerMain, "Hate Player", {"hate"}, "Makes everyone whitelisted to aimbot except this person.", function (on) + local hate = on + local hatername = GetPlayerName_pid(pid) + local playerTable = players.list(false, true, true) + if hate then + for i = 1, #playerTable do + local name = GetPlayerName_pid(playerTable[i]) + menu.trigger_commands("aimblacklist " .. name .. " on") + end + menu.trigger_commands("aimblacklist " .. hatername .. " off") + end + if not hate then + for i = 1, #playerTable do + local name = GetPlayerName_pid(playerTable[i]) + menu.trigger_commands("aimblacklist " .. name .. " off") + end + end + end) + +end + +players.on_join(playerActionsSetup) +players.dispatch_on_join() \ No newline at end of file