Diff
checker
Text
Text
Bilder
Dokumente
Excel
Ordner
Legal
Enterprise
Desktop-App
Preise
Einloggen
Diffchecker Desktop herunterladen
Texte vergleichen
Finde den Unterschied zwischen zwei Textdateien
Werkzeuge
Verlauf
Live-Editor
Gleiches ausblenden
Zeilenumbruch aus
Ansicht
Zweispaltig
Einspaltig
Vergleichsgenauigkeit
Intelligent
Wort
Zeichen
Syntaxhervorhebung
Syntax auswählen
Ignorieren
Text umwandeln
Zur ersten Änderung
Eingabe bearbeiten
Diffchecker Desktop
Der sicherste Weg, Diffchecker zu nutzen. Hol dir die Desktop-App: Deine Diffs verlassen nie deinen Computer!
Desktop holen
Untitled Diff
Erstellt
vor 6 Jahren
Diff läuft nie ab
Löschen
Exportieren
Teilen
Erklären
100 Entfernungen
Zeilen
Gesamt
Entfernt
Zeichen
Gesamt
Entfernt
Um diese Funktion weiterhin zu nutzen, aktualisiere auf
Diff
checker
Pro
Preise anzeigen
198 Zeilen
Kopieren
61 Hinzufügungen
Zeilen
Gesamt
Hinzugefügt
Zeichen
Gesamt
Hinzugefügt
Um diese Funktion weiterhin zu nutzen, aktualisiere auf
Diff
checker
Pro
Preise anzeigen
158 Zeilen
Kopieren
Kopieren
Kopiert
Kopieren
Kopiert
local spawned
Weed
s = 0
local spawned
Shit
s = 0
local
weedPlants
= {}
local
Shitss
= {}
local isPickingUp, isProcessing = false, false
local isPickingUp, isProcessing = false, false
Kopieren
Kopiert
Kopieren
Kopiert
Citizen.CreateThread(function()
Citizen.CreateThread(function()
while true do
while true do
Kopieren
Kopiert
Kopieren
Kopiert
Citizen.Wait(
500
)
Citizen.Wait(
7000
)
local coords = GetEntityCoords(PlayerPedId())
local coords = GetEntityCoords(PlayerPedId())
Kopieren
Kopiert
Kopieren
Kopiert
if GetDistanceBetweenCoords(coords, Config.CircleZones.
WeedField
.coords, true) <
50
then
if GetDistanceBetweenCoords(coords, Config.CircleZones.
oilfield
.coords, true) <
20
then
SpawnWeedPlants
()
SpawnShites
()
end
Citizen.Wait(7000)
end
end)
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
local playerPed = PlayerPedId()
local coords = GetEntityCoords(playerPed)
if GetDistanceBetweenCoords(coords, Config.CircleZones.WeedProcessing.coords, true) < 1 then
if not isProcessing then
ESX.ShowHelpNotification(_U('weed_processprompt'))
end
if IsControlJustReleased(0, 38) and not isProcessing then
if Config.LicenseEnable then
ESX.TriggerServerCallback('esx_license:checkLicense', function(hasProcessingLicense)
if hasProcessingLicense then
ProcessWeed()
else
OpenBuyLicenseMenu('weed_processing')
end
end, GetPlayerServerId(PlayerId()), 'weed_processing')
else
ProcessWeed()
end
end
else
else
Kopieren
Kopiert
Kopieren
Kopiert
Citizen.Wait(
500
)
Citizen.Wait(
7000
)
end
end
end
end
end)
end)
Kopieren
Kopiert
Kopieren
Kopiert
function ProcessWeed()
isProcessing = true
ESX.ShowNotification(_U('weed_processingstarted'))
TriggerServerEvent('esx_drugs:processCannabis')
local timeLeft = Config.Delays.WeedProcessing / 1000
local playerPed = PlayerPedId()
while timeLeft > 0 do
Citizen.Wait(1000)
timeLeft = timeLeft - 1
if GetDistanceBetweenCoords(GetEntityCoords(playerPed), Config.CircleZones.WeedProcessing.coords, false) > 4 then
ESX.ShowNotification(_U('weed_processingtoofar'))
TriggerServerEvent('esx_drugs:cancelProcessing')
break
end
end
Kopieren
Kopiert
Kopieren
Kopiert
isProcessing = false
end
Citizen.CreateThread(function()
Citizen.CreateThread(function()
while true do
while true do
Citizen.Wait(0)
Citizen.Wait(0)
Kopieren
Kopiert
Kopieren
Kopiert
local playerPed = PlayerPedId()
local playerPed = PlayerPedId()
local coords = GetEntityCoords(playerPed)
local coords = GetEntityCoords(playerPed)
local nearbyObject, nearbyID
local nearbyObject, nearbyID
Kopieren
Kopiert
Kopieren
Kopiert
for i=1, #
weedPlants
, 1 do
for i=1, #
Shitss
, 1 do
if GetDistanceBetweenCoords(coords, GetEntityCoords(
weedPlants
[i]), false) < 1 then
if GetDistanceBetweenCoords(coords, GetEntityCoords(
Shitss
[i]), false) < 1 then
nearbyObject, nearbyID =
weedPlants
[i], i
nearbyObject, nearbyID =
Shitss
[i], i
end
end
end
end
if nearbyObject and IsPedOnFoot(playerPed) then
if nearbyObject and IsPedOnFoot(playerPed) then
Kopieren
Kopiert
Kopieren
Kopiert
if not isPickingUp then
if not isPickingUp then
Kopieren
Kopiert
Kopieren
Kopiert
ESX.ShowHelpNotification(_U('
weed_
pickupprompt'))
ESX.ShowHelpNotification(_U('
pickupprompt'))
end
end
Kopieren
Kopiert
Kopieren
Kopiert
if IsControlJustReleased(0,
38
) and not isPickingUp then
if IsControlJustReleased(0,
Keys['E']
) and not isPickingUp then
isPickingUp = true
isPickingUp = true
Kopieren
Kopiert
Kopieren
Kopiert
ESX.TriggerServerCallback('
esx_drugs
:canPickUp', function(canPickUp)
ESX.TriggerServerCallback('
fm_Shit
:canPickUp', function(canPickUp)
if canPickUp then
if canPickUp then
Kopieren
Kopiert
Kopieren
Kopiert
TaskStartScenarioInPlace(playerPed, 'world_human_
gardener_plant
', 0, false)
exports['progressBars']:startUI(4500, "Drilling for soil")
TaskStartScenarioInPlace(playerPed, 'world_human_
const_drill
', 0, false)
Kopieren
Kopiert
Kopieren
Kopiert
Citizen.Wait(
2000
)
Citizen.Wait(
3500
)
ClearPedTasks(playerPed)
ClearPedTasks(playerPed)
Kopieren
Kopiert
Kopieren
Kopiert
Citizen.Wait(1
5
00)
Citizen.Wait(1
0
00)
ESX.Game.DeleteObject(nearbyObject)
ESX.Game.DeleteObject(nearbyObject)
Kopieren
Kopiert
Kopieren
Kopiert
table.remove(
weedPlants
, nearbyID)
table.remove(
Shitss
, nearbyID)
spawned
Weed
s = spawned
Weed
s - 1
spawned
Shit
s = spawned
Shit
s - 1
Kopieren
Kopiert
Kopieren
Kopiert
TriggerServerEvent('
esx_drugs
:pickedUpCannabis')
TriggerServerEvent('
fm_Shit
:pickedUpCannabis')
else
else
Kopieren
Kopiert
Kopieren
Kopiert
ESX.ShowNotification(_U('
weed_
inventoryfull'))
ESX.ShowNotification(_U('
inventoryfull'))
end
end
isPickingUp = false
isPickingUp = false
Kopieren
Kopiert
Kopieren
Kopiert
end, '
cannabis
')
end, '
petroleocrudo
')
end
end
Kopieren
Kopiert
Kopieren
Kopiert
else
else
Citizen.Wait(500)
Citizen.Wait(500)
end
end
Kopieren
Kopiert
Kopieren
Kopiert
end
end
Kopieren
Kopiert
Kopieren
Kopiert
end)
end)
AddEventHandler('onResourceStop', function(resource)
AddEventHandler('onResourceStop', function(resource)
if resource == GetCurrentResourceName() then
if resource == GetCurrentResourceName() then
Kopieren
Kopiert
Kopieren
Kopiert
for k, v in pairs(
weedPlants
) do
for k, v in pairs(
Shitss
) do
ESX.Game.DeleteObject(v)
ESX.Game.DeleteObject(v)
end
end
end
end
end)
end)
Kopieren
Kopiert
Kopieren
Kopiert
function
SpawnWeedPlants
()
function
SpawnShites
()
while spawned
Weed
s <
25
do
while spawned
Shit
s <
20
do
Citizen.Wait(0)
Citizen.Wait(0)
Kopieren
Kopiert
Kopieren
Kopiert
local
weedCoords
= Generate
Weed
Coords()
local
ShitCoords
= Generate
Shit
Coords()
Kopieren
Kopiert
Kopieren
Kopiert
ESX.Game.SpawnLocalObject('prop_
weed_02
',
weedCoords
, function(obj)
ESX.Game.SpawnLocalObject('prop_
bush_med_03
',
ShitCoords
, function(obj)
PlaceObjectOnGroundProperly(obj)
PlaceObjectOnGroundProperly(obj)
FreezeEntityPosition(obj, true)
FreezeEntityPosition(obj, true)
Kopieren
Kopiert
Kopieren
Kopiert
table.insert(
weedPlants
, obj)
table.insert(
Shitss
, obj)
spawned
Weed
s = spawned
Weed
s + 1
spawned
Shit
s = spawned
Shit
s + 1
end)
end)
end
end
end
end
Kopieren
Kopiert
Kopieren
Kopiert
function Validate
Weed
Coord(plantCoord)
function Validate
Shit
Coord(plantCoord)
if spawned
Weed
s > 0 then
if spawned
Shit
s > 0 then
local validate = true
local validate = true
Kopieren
Kopiert
Kopieren
Kopiert
for k, v in pairs(
weedPlants
) do
for k, v in pairs(
Shitss
) do
if GetDistanceBetweenCoords(plantCoord, GetEntityCoords(v), true) <
5
then
if GetDistanceBetweenCoords(plantCoord, GetEntityCoords(v), true) <
10
then
validate = false
validate = false
end
end
end
end
Kopieren
Kopiert
Kopieren
Kopiert
if GetDistanceBetweenCoords(plantCoord, Config.CircleZones.
WeedField
.coords, false) >
50
then
if GetDistanceBetweenCoords(plantCoord, Config.CircleZones.
oilfield
.coords, false) >
20
then
validate = false
validate = false
end
end
return validate
return validate
else
else
return true
return true
end
end
end
end
Kopieren
Kopiert
Kopieren
Kopiert
function Generate
Weed
Coords()
function Generate
Shit
Coords()
while true do
while true do
Kopieren
Kopiert
Kopieren
Kopiert
Citizen.Wait(
1
)
Citizen.Wait(
200
)
Kopieren
Kopiert
Kopieren
Kopiert
local
weedCoordX, weedCoordY
local
ShitCoordX, ShitCoordY
math.randomseed(GetGameTimer())
math.randomseed(GetGameTimer())
Kopieren
Kopiert
Kopieren
Kopiert
local modX = math.random(-
90, 90
)
local modX = math.random(-
30, 30
)
Citizen.Wait(100)
Citizen.Wait(100)
math.randomseed(GetGameTimer())
math.randomseed(GetGameTimer())
Kopieren
Kopiert
Kopieren
Kopiert
local modY = math.random(-
90, 90
)
local modY = math.random(-
25, 25
)
Kopieren
Kopiert
Kopieren
Kopiert
weedCoordX
= Config.CircleZones.
WeedField
.coords.x + modX
ShitCoordX
= Config.CircleZones.
oilfield
.coords.x + modX
weedCoordY
= Config.CircleZones.
WeedField
.coords.y + modY
ShitCoordY
= Config.CircleZones.
oilfield
.coords.y + modY
Kopieren
Kopiert
Kopieren
Kopiert
local coordZ = GetCoordZ(
weedCoordX, weedCoordY
)
local coordZ = GetCoordZ(
ShitCoordX, ShitCoordY
)
local coord = vector3(
weedCoordX, weedCoordY
, coordZ)
local coord = vector3(
ShitCoordX, ShitCoordY
, coordZ)
Kopieren
Kopiert
Kopieren
Kopiert
if Validate
Weed
Coord(coord) then
if Validate
Shit
Coord(coord) then
return coord
return coord
end
end
end
end
end
end
function GetCoordZ(x, y)
function GetCoordZ(x, y)
local groundCheckHeights = { 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0 }
local groundCheckHeights = { 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0 }
for i, height in ipairs(groundCheckHeights) do
for i, height in ipairs(groundCheckHeights) do
local foundGround, z = GetGroundZFor_3dCoord(x, y, height)
local foundGround, z = GetGroundZFor_3dCoord(x, y, height)
if foundGround then
if foundGround then
return z
return z
end
end
end
end
return 43.0
return 43.0
end
end
Gespeicherte Diffs
Originaltext
Datei öffnen
local spawnedWeeds = 0 local weedPlants = {} local isPickingUp, isProcessing = false, false Citizen.CreateThread(function() while true do Citizen.Wait(500) local coords = GetEntityCoords(PlayerPedId()) if GetDistanceBetweenCoords(coords, Config.CircleZones.WeedField.coords, true) < 50 then SpawnWeedPlants() end end end) Citizen.CreateThread(function() while true do Citizen.Wait(0) local playerPed = PlayerPedId() local coords = GetEntityCoords(playerPed) if GetDistanceBetweenCoords(coords, Config.CircleZones.WeedProcessing.coords, true) < 1 then if not isProcessing then ESX.ShowHelpNotification(_U('weed_processprompt')) end if IsControlJustReleased(0, 38) and not isProcessing then if Config.LicenseEnable then ESX.TriggerServerCallback('esx_license:checkLicense', function(hasProcessingLicense) if hasProcessingLicense then ProcessWeed() else OpenBuyLicenseMenu('weed_processing') end end, GetPlayerServerId(PlayerId()), 'weed_processing') else ProcessWeed() end end else Citizen.Wait(500) end end end) function ProcessWeed() isProcessing = true ESX.ShowNotification(_U('weed_processingstarted')) TriggerServerEvent('esx_drugs:processCannabis') local timeLeft = Config.Delays.WeedProcessing / 1000 local playerPed = PlayerPedId() while timeLeft > 0 do Citizen.Wait(1000) timeLeft = timeLeft - 1 if GetDistanceBetweenCoords(GetEntityCoords(playerPed), Config.CircleZones.WeedProcessing.coords, false) > 4 then ESX.ShowNotification(_U('weed_processingtoofar')) TriggerServerEvent('esx_drugs:cancelProcessing') break end end isProcessing = false end Citizen.CreateThread(function() while true do Citizen.Wait(0) local playerPed = PlayerPedId() local coords = GetEntityCoords(playerPed) local nearbyObject, nearbyID for i=1, #weedPlants, 1 do if GetDistanceBetweenCoords(coords, GetEntityCoords(weedPlants[i]), false) < 1 then nearbyObject, nearbyID = weedPlants[i], i end end if nearbyObject and IsPedOnFoot(playerPed) then if not isPickingUp then ESX.ShowHelpNotification(_U('weed_pickupprompt')) end if IsControlJustReleased(0, 38) and not isPickingUp then isPickingUp = true ESX.TriggerServerCallback('esx_drugs:canPickUp', function(canPickUp) if canPickUp then TaskStartScenarioInPlace(playerPed, 'world_human_gardener_plant', 0, false) Citizen.Wait(2000) ClearPedTasks(playerPed) Citizen.Wait(1500) ESX.Game.DeleteObject(nearbyObject) table.remove(weedPlants, nearbyID) spawnedWeeds = spawnedWeeds - 1 TriggerServerEvent('esx_drugs:pickedUpCannabis') else ESX.ShowNotification(_U('weed_inventoryfull')) end isPickingUp = false end, 'cannabis') end else Citizen.Wait(500) end end end) AddEventHandler('onResourceStop', function(resource) if resource == GetCurrentResourceName() then for k, v in pairs(weedPlants) do ESX.Game.DeleteObject(v) end end end) function SpawnWeedPlants() while spawnedWeeds < 25 do Citizen.Wait(0) local weedCoords = GenerateWeedCoords() ESX.Game.SpawnLocalObject('prop_weed_02', weedCoords, function(obj) PlaceObjectOnGroundProperly(obj) FreezeEntityPosition(obj, true) table.insert(weedPlants, obj) spawnedWeeds = spawnedWeeds + 1 end) end end function ValidateWeedCoord(plantCoord) if spawnedWeeds > 0 then local validate = true for k, v in pairs(weedPlants) do if GetDistanceBetweenCoords(plantCoord, GetEntityCoords(v), true) < 5 then validate = false end end if GetDistanceBetweenCoords(plantCoord, Config.CircleZones.WeedField.coords, false) > 50 then validate = false end return validate else return true end end function GenerateWeedCoords() while true do Citizen.Wait(1) local weedCoordX, weedCoordY math.randomseed(GetGameTimer()) local modX = math.random(-90, 90) Citizen.Wait(100) math.randomseed(GetGameTimer()) local modY = math.random(-90, 90) weedCoordX = Config.CircleZones.WeedField.coords.x + modX weedCoordY = Config.CircleZones.WeedField.coords.y + modY local coordZ = GetCoordZ(weedCoordX, weedCoordY) local coord = vector3(weedCoordX, weedCoordY, coordZ) if ValidateWeedCoord(coord) then return coord end end end function GetCoordZ(x, y) local groundCheckHeights = { 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0 } for i, height in ipairs(groundCheckHeights) do local foundGround, z = GetGroundZFor_3dCoord(x, y, height) if foundGround then return z end end return 43.0 end
Bearbeitung
Datei öffnen
local spawnedShits = 0 local Shitss = {} local isPickingUp, isProcessing = false, false Citizen.CreateThread(function() while true do Citizen.Wait(7000) local coords = GetEntityCoords(PlayerPedId()) if GetDistanceBetweenCoords(coords, Config.CircleZones.oilfield.coords, true) < 20 then SpawnShites() Citizen.Wait(7000) else Citizen.Wait(7000) end end end) Citizen.CreateThread(function() while true do Citizen.Wait(0) local playerPed = PlayerPedId() local coords = GetEntityCoords(playerPed) local nearbyObject, nearbyID for i=1, #Shitss, 1 do if GetDistanceBetweenCoords(coords, GetEntityCoords(Shitss[i]), false) < 1 then nearbyObject, nearbyID = Shitss[i], i end end if nearbyObject and IsPedOnFoot(playerPed) then if not isPickingUp then ESX.ShowHelpNotification(_U('pickupprompt')) end if IsControlJustReleased(0, Keys['E']) and not isPickingUp then isPickingUp = true ESX.TriggerServerCallback('fm_Shit:canPickUp', function(canPickUp) if canPickUp then exports['progressBars']:startUI(4500, "Drilling for soil") TaskStartScenarioInPlace(playerPed, 'world_human_const_drill', 0, false) Citizen.Wait(3500) ClearPedTasks(playerPed) Citizen.Wait(1000) ESX.Game.DeleteObject(nearbyObject) table.remove(Shitss, nearbyID) spawnedShits = spawnedShits - 1 TriggerServerEvent('fm_Shit:pickedUpCannabis') else ESX.ShowNotification(_U('inventoryfull')) end isPickingUp = false end, 'petroleocrudo') end else Citizen.Wait(500) end end end) AddEventHandler('onResourceStop', function(resource) if resource == GetCurrentResourceName() then for k, v in pairs(Shitss) do ESX.Game.DeleteObject(v) end end end) function SpawnShites() while spawnedShits < 20 do Citizen.Wait(0) local ShitCoords = GenerateShitCoords() ESX.Game.SpawnLocalObject('prop_bush_med_03', ShitCoords, function(obj) PlaceObjectOnGroundProperly(obj) FreezeEntityPosition(obj, true) table.insert(Shitss, obj) spawnedShits = spawnedShits + 1 end) end end function ValidateShitCoord(plantCoord) if spawnedShits > 0 then local validate = true for k, v in pairs(Shitss) do if GetDistanceBetweenCoords(plantCoord, GetEntityCoords(v), true) < 10 then validate = false end end if GetDistanceBetweenCoords(plantCoord, Config.CircleZones.oilfield.coords, false) > 20 then validate = false end return validate else return true end end function GenerateShitCoords() while true do Citizen.Wait(200) local ShitCoordX, ShitCoordY math.randomseed(GetGameTimer()) local modX = math.random(-30, 30) Citizen.Wait(100) math.randomseed(GetGameTimer()) local modY = math.random(-25, 25) ShitCoordX = Config.CircleZones.oilfield.coords.x + modX ShitCoordY = Config.CircleZones.oilfield.coords.y + modY local coordZ = GetCoordZ(ShitCoordX, ShitCoordY) local coord = vector3(ShitCoordX, ShitCoordY, coordZ) if ValidateShitCoord(coord) then return coord end end end function GetCoordZ(x, y) local groundCheckHeights = { 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0 } for i, height in ipairs(groundCheckHeights) do local foundGround, z = GetGroundZFor_3dCoord(x, y, height) if foundGround then return z end end return 43.0 end
Unterschied finden