function main()
if not isSampLoaded() and not isSampfuncsLoaded() then return end -- проверяем загружен ли SAMP и сам SampFuncs, если нет, то сбрасываем соединение
repeat wait(0) until isSampAvailable()
repeat wait(100) until sampIsLocalPlayerSpawned()
files_add()
sampRegisterChatCommand('mh', function()
if not SelectPlayers.v and not HistorySMS.v and not newFind.v and not newFind.v and not settingsMenu.v and not SelectPlayersMedicalOsmtr.v and not showBinnder.v and not gnewsLeaderMenu.v and not ComputerDialogMain.v then
selected = 1
MainNewMenu.v = not MainNewMenu.v
end
end)
sampRegisterChatCommand('gate', function() GatePanelFunc:run() end)
sampRegisterChatCommand('r', RadioRun)
sampRegisterChatCommand('p', canncelPPhone)
sampRegisterChatCommand('h', canncelHPhone)
sampRegisterChatCommand('histsms', function()
if not SelectPlayers.v and not newFind.v and not callSobesMenu.v and not settingsMenu.v and not SelectPlayersMedicalOsmtr.v and not showBinnder.v and not gnewsLeaderMenu.v and not ComputerDialogMain.v then
HistorySMS.v = not HistorySMS.v
end
end)
sampRegisterChatCommand('rep', reportText)
sampRegisterChatCommand('drive', DriveFunc)
sampRegisterChatCommand('повышение', getinforang)
sampRegisterChatCommand('f', RadioFun)
sampRegisterChatCommand('sobes', SobesMenu)
sampRegisterChatCommand('friends', cmd_friends)
sampRegisterChatCommand('kpk', cmd_kpk)
sampRegisterChatCommand('checkfind', cmd_checkfind)
sampRegisterChatCommand('find', function()
logTextFind = {}
allcols = 0
afkcols = 0
jailcols = 0
mutecols = 0
sampSendChat("/find")
end)
sampRegisterChatCommand('debtorlist', debtorlist)
sampRegisterChatCommand('debtorsell', cmd_debtorsell)
sampRegisterChatCommand('to', toSystem)
sampRegisterChatCommand('leak', leakrp)
sampRegisterChatCommand('ap', MedSkipRP)
sampRegisterChatCommand('free', FreeJail)
sampRegisterChatCommand('givelic', GiveLicSystem)
sampRegisterChatCommand('putmed', cmd_putmed)
sampRegisterChatCommand('цп', lecdialog)
sampRegisterChatCommand('pickmed', cmd_pickmed)
sampRegisterChatCommand('out', outSystem)
sampRegisterChatCommand('historymed', gethistmed)
sampRegisterChatCommand('operacion', operacionrp)
sampRegisterChatCommand('changesex', changesex)
sampRegisterChatCommand('medcard', MedCardList)
sampRegisterChatCommand('medskip', MedSkipRP)
sampRegisterChatCommand('medhelp', medhelpList)
sampRegisterChatCommand('onehelp', onehelp)
sampRegisterChatCommand('клятва', Klyatva)
sampRegisterChatCommand('light', cmd_light)
sampRegisterChatCommand('tvlift', cmd_tvlift)
sampRegisterChatCommand('audience', cmd_audience)
sampRegisterChatCommand('all', cmd_all)
sampRegisterChatCommand('tvtext', cmd_tvtext)
sampRegisterChatCommand('tvskip', cmd_tvskipRolePlay)
sampRegisterChatCommand('radiojoin', cmd_radiojoinRolePlay)
sampRegisterChatCommand('givemic', cmd_givemicRolePlay)
sampRegisterChatCommand('makeskin', cmd_makeskinRP)
sampRegisterChatCommand('sale', cmd_PaperRP)
sampRegisterChatCommand('efir', cmd_efirRolePlay)
sampRegisterChatCommand('stand', cmd_standRolePlay)
sampRegisterChatCommand('camera', cmd_cameraRolePlay)
sampRegisterChatCommand('bring', cmd_bringRolePlay)
sampRegisterChatCommand('fixedit', function()
sampSendDialogResponse(224, 1, 0, tageditor.." | "..u8:decode(MessagesAds.v))
end)
sampRegisterChatCommand('liv', cmd_livby)
sampRegisterChatCommand('unvby', cmd_uninvby)
sampRegisterChatCommand('ok', cmd_ok)
sampRegisterChatCommand('fd', RadioFunDoclade)
sampRegisterChatCommand('rd', RadioRunDoclade)
sampRegisterChatCommand('rn', RadioRunNonRP)
sampRegisterChatCommand('eject', ejectRP)
sampRegisterChatCommand('heal', medhealList)
sampRegisterChatCommand('gps', gpsfunc)
sampRegisterChatCommand('график', grafikdialog)
sampRegisterChatCommand('addbl', cmd_addbl)
sampRegisterChatCommand('delbl', cmd_delbl)
sampRegisterChatCommand('drone', drone)
sampRegisterChatCommand('autodoclade', funcAutoDoclade)
sampRegisterChatCommand('fn', RadioFunNonRP)
sampRegisterChatCommand('unv', UvalPlayer)
sampRegisterChatCommand('uninvite', UvalPlayer)
sampRegisterChatCommand('inv', InvitePlayer)
sampRegisterChatCommand('invite', InvitePlayer)
sampRegisterChatCommand('dice', ex_dice)
sampRegisterChatCommand('offrang', funOffRang)
sampRegisterChatCommand('uninviteoff', funOffUninvite)
sampRegisterChatCommand('gn', function()
if NumRangPlayer == 10 or accNumber == 905492 or accNumber == 1638304 or accNumber == 905738 then
if not SelectPlayers.v and not HistorySMS.v and not newFind.v and not callSobesMenu.v and not settingsMenu.v and not SelectPlayersMedicalOsmtr.v and not showBinnder.v and not ComputerDialogMain.v then
gnewsLeaderMenu.v = not gnewsLeaderMenu.v
end
else
sampAddChatMessage("[{FF8800}MultiAHK{F5FFFA}]: У Вас нет доступа к данному разделу. Ваш текущий уровень доступа: {"..colororgs.."}"..NumRangPlayer, 0xF5FFFA)
sampAddChatMessage("[{FF8800}MultiAHK{F5FFFA}]: Для данного раздела требуется уровень доступа: {"..colororgs.."}10", 0xF5FFFA)
SoundDENIED()
end
end)
sampRegisterChatCommand('binder', function()
if not SelectPlayers.v and not HistorySMS.v and not newFind.v and not callSobesMenu.v and not settingsMenu.v and not SelectPlayersMedicalOsmtr.v and not gnewsLeaderMenu.v and not ComputerDialogMain.v then
showBinnder.v = not showBinnder.v
end
end)
sampRegisterChatCommand('ud', GoUdsPlayer)
sampRegisterChatCommand('hist', HistoryPlayer)
sampRegisterChatCommand('black', black_checker)
sampRegisterChatCommand('blackname', black_history)
sampRegisterChatCommand('rang', ex_rang)
sampRegisterChatCommand('gg', GGSay)
sampRegisterChatCommand('number', numberID)
sampRegisterChatCommand('vig', vigovor)
sampRegisterChatCommand('changeskin', changeskin)
sampRegisterChatCommand('smsn', NonRPSMS)
sampRegisterChatCommand('reconnect', reconnect)
update() -- запуск обновлений
while not UpdateNahuy do wait(0) end -- пока не проверит обновления тормозим работу
print("Получаем номер аккаунта игрока ARP")
ScriptUse = 3
regAcc = true
sampSendChat("/mn")
while ScriptUse == 3 do wait(0) end
if ScriptUse == 4 then -- в случае неудачного получения номера аккаунта
print("Номер аккаунта не получен, работа завершена")
reloadScript = true
sampAddChatMessage("[{FF8800}MLUA{F5FFFA}]: Прозошла ошибка при получении данных номера аккаунта.", 0xF5FFFA)
thisScript():unload()
return
elseif ScriptUse == 5 then
print("Номер аккаунта был получен: "..tonumber(accNumber))
if sampGetCurrentServerAddress() == "54.37.142.73" then gameServer = "Green"; stateName = "{FFFF66}Advance RolePlay - {00FF00}Green"; serverName = "ARP - {00FF00}Green"; regDialogOpen = 1; sampSendChat("/mn")
elseif sampGetCurrentServerAddress() == "54.37.142.72" then gameServer = "Red"; stateName = "{FFFF66}Advance RolePlay - {FF0000}Red"; serverName = "ARP - {FF0000}Red"; regDialogOpen = 1; sampSendChat("/mn")
elseif sampGetCurrentServerAddress() == "54.37.142.74" then gameServer = "Blue"; stateName = "{FFFF66}Advance RolePlay - {0000FF}Blue"; serverName = "ARP - {0000FF}Blue"; regDialogOpen = 1; sampSendChat("/mn")
else
print("Сервер не допущен, работа скрипта завершена")
print("IP сервера: "..sampGetCurrentServerAddress())
sampAddChatMessage("[{FF8800}MLUA{F5FFFA}]: К сожалению, данный скрипт недоступен для работы на данном сервере.", 0xF5FFFA)
sampAddChatMessage("[{FF8800}MLUA{F5FFFA}]: Свяжитесь с разработчиками, если хотите уточнить возможность решения данной проблемы.", 0xF5FFFA)
thisScript():unload()
return
end
end
inputHelpText = renderCreateFont("Arial", 9, FCR_BORDER + FCR_BOLD)
lua_thread.create(showInputHelp)
print("Начинаем инициализацию клавиш")
if tBindList ~= nil then
print("Регистрируем клавиши")
for k, v in pairs(tBindList) do
rkeys.registerHotKey(v.v, true, onHotKey)
end
else
print("Критическая ошибка, выполняем откат клавиш")
tBindList = {
[1] = { text = "/lock", v = {} },
[2] = { text = "/find", v = {} },
[3] = { text = "/c 60", v = {} },
[4] = { text = "/medskip (/ap)", v = {} },
[5] = { text = "/gg *Представиться", v = {18,49} },
[6] = { text = "/gate", v = {} },
[7] = { text = "/badge", v = {} },
[8] = { text = "/устав", v = {} },
[9] = { text = "/график", v = {} }
}
print("Откат выполнен.")
end
print("Инициализация клавиш завершена")
print("Начинаем инициализацию биндера")
if mass_bind ~= nil then
print("Регистрируем команды бинда.")
for k, p in ipairs(mass_bind) do
if p.cmd ~= "-" then
rcmd(p.cmd, p.text, p.delay)
print("Зарегистрирована команда биндера: /"..p.cmd)
end
end
else
print("Критическая ошибка, выполняем откат binder.bind")
mass_bind = {
[1] = { cmd = "-", v = {}, text = "Any text", delay = 3 },
[2] = { cmd = "-", v = {}, text = "Any text", delay = 3 },
[3] = { cmd = "-", v = {}, text = "Any text", delay = 3 },
[4] = { cmd = "-", v = {}, text = "Any text", delay = 3 },
[5] = { cmd = "-", v = {}, text = "Any text", delay = 3 }
}
print("Откат выполнен.")
end
print("Регистрация клавиш бинда")
for i, g in pairs(mass_bind) do
rkeys.registerHotKey(g.v, true, onHotKey)
end
print("Инициализация биндера завершена")
while true do wait(0)
unix_time = os.time(os.date('!*t'))
moscow_time = unix_time + timefix.v * 60 * 60
imgui.Process = ComputerDialogMain.v or MainNewMenu.v or EditorADS.v or callMenuPhone.v or HistorySMS.v or settingsMenu.v or updateINFO.v or infobarImgui.v or showBinnder.v or SelectPlayers.v or SelectPlayersMedicalOsmtr.v or callSobesMenu.v
zX, zY, zZ = getCharCoordinates(playerPed)
-- определение города
local citiesList = {'Los-Santos', 'San-Fierro', 'Las-Venturas'}
local city = getCityPlayerIsIn(PLAYER_HANDLE)
if city > 0 then playerCity = citiesList[city] else playerCity = "N/a" end
if arrayFunc.infobar.v and not isGamePaused() then
if not MainNewMenu.v then
infobarImgui.v = true
end
if showBinnder.v then
infobarImgui.v = false
end
if mouseCoord then
showCursor(true, true)
infoX, infoY = getCursorPos()
if isKeyDown(VK_RETURN) then
settings.options.infoX = math.floor(infoX)
settings.options.infoY = math.floor(infoY)
mouseCoord = false
showCursor(false, false)
MainNewMenu.v = not MainNewMenu.v
inicfg.save(settings, 'USMOH.ini')
end
end
else
infobarImgui.v = false
end
if isKeyJustPressed(VK_G) and not sampIsChatInputActive() and not sampIsDialogActive() and not sampIsScoreboardOpen() and not isSampfuncsConsoleActive() then
local result, ped = getCharPlayerIsTargeting(PLAYER_HANDLE)
if result and doesCharExist(ped) then
local tdd, id = sampGetPlayerIdByCharHandle(ped)
if tdd then
MenuName = sampGetPlayerNickname(id)
MenuID = id
systemSecurity()
end
end
end
if isKeyJustPressed(VK_Y) and not sampIsChatInputActive() and not sampIsDialogActive() and not sampIsScoreboardOpen() and not isSampfuncsConsoleActive() then
local result, ped = getCharPlayerIsTargeting(PLAYER_HANDLE)
if result and doesCharExist(ped) then
local tdd, id = sampGetPlayerIdByCharHandle(ped)
if tdd then
MenuName = sampGetPlayerNickname(id)
MenuID = id
systemMySelf()
end
end
end
if isKeyJustPressed(VK_1) and not sampIsChatInputActive() and not sampIsDialogActive() and not sampIsScoreboardOpen() and not isSampfuncsConsoleActive() then
local result, ped = getCharPlayerIsTargeting(PLAYER_HANDLE)
if result and doesCharExist(ped) then
local tdd, id = sampGetPlayerIdByCharHandle(ped)
if tdd then
MenuName = sampGetPlayerNickname(id)
MenuID = id
SystemQQMo()
end
end
end
if isKeyJustPressed(VK_R) and not sampIsChatInputActive() and not sampIsDialogActive() and not sampIsScoreboardOpen() and not isSampfuncsConsoleActive() then -- меню взаимодействия на ПКМ + R
local result, ped = getCharPlayerIsTargeting(PLAYER_HANDLE)
if result and doesCharExist(ped) then
local tdd, id = sampGetPlayerIdByCharHandle(ped)
if tdd then
MenuName = sampGetPlayerNickname(id)
MenuID = id
SelectPlayers.v = not SelectPlayers.v
end
end
end
if isKeyJustPressed(VK_E) and not sampIsChatInputActive() and not sampIsDialogActive() and not sampIsScoreboardOpen() and not isSampfuncsConsoleActive() then -- меню взаимодействия на ПКМ + R
local result, ped = getCharPlayerIsTargeting(PLAYER_HANDLE)
if result and doesCharExist(ped) then
local tdd, id = sampGetPlayerIdByCharHandle(ped)
if tdd then
sampProcessChatInput("/historymed "..id)
end
end
end
if isKeyJustPressed(VK_F2) and golecpacient and not sampIsChatInputActive() and not sampIsDialogActive() and not sampIsScoreboardOpen() and not isSampfuncsConsoleActive() then
lastmedprice()
end
if isKeyJustPressed(VK_F3) and golecpacient and not sampIsChatInputActive() and not sampIsDialogActive() and not sampIsScoreboardOpen() and not isSampfuncsConsoleActive() then
Sendchat("/me "..(SexPlayersFunc and 'убрала' or 'убрал').." лекарство в мед. сумку")
wait(1000)
Sendchat("К сожалению, у Вас нет средств для оплаты лечения.")
golecpacient = false
end
if isKeyJustPressed(VK_F4) and RPDesign and not sampIsChatInputActive() and not sampIsDialogActive() and not sampIsScoreboardOpen() and not isSampfuncsConsoleActive() then
ActionRP1:terminate()
ActionRP2:terminate()
RPDesign = false
sampAddChatMessage("[{FF8800}MLUA{F5FFFA}]: Вы отказались проводить акцию.", 0xF5FFFA)
end
if isKeyJustPressed(VK_F4) and CancelCommand and not sampIsChatInputActive() and not sampIsDialogActive() and not sampIsScoreboardOpen() and not isSampfuncsConsoleActive() then
LicThread:terminate()
AdvocateThread1:terminate()
sampAddChatMessage("[{FF8800}MLUA{F5FFFA}]: Действие было - остановлено.", 0xF5FFFA)
CancelCommand = false
end
for i = 0, sampGetMaxPlayerId(true) do -- отключаем "вх" камхака для игроков, оставляем для разрабов.
if sampIsPlayerConnected(i) then
local result, ped = sampGetCharHandleBySampPlayerId(i)
if result then
local positionX, positionY, positionZ = getCharCoordinates(ped)
local localX, localY, localZ = getCharCoordinates(PLAYER_PED)
local distance = getDistanceBetweenCoords3d(positionX, positionY, positionZ, localX, localY, localZ)
if distance >= 30 and droneActive and developers ~= 1 then
EmulShowNameTag(i, false)
elseif droneActive and developers == 1 then
EmulShowNameTag(i, true)
else
EmulShowNameTag(i, true)
end
end
end
end
end
end