Помощь в изменении скриптов

FYP

Известный
Автор темы
Администратор
1,757
5,684
Здесь вы можете попросить других пользователей внести какие-то небольшие изменения в скрипт, например, изменить активацию.
Для вопросов по программированию и разработке на форуме есть отдельная категория Разработка.

Рекомендации:
  1. Не просите о редактировании .asi, .sf, .luac, .dll, .exe и прочих файлов, не поддающихся простой декомпиляции. Скрипты формата .ahk (AutoHotKey), .lua (Lua/MoonLoader) и .cs (CLEO) легко поддаются изменению.
  2. Сообщения по типу "спасибо, помог" по правилам форума считаются флудом и скорее всего будут удалены. Если вам помогли, вы можете нажать кнопку Мне нравится под ответом - это даст понять, что ответ верный.
  3. За злонамеренное распространение вредоносного ПО - перманентный бан. Имейте это в виду.
Удаление копирайтов является нарушением авторских прав, если автор не дал на это своего разрешения. Правила BlastHack запрещают нарушать авторские права, поэтому если вам нужно их убрать - обращайтесь к автору.
 
Последнее редактирование:

gevorg14

Новичок
5
0
Поменяйте активацию на /gmm(Гм на человека) и на /gmcarr(на машину)
 

Вложения

  • gm — копия.lua
    2 KB · Просмотры: 6

Lancer12

Новичок
3
0
1. If you can make both need to hold SPACE to make the autoshot happen, and remove the inscription on the screen, thank you so much.

or
2. just remove the inscription on the screen when active+deactive, thank you so much
 

Вложения

  • AIM(F10+Space).cs
    19.2 KB · Просмотры: 2
  • AutoShotAUS.cs
    19.8 KB · Просмотры: 2
Последнее редактирование:

Bebra_Best

Новичок
3
0

Помогите пожалуйста изменить кнопку активации в клео​

По стандарту кнопка активации буква X, а надо поменять на букву C.
Снимок экрана (1878).png



Решил попробовать сам изменить кнопку активации на букву С, но в итоге выскочила такая проблема:
Снимок экрана (1877).png



Ниже прикрепил это клео и вот код самого клео:
CLEO:
{$CLEO}
{$INCLUDE SF}
0000:
thread 'bladee'

repeat
  wait 0
until SAMP.Available()

if 8AAB: not file_exists 'CLEO\sbiv.ini'
then 0AF1: write_int 0 to_ini_file 'CLEO\sbiv.ini' section "Drugtimer for Evolve RP" key 'sbiv'
end

0AF0: 8@ = get_int_from_ini_file 'CLEO\sbiv.ini' section "Drugtimer for Evolve RP" key 'sbiv'
if 8@ >= 1
then
    8@ = true
    13@ = true
else 8@ = false
end
0AF1: write_int 8@ to_ini_file 'CLEO\sbiv.ini' section "Drugtimer for Evolve RP" key 'sbiv'

0B34: samp register_client_command 'tsbiv' to_label @CMD_SBIV
0B34: samp register_client_command 'tinfo' to_label @CMD_INFO
0C74: 1 = create_timer_interval 1000 on_label @TIMER
0C78: set_timer 1 active false

repeat
  wait 0
until 02CB: actor $PLAYER_ACTOR bounding_sphere_visible
0BE3: raknet setup_incoming_rpc_hook @RPC_INCOMING

:START
while 82CB: not actor $PLAYER_ACTOR bounding_sphere_visible
  wait 0
end
if 13@ == true
then
    SAMP.ReadSAMPMemory(19@, 0x16FA0, 2)
    SAMP.WriteSAMPMemory(0x16FA0, 50064, 2)
    13@--
end
0A8D: 9@ = read_memory 12030944 size 4 virtual_protect true
if 9@ == 569.0
then
    0C48: samp textdraw 10 create 'Use!' pos 610.0 65.5
    10@ = 1
else
    0C48: samp textdraw 10 create 'Use!' pos 610.0 75.8
    10@ = 0
end                       
0C52: samp textdraw 10 set_letter_size 0.225 1.1 color 0xFFFFFFFF
0C4D: samp textdraw 10 set_shadow 1 color 0xFF000000
0C4E: samp textdraw 10 set_outline 1 color 0xFF000000
0B34: samp register_client_command 'tres' to_label @CMD_RESET

