Um, this isn’t a function and if you use break in a loop it will stop it. Therefore once it knows you’re in a coma once it will never know again because the loop isn’t running again.
local TempVar = true
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if vRP.isInComa({}) and TempVar then
TempVar = false
TriggerEvent('cooldown')
elseif not vRP.isInComa({}) then
TempVar = true
end
end
end)
function ThisIsAFunction(Parameter1, Parameter2)
-- Enter your code here
end
You have to manually trigger it like this:
ThisIsAFunction('String', 50)
What you were doing is creating a thread, this runs once when the client loads (If it’s client-side) or when the resource starts (If it’s server-side).
It’s not an error, it’s nothing to do with what he’s asking about. If you read it it says “vrp_hotkeys” which isn’t related to a coma. I already replied about this.