Comments (3)
Thank you for the heads up. Doesn't work how? Is it throwing an error or just doing nothing?
Also you can copy my work, but you need to include my license in your code:
https://github.com/Henry12116/hackee-dispatch/blob/master/LICENSE#L12-L13
https://github.com/cdgmx/custom_dispatch
from hackee-dispatch.
from hackee-dispatch.
Hmm I see. I think I read about TerminateThread
here but it seems like this doesn't work for other people either. We can stop a thread by simply calling return
or break
.
Maybe create a new table that basically maps threadID --> shouldBeTurnedOff. Initialize as false for newly created threads. Then within each dispatch thread, at the start check if it should be turned off. If so break. Something like this maybe:
while true do
shouldTurnOff = tableStatuses[threadID]
if shouldTurnOff then
break
end
local plyPed = GetPlayerPed(-1)
local plyPos = GetEntityCoords(plyPed)
Citizen.Wait(1)
if ESX.PlayerData.job ~= nil and table.contains( squad.EnemiesWith, ESX.PlayerData.job.name) and (GetVecDist(plyPos, squad.CentralPos) < squad.TriggerDistance) and IsShockingEventInSphere(squad.Event, squad.CentralPos.x, squad.CentralPos.y, squad.CentralPos.z, squad.TriggerDistance) then
SpawnEnemyDispatch(squad)
Citizen.Wait(squad.TimeBeforeUpAgain)
end
end
Then stopAOEListener will only have to toggle the status for each thread.
I have to play around with this idea some more, but if you get something working before me feel free to submit a PR 🙂
from hackee-dispatch.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hackee-dispatch.