while true
  wait 0
    gosub @TEXTDRAW_POS
    if and
      0ADC: 'X'
      not Actor.Dead($PLAYER_ACTOR)
      not SAMP.IsCursorActive()
      8C79: not    is_timer 1 active
      1@ == 0
      22@ > 0
    then
        12@ = Actor.Health($PLAYER_ACTOR)
        17@ = 160
        0062: 17@ -= 12@
        17@ /= 10
        if 17@ > 0
        then say '/usedrugs %d' 17@
        else say '/usedrugs 1'
        end
    end
        
    12@ = SAMP.GetGamestate()
    if 12@ == GAMESTATE_DISCONNECTED
    then
        0C78: set_timer 1 active false
        SAMP.UnregisterClientCommand('tres')
        repeat
          wait 0
            12@ = SAMP.GetGamestate()
            gosub @TEXTDRAW_POS
        until 12@ == GAMESTATE_CONNECTED
        jump @START
    end
    
    if and
      0C79: is_timer 1 active
      12@ == GAMESTATE_CONNECTED
    then
        if or
          Actor.Dead($PLAYER_ACTOR)
          22@ <= 0
        then
            repeat
              wait 0
                gosub @TEXTDRAW_POS
            until 22@ > 0
            0C78: set_timer 1 active false
            0C50: samp textdraw 10 set_string 'Use!'
        end
    end
    
    if 1@ < -1
    then
        0C78: set_timer 1 active false
        0C50: samp textdraw 10 set_string 'Use!'
        018C: play_sound 1057 at 0.0 0.0 0.0
        1@ = 0
    end
    
    if 8C79: not is_timer 1 active
    then 1@ = 0
    end
end

:TEXTDRAW_POS
23@ = SAMP.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR)
22@ = SAMP.GetPlayerHealthByActorHandle(23@)
0A8D: 11@ = read_memory 12030944 size 4 virtual_protect true
if 803B: not 11@ == 9@
then
    if 10@ == 1
    then
        0C51: samp textdraw 10 set_pos 610.0 76.0
        10@--
    else
        0C51: samp textdraw 10 set_pos 610.0 65.5
        10@++
    end
    0085: 9@ = 11@
end
return

:RPC_INCOMING
0BE5: raknet 30@ = get_hook_param PARAM_PACKETID
if 30@ == RPC_SCRCLIENTMESSAGE
then
    alloc 28@ 256
    alloc 27@ 20
    alloc 26@ 40
    0BE5: raknet 30@ = get_hook_param PARAM_BITSTREAM
    BitStream.IgnoreBits(30@, 32)
    29@ = BitStream.Read(30@, BS_TYPE_INT)
    BitStream.ReadArray(30@, 28@, 29@)
    0C1E: array 28@ element 29@ el_size 1 = 0x0
    27@ = SAMP.GetPlayerNickname(23@)
    format 26@ " %s употребил(a) наркотик" 27@
    if and
      0C14: strcmp string1 28@ string2 26@
      8C79: not is_timer 1 active
    then 31@++
    else
        0AD4: 25@ = scan_string 28@ format " (( Здоровье пополнено до: %i ))" 22@
        if 25@ == true
        then 31@++
        end
    end
    if 31@ == true
    then
        1@ = 60
        0C77: set_timer 1 interval 0
        0C78: set_timer 1 active true
        018C: play_sound 1052 at 0.0 0.0 0.0
        31@--
    end
    free 28@
    free 27@
    free 26@
end
0BE0: raknet hook_ret true

:CMD_SBIV
0B12: 8@ = 8@ XOR 1
0AF1: write_int 8@ to_ini_file 'CLEO\sbiv.ini' section "Drugtimer for Evolve RP" key 'sbiv'
if 8@ == true
then
    SAMP.ReadSAMPMemory(19@, 0x16FA0, 2)
    SAMP.WriteSAMPMemory(0x16FA0, 50064, 2)
    chatmsg "Сбив анимации {44DD44}включён" -1
else
    SAMP.WriteSAMPMemory(0x16FA0, 19@, 2)
    chatmsg "Сбив анимации {DD4444}выключен" -1
end
SAMP.CmdRet()

:CMD_RESET
if 0C79: is_timer 1 active
then
    0C78: set_timer 1 active false
    018C: play_sound 1057 at 0.0 0.0 0.0
    0C50: samp textdraw 10 set_string 'Use!'
    1@ = 0
