script_name('test')
script_author('headcliff')
script_moonloader(026)
local ScriptState = false
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
sampAddChatMessage('{FB7B1F}[test]{FFFFFF}: Скрипт включен/перезагружен.', -1)
sampRegisterChatCommand('test', ChangeScriptState)
while true do
wait(0)
if ScriptState then
taskCarDriveToCoord(PLAYER_PED, -1, 1788.9493, 1521.6492, 6.4429, 15, 2, null, 4)
taskCarDriveToCoord(PLAYER_PED, -1, 1789.2878, 1549.1283, 6.4447, 15, 2, null, 4)
end
end
end
function ChangeScriptState()
if isCharSittingInAnyCar(PLAYER_PED) then
ScriptState = not ScriptState
if ScriptState then
sampAddChatMessage('{FB7B1F}[test]{FFFFFF}: Скрипт активирован.', -1)
else
sampAddChatMessage('{FB7B1F}[test]{FFFFFF}: Скрипт деактивирован.', -1)
end
else
sampAddChatMessage('{FB7B1F}[test]{FFFFFF}: Сядьте в машину.', -1)
end
end