local hook = require('lib.samp.events')
local bool = false
function main()
repeat wait(0) until isSampAvailable()
sampRegisterChatCommand('invis', function()
bool = not bool
sampAddChatMessage('PriviteInvis: '..(bool and 'вкл' or 'выкл'), -1)
end)
wait(-1)
end
function hook.onSendPlayerSync(player)
if bool then
local result, vehicleHandle = findAllRandomVehiclesInSphere(player.position.x, player.position.y, player.position.z, 50.6, false, false)
if result then
player.surfingVehicleId = select(2, sampGetVehicleIdByCarHandle(vehicleHandle))
player.surfingOffsets = {50.5, 50.5, -50.5}
printStringNow('TI NEVIDIM', 1000)
end
end
end