local key = require 'vkeys'
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(1000) end
while true do
wait(0)
if wasKeyPressed(key.VK_P) and not sampIsDialogActive() and not sampIsScoreboardOpen() and not isSampfuncsConsoleActive() and not sampIsChatInputActive() then
sampSendChat('/time')
end
end
end