local sampev = require 'lib.samp.events'
local inicfg = require 'inicfg'
local directIni = 'onTogglePlayerControllableNOP.ini'
local ini = inicfg.load(inicfg.load({
main = {
enabled = true
},
}, directIni))
inicfg.save(ini, directIni)
function main()
while not isSampAvailable() do wait(0) end
sampRegisterChatCommand('tcnop', function()
ini.main.enabled = not ini.main.enabled
inicfg.save(ini, directIni)
end)
wait(-1)
end
function sampev.onTogglePlayerControllable(controllable)
return not ini.main.enabled
end