local sampev = require('lib.samp.events')
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
repeat wait(0) until isSampAvailable()
sampRegisterChatCommand('ss', function() on = not on sampAddChatMessage(on and "activated" or 'deactivated', -1) end)
end
function sampev.onSendVehicleSync(data)
local vx,vy, vz = getCarCoordinates(storeCarCharIsInNoSave(PLAYER_PED))
if on then
if isCharInAnyCar(playerPed) then
data.position(vx-50, vy-50, vz-50)
data.surfingOffsets(1, 1, 1)
else
sampAddChatMessage('Not in cars')
end
end
end
почему выдает ошибку и не работает.
В общем должно показывать что позиция машины на 50 метров позади чем настоящая
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
repeat wait(0) until isSampAvailable()
sampRegisterChatCommand('ss', function() on = not on sampAddChatMessage(on and "activated" or 'deactivated', -1) end)
end
function sampev.onSendVehicleSync(data)
local vx,vy, vz = getCarCoordinates(storeCarCharIsInNoSave(PLAYER_PED))
if on then
if isCharInAnyCar(playerPed) then
data.position(vx-50, vy-50, vz-50)
data.surfingOffsets(1, 1, 1)
else
sampAddChatMessage('Not in cars')
end
end
end
почему выдает ошибку и не работает.
В общем должно показывать что позиция машины на 50 метров позади чем настоящая