Вопросы по моему кривому коду

  • Автор темы deleted-user-311312
  • Дата начала
D

deleted-user-311312

Гость
Автор темы
Версия MoonLoader
.026-beta
1588293329843.png

Вообщем в двух словах я кривой ничего не воркает,в чём проблема беру хэндл машины в переменную car потом использую для функции,а она не пашет.
 

Albertio

Attention! Thanks for your attention.
887
717
Lua:
require 'lib.moonloader'
require 'lib.sampfuncs'

function main()
  if not isSampLoaded() or not isSampfuncsLoaded() then return end
  while not isSampAvailable() do wait(100) end
  sampRegisterChatCommand("carkill", aue)
    while true do
        wait(0)
    end
end

function aue()
    local car = storeCarCharIsInNoSave(PLAYER_PED)
    setCarHealth(car, 0)
end
 
D

deleted-user-311312

Гость
Автор темы
Lua:
require 'lib.moonloader'
require 'lib.sampfuncs'

function main()
  if not isSampLoaded() or not isSampfuncsLoaded() then return end
  while not isSampAvailable() do wait(100) end
  sampRegisterChatCommand("carkill", aue)
    while true do
        wait(0)
    end
end

function aue()
    local car = storeCarCharIsInNoSave(PLAYER_PED)
    setCarHealth(car, 0)
end
В чём разница между обычной переменной и локал?