- 64
- 12
Доброго времени суток,код вы видите ниже, тут телепорт по координатам, они работают, как только добавляю еще 2 функции телепорт перестает работать, убираю эти 2 функции кроме телепорта,он работает,пересматривал TheChampGuess не помогло(((( помогите пожалуйста и скажите почему не работает скрипт, спасибо
local list = {
ash = {407.03, 1646.30, 12.01},
m = {-249.81, 511.72, 12.26},
cr = {522.18, 807.69, 12},
cb = {145.38, 246.41, 12.66},
abv = {117.69, -1023.84, 40.51},
ab = {-1320.17, 1675.82, 34.05},
kaz = {-2519.91, 2738.55, 15.27},
cz = {-52.03, 422.23, 12},
sh = {-800.49, -468.64, -75.01},
lh = {-250.90, 1754.76, 14.10},
}
function main()
while not isSampAvailable() do wait(0) end
for name, coords in pairs(list) do
sampRegisterChatCommand("tp"..name, function()
setCharCoordinates(PLAYER_PED, table.unpack(coords))
end)
end
wait(-1)
end
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand("tphelp", tphelp_cmd)
while true do
wait(-1)
end
end
function tphelp_cmd()
if activation then
sampAddChatMessage(string.format("/tpash - Телепорт в Автошколу."), 0x00DD00)
else
sampAddChatMessage(string.format("/tpash - Телепорт в Автошколу."), 0x00DD00)
activation = true
end
end
телепорт с хелпером:
ash = {407.03, 1646.30, 12.01},
m = {-249.81, 511.72, 12.26},
cr = {522.18, 807.69, 12},
cb = {145.38, 246.41, 12.66},
abv = {117.69, -1023.84, 40.51},
ab = {-1320.17, 1675.82, 34.05},
kaz = {-2519.91, 2738.55, 15.27},
cz = {-52.03, 422.23, 12},
sh = {-800.49, -468.64, -75.01},
lh = {-250.90, 1754.76, 14.10},
}
function main()
while not isSampAvailable() do wait(0) end
for name, coords in pairs(list) do
sampRegisterChatCommand("tp"..name, function()
setCharCoordinates(PLAYER_PED, table.unpack(coords))
end)
end
wait(-1)
end
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand("tphelp", tphelp_cmd)
while true do
wait(-1)
end
end
function tphelp_cmd()
if activation then
sampAddChatMessage(string.format("/tpash - Телепорт в Автошколу."), 0x00DD00)
else
sampAddChatMessage(string.format("/tpash - Телепорт в Автошколу."), 0x00DD00)
activation = true
end
end