end
SAMP.CmdRet()

:CMD_INFO
if not SAMP.IsDialogActive(619)
then
    0AC6: 0@ = label @INFO offset
    SAMP.ShowDialog(619, "Наркотаймер для {FF384F}Evolve RP", 0@, 'OK', '', DIALOG_STYLE_MSGBOX)
end
SAMP.CmdRet()

:INFO
hex
  "{FF384F}/tinfo\t{FFFFFF}Отобразить вспомогательный диалог\n"
  "{FF384F}/tsbiv\t{FFFFFF}Включить / выключить сбив\n"
  "{FF384F}/tres\t{FFFFFF}Обнулить таймер" 0
end

:TIMER
if 1@ == 60
then 0C77: set_timer 1 interval 1000
end
if 1@ >= 0
then
    format 24@s '%d' 1@
    0C50: samp textdraw 10 set_string 24@s
end
1@--
SAMP.CmdRet()
 

Вложения

  • drugtimer.cs
    24.7 KB · Просмотры: 7

blockparadise

Участник
128
24
Как поменять клавишу активации на какую угодно? Где взять список названий клавиш? Например : KEY = VK_F5
Lua:
script_name("Skeletal WallHack")
script_version_number(1)
script_description("thx to Valdan666 and FYP")
script_author("AppleThe & hnnssy")

local ffi = require "ffi"
local getBonePosition = ffi.cast("int (__thiscall*)(void*, float*, int, bool)", 0x5E4280)
require "lib.moonloader"
local mem = require "memory"

--// *** // *** //--
whVisible = "all" -- Мод ВХ по умолчанию. Моды написаны в комментарии ниже
optionsCommand = "skeletal" -- Моды ВХ: bones - только кости / names - только ники, all - всё сразу
KEY = VK_F5 -- Кнопка активации ВХ
defaultState = false -- Запуск ВХ при старте игры
--// *** // *** //--

function main()
    if not isSampLoaded() or not isCleoLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end
    sampRegisterChatCommand(optionsCommand, function(param)
        if param == "bones" then whVisible = param; nameTagOff()
        elseif param == "names" or param == "all" then whVisible = param if not nameTag then nameTagOn() end
        else sampAddChatMessage("Введите корректный режим: {CCCCFF}names{4444FF}/{CCCCFF}bones{4444FF}/{CCCCFF}all", 0xFF4444FF) end
    end)
    while not sampIsLocalPlayerSpawned() do wait(100) end
    if defaultState and not nameTag then nameTagOn() end
    while true do
        wait(0)
        if wasKeyPressed(KEY) then;
            if defaultState then
                defaultState = false;
                nameTagOff();
                while isKeyDown(KEY) do wait(100) end
            else
                defaultState = true;
                if whVisible ~= "bones" and not nameTag then nameTagOn() end
                while isKeyDown(KEY) do wait(100) end
            end
        end
        if defaultState and whVisible ~= "names" then
            if not isPauseMenuActive() and not isKeyDown(VK_F8) then
                for i = 0, sampGetMaxPlayerId() do
                if sampIsPlayerConnected(i) then
                    local result, cped = sampGetCharHandleBySampPlayerId(i)
                    local color = sampGetPlayerColor(i)
                    local aa, rr, gg, bb = explode_argb(color)
                    local color = join_argb(255, rr, gg, bb)
                    if result then
                        if doesCharExist(cped) and isCharOnScreen(cped) then
                            local t = {3, 4, 5, 51, 52, 41, 42, 31, 32, 33, 21, 22, 23, 2}
                            for v = 1, #t do
                                pos1X, pos1Y, pos1Z = getBodyPartCoordinates(t[v], cped)
                                pos2X, pos2Y, pos2Z = getBodyPartCoordinates(t[v] + 1, cped)
                                pos1, pos2 = convert3DCoordsToScreen(pos1X, pos1Y, pos1Z)
                                pos3, pos4 = convert3DCoordsToScreen(pos2X, pos2Y, pos2Z)
                                renderDrawLine(pos1, pos2, pos3, pos4, 1, color)
                            end
                            for v = 4, 5 do
                                pos2X, pos2Y, pos2Z = getBodyPartCoordinates(v * 10 + 1, cped)
                                pos3, pos4 = convert3DCoordsToScreen(pos2X, pos2Y, pos2Z)
                                renderDrawLine(pos1, pos2, pos3, pos4, 1, color)
                            end
                            local t = {53, 43, 24, 34, 6}
                            for v = 1, #t do
                                posX, posY, posZ = getBodyPartCoordinates(t[v], cped)
                                pos1, pos2 = convert3DCoordsToScreen(posX, posY, posZ)
                            end
                        end
                    end
                end
            end
            else
                nameTagOff()
                while isPauseMenuActive() or isKeyDown(VK_F8) do wait(0) end
                nameTagOn()
            end
        end
    end
