auto chat input

Pinkic

Участник
Автор темы
32
0
Версия MoonLoader
.027.0-preview
someone have script to auto chat input(like keybinder) on checkpoint or position ?

or auto cmd input in chat when i stay on coordinate or Checkpoint? how can i do it?
 
Последнее редактирование:
Решение
ye and thanks
https://prnt.sc/21n1mjw
Is it?

Edit:

when I type / che immediately opens that command does not work when I come to coordinates?
what to do now ?
Lua:
require "lib.moonloader"
function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end
        sampRegisterChatCommand("che", function() local positionX, positionY, positionZ = getCharCoordinates(PLAYER_PED)
        local res = isCharInArea2d(PLAYER_PED, 1507.7397460938, 1485.4504394531, -1566.0440673828, -1553.9219970703, false)
        if res then sampSendChat('/help') else sampSendChat('error',-1)end end)
    while true do wait(0)
    end
end

qdIbp

Автор темы
Проверенный
1,387
1,142
Hi, here's the code for you. If I am in coordinates
With 1507.7397460938 -1566.0440673828
To 1485.4504394531 -1553.9219970703
Then it is written in the chat /help (height is not important)
If you are not there, then nothing is displayed Activation /che
Lua:
function mycoords()
    local positionX, positionY, positionZ = getCharCoordinates(PLAYER_PED)
    local str = positionX .. ", " .. positionY .. ", " .. positionZ
    local res = isCharInArea2d(PLAYER_PED, 1507.7397460938, 1485.4504394531, -1566.0440673828, -1553.9219970703, false) print(res)
    if res then
        sampSendChat('/help')
    end
end

function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end
        sampRegisterChatCommand("che", mycoords)
    while true do wait(0)
   
    end
end
Can you set your coordinates
 
Последнее редактирование:
  • Нравится
Реакции: Pinkic

qdIbp

Автор темы
Проверенный
1,387
1,142
ye and thanks
https://prnt.sc/21n1mjw
Is it?

Edit:

when I type / che immediately opens that command does not work when I come to coordinates?
what to do now ?
Lua:
require "lib.moonloader"
function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end
        sampRegisterChatCommand("che", function() local positionX, positionY, positionZ = getCharCoordinates(PLAYER_PED)
        local res = isCharInArea2d(PLAYER_PED, 1507.7397460938, 1485.4504394531, -1566.0440673828, -1553.9219970703, false)
        if res then sampSendChat('/help') else sampSendChat('error',-1)end end)
    while true do wait(0)
    end
end
 
Последнее редактирование:
  • Нравится
Реакции: Pinkic