Answer the question
In order to leave comments, you need to log in
Wrote my first mini script, but it doesn't work, tell me what's wrong?
require "lib.moonloader"
local keys = require "vkeys"
function main()
if not isSampLoaded() or not isSampfuncsLoaded()
then return
end
while not isSampAvailable()
do wait()
end
sampAddChatMessage('CarHelp активен', 0x800080)
while true do
wait(0)
if isKeyJustPressed(VK_L)
then
sampSendChat('/lock')
end
if isKeyJustPressed(VK_K)
then
sampSendChat('/key')
end
Answer the question
In order to leave comments, you need to log in
The main thing that is wrong is that the indents are not respected .
If you follow, then all unclosed end will be more clearly visible.
Very very very bad coding.
require "lib.moonloader"
local keys = require "vkeys"
function main()
repeat wait(0) until isSampAvailable()
sampAddChatMessage('CarHelp активен', 0x800080)
while true do
wait(0)
if isKeyJustPressed(VK_L) then sampSendChat('/lock') end
if isKeyJustPressed(VK_K) then sampSendChat('/key') end
end
end
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question