end

function getBodyPartCoordinates(id, handle)
  local pedptr = getCharPointer(handle)
  local vec = ffi.new("float[3]")
  getBonePosition(ffi.cast("void*", pedptr), vec, id, true)
  return vec[0], vec[1], vec[2]
end

function nameTagOn()
    local pStSet = sampGetServerSettingsPtr();
    NTdist = mem.getfloat(pStSet + 39)
    NTwalls = mem.getint8(pStSet + 47)
    NTshow = mem.getint8(pStSet + 56)
    mem.setfloat(pStSet + 39, 1488.0)
    mem.setint8(pStSet + 47, 0)
    mem.setint8(pStSet + 56, 1)
    nameTag = true
end

function nameTagOff()
    local pStSet = sampGetServerSettingsPtr();
    mem.setfloat(pStSet + 39, NTdist)
    mem.setint8(pStSet + 47, NTwalls)
    mem.setint8(pStSet + 56, NTshow)
    nameTag = false
end

function join_argb(a, r, g, b)
  local argb = b  -- b
  argb = bit.bor(argb, bit.lshift(g, 8))  -- g
  argb = bit.bor(argb, bit.lshift(r, 16)) -- r
  argb = bit.bor(argb, bit.lshift(a, 24)) -- a
  return argb
end

function explode_argb(argb)
  local a = bit.band(bit.rshift(argb, 24), 0xFF)
  local r = bit.band(bit.rshift(argb, 16), 0xFF)
  local g = bit.band(bit.rshift(argb, 8), 0xFF)
  local b = bit.band(argb, 0xFF)
  return a, r, g, b
end
 

YarikVL

Известный
Проверенный
4,820
1,827
Как поменять клавишу активации на какую угодно? Где взять список названий клавиш? Например : KEY = VK_F5
Lua:
script_name("Skeletal WallHack")
script_version_number(1)
script_description("thx to Valdan666 and FYP")
script_author("AppleThe & hnnssy")

local ffi = require "ffi"
local getBonePosition = ffi.cast("int (__thiscall*)(void*, float*, int, bool)", 0x5E4280)
require "lib.moonloader"
local mem = require "memory"

--// *** // *** //--
whVisible = "all" -- Мод ВХ по умолчанию. Моды написаны в комментарии ниже
optionsCommand = "skeletal" -- Моды ВХ: bones - только кости / names - только ники, all - всё сразу
KEY = VK_F5 -- Кнопка активации ВХ
defaultState = false -- Запуск ВХ при старте игры
--// *** // *** //--

function main()
    if not isSampLoaded() or not isCleoLoaded() or not isSampfuncsLoaded() then return end
    while not isSampAvailable() do wait(100) end
    sampRegisterChatCommand(optionsCommand, function(param)
        if param == "bones" then whVisible = param; nameTagOff()
        elseif param == "names" or param == "all" then whVisible = param if not nameTag then nameTagOn() end
        else sampAddChatMessage("Введите корректный режим: {CCCCFF}names{4444FF}/{CCCCFF}bones{4444FF}/{CCCCFF}all", 0xFF4444FF) end
    end)
    while not sampIsLocalPlayerSpawned() do wait(100) end
    if defaultState and not nameTag then nameTagOn() end
    while true do
        wait(0)
        if wasKeyPressed(KEY) then;
            if defaultState then
                defaultState = false;
                nameTagOff();
                while isKeyDown(KEY) do wait(100) end
            else
                defaultState = true;
                if whVisible ~= "bones" and not nameTag then nameTagOn() end
                while isKeyDown(KEY) do wait(100) end
            end
        end
        if defaultState and whVisible ~= "names" then
            if not isPauseMenuActive() and not isKeyDown(VK_F8) then
                for i = 0, sampGetMaxPlayerId() do
                if sampIsPlayerConnected(i) then
                    local result, cped = sampGetCharHandleBySampPlayerId(i)
                    local color = sampGetPlayerColor(i)
                    local aa, rr, gg, bb = explode_argb(color)
                    local color = join_argb(255, rr, gg, bb)
                    if result then
                        if doesCharExist(cped) and isCharOnScreen(cped) then
                            local t = {3, 4, 5, 51, 52, 41, 42, 31, 32, 33, 21, 22, 23, 2}
                            for v = 1, #t do
                                pos1X, pos1Y, pos1Z = getBodyPartCoordinates(t[v], cped)
                                pos2X, pos2Y, pos2Z = getBodyPartCoordinates(t[v] + 1, cped)
                                pos1, pos2 = convert3DCoordsToScreen(pos1X, pos1Y, pos1Z)
                                pos3, pos4 = convert3DCoordsToScreen(pos2X, pos2Y, pos2Z)
                                renderDrawLine(pos1, pos2, pos3, pos4, 1, color)
                            end
                            for v = 4, 5 do
                                pos2X, pos2Y, pos2Z = getBodyPartCoordinates(v * 10 + 1, cped)
                                pos3, pos4 = convert3DCoordsToScreen(pos2X, pos2Y, pos2Z)
                                renderDrawLine(pos1, pos2, pos3, pos4, 1, color)
                            end
                            local t = {53, 43, 24, 34, 6}
                            for v = 1, #t do
                                posX, posY, posZ = getBodyPartCoordinates(t[v], cped)
                                pos1, pos2 = convert3DCoordsToScreen(posX, posY, posZ)
                            end
                        end
                    end
                end
            end
            else
                nameTagOff()
                while isPauseMenuActive() or isKeyDown(VK_F8) do wait(0) end
                nameTagOn()
            end
        end
    end
end

function getBodyPartCoordinates(id, handle)
  local pedptr = getCharPointer(handle)
  local vec = ffi.new("float[3]")
  getBonePosition(ffi.cast("void*", pedptr), vec, id, true)
  return vec[0], vec[1], vec[2]
end

function nameTagOn()
    local pStSet = sampGetServerSettingsPtr();
    NTdist = mem.getfloat(pStSet + 39)
    NTwalls = mem.getint8(pStSet + 47)
    NTshow = mem.getint8(pStSet + 56)
    mem.setfloat(pStSet + 39, 1488.0)
    mem.setint8(pStSet + 47, 0)
    mem.setint8(pStSet + 56, 1)
    nameTag = true
end

function nameTagOff()
    local pStSet = sampGetServerSettingsPtr();
    mem.setfloat(pStSet + 39, NTdist)
    mem.setint8(pStSet + 47, NTwalls)
    mem.setint8(pStSet + 56, NTshow)
    nameTag = false
end

function join_argb(a, r, g, b)
  local argb = b  -- b
  argb = bit.bor(argb, bit.lshift(g, 8))  -- g
  argb = bit.bor(argb, bit.lshift(r, 16)) -- r
  argb = bit.bor(argb, bit.lshift(a, 24)) -- a
  return argb
end

function explode_argb(argb)
  local a = bit.band(bit.rshift(argb, 24), 0xFF)
  local r = bit.band(bit.rshift(argb, 16), 0xFF)
  local g = bit.band(bit.rshift(argb, 8), 0xFF)
  local b = bit.band(argb, 0xFF)
  return a, r, g, b
end
 
  • Нравится
Реакции: blockparadise

_maksik_

Известный
4
0
После добавления скрипта не дает сменить раскладку языка, в чем проблема?
Lua:
local vkeys = require 'vkeys'

function main()
    while not isSampAvailable() and sampIsChatInputActive() and not sampIsDialogActive() and not isPauseMenuActive() and not isSampfuncsConsoleActive() do wait(0) end
    while true do
        wait(0)
        if wasKeyPressed(79) and not sampIsChatInputActive() and not sampIsDialogActive() then
           setVirtualKeyDown(vkeys.VK_O, true)
        elseif not wasKeyPressed(79) then
           setVirtualKeyDown(vkeys.VK_O, false)
        end
    end
end
 
У

Удалённый пользователь 497273

Гость
Активацию с HJK = BNM
паже
 

Вложения

  • DualMonitorFix.lua
    39.7 KB · Просмотры: 6