You still didn’t got it.
What i mean was, you have while loop, inside the while loop you are checking for the config option and after true you are looping one more time for the coreobject :
What i meant was, why do you need the first while loop for ? And gave you the idea besides this to do it automatically with GetResourceState native. So based on the framework script name you can see which framework they are running and use that as framework.
What i told you about the controls was, use a return instead of if … then (empty) else …
And you just typed return inside if … then return else … 
So in my example i adviced to use it like :
RegisterNetEvent('esx:playerLoaded')
AddEventHandler('esx:playerLoaded', function()
if Config.ESXorQBorNewQB == "qb" or Config.ESXorQBorNewQB == "newqb" then return end
suankimoteli = math.random(1, #pinkcage)
TriggerEvent('notification', locale.Newmotel ..suankimoteli, 1)
end)
An you did :
RegisterNetEvent('esx:playerLoaded')
AddEventHandler('esx:playerLoaded', function()
if Config.ESXorQBorNewQB == "qb" or Config.ESXorQBorNewQB == "newqb" then
return
else
suankimoteli = math.random(1, #pinkcage)
TriggerEvent('notification', locale.Newmotel ..suankimoteli, 1)
end
end)
About the dependencies, everyone uses nowadays polyzone, ox_lib, qtarget, qb-target or whatever other optimized script. You can just use it also in your scripts if you want to call them “optimized”.
Don’t get me wrong, i’m just trying to point you to the right direction since you were away from coding for a long time. If you learn the right way, you will always do it right.
2 Likes