Может ли кто-нибудь исправить этот код для меня?

Zanox

Новичок
Автор темы
9
1
script_name("KFC SLIDE")
script_version("2.0")
script_author(" ")
script_dependencies("SAMPFUNCS")
require("lib.sampfuncs")
require("lib.moonloader")

slot0 = require("vkeys")
slot1 = {
{
name = "FastWalk",
data = {}
}
}
slot2 = true
slot3 = 0
slot4 = 70
Anims_1 = {
"WALK_PLAYER",
"GUNCROUCHFWD",
"GUNCROUCHBWD",
"GUNMOVE_BWD",
"GUNMOVE_FWD",
"GUNMOVE_L",
"GUNMOVE_R",
"RUN_GANG1",
"JOG_FEMALEA",
"JOG_MALEA",
"RUN_CIVI",
"RUN_CSAW",
"RUN_FAT",
"RUN_FATOLD",
"RUN_OLD",
"RUN_ROCKET",
"RUN_WUZI",
"SPRINT_WUZI",
"WALK_ARMED",
"WALK_CIVI",
"WALK_CSAW",
"WALK_DRUNK",
"WALK_FAT",
"WALK_FATOLD",
"WALK_GANG1",
"WALK_GANG2",
"WALK_OLD",
"WALK_SHUFFLE",
"WALK_START",
"WALK_START_ARMED",
"WALK_START_CSAW",
"WALK_START_ROCKET",
"WALK_WUZI",
"WOMAN_WALKBUSY",
"WOMAN_WALKFATOLD",
"WOMAN_WALKNORM",
"WOMAN_WALKOLD",
"WOMAN_RUNFATOLD",
"WOMAN_WALKPRO",
"WOMAN_WALKSEXY",
"WOMAN_WALKSHOP",
"RUN_1ARMED",
"RUN_ARMED",
"RUN_PLAYER",
"WALK_ROCKET",
"CLIMB_IDLE",
"MUSCLESPRINT",
"CLIMB_PULL",
"CLIMB_STAND",
"CLIMB_STAND_FINISH",
"SWIM_BREAST",
"SWIM_CRAWL",
"SWIM_DIVE_UNDER",
"SWIM_GLIDE",
"MUSCLERUN",
"WOMAN_RUN",
"WOMAN_RUNBUSY",
"WOMAN_RUNPANIC",
"WOMAN_RUNSEXY",
"SPRINT_CIVI",
"SPRINT_PANIC",
"SWAT_RUN",
"FATSPRINT"
}
slot5 = false
slot6 = false
slot7 = 0
slot8 = 100
slot9 = {
22,
23,
24,
26,
27,
28,
25,
29,
30,
31,
33,
34
}

function setFastWalkMultiplier(slot0)
if uv1 < (tonumber(slot0) or uv0) then
sampAddChatMessage("{7affa0}[KFC SLIDE] {ffdedc}No puedes usar más velocidad", -1)

return
end

slot0 = uv0

sampAddChatMessage("{7affa0}[KFC SLIDE] set to{ffdedc} " .. uv0, -1)
end

function main()
if not isSampLoaded() or not isSampfuncsLoaded() then
return
end

while not isSampAvailable() do
wait(100)
end

sampAddChatMessage("{FFA07A}AutoSwitch KFC {20B2AA}LOADED..")
sampRegisterChatCommand("kfc", function (slot0)
setFastWalkMultiplier(slot0)
end)

while true do
wait(0)
doKeyCheck()

if uv0 then
doFastCheatWork()
end
end
end

function doKeyCheck()
if not isKeyCheckAvailable() then
return
end

if wasKeyPressed(slot0.VK_OEM_PLUS) then
active = not active

sampAddChatMessage(active and "{f0dcff}KFC SLIDE {47ff7c}ON" or "{daa9ff}KFC SLIDE {f00800}OFF", -1)

if switchFunc("FastWalk") then
setPlayerNeverGetsTired(playerHandle, 1)
else
setPlayerNeverGetsTired(playerHandle, 0)
end
end
end

function doFastCheatWork()
if not isFuncEnabled("FastWalk") then
return
end

if isKeyDown(uv0.VK_RBUTTON) and not uv1 then
uv1 = true
elseif not isKeyDown(uv0.VK_RBUTTON) and uv1 then
uv1 = false
uv2 = true
uv3 = os.clock() * 1000
end

if uv2 and uv4 <= os.clock() * 1000 - uv3 then
uv2 = false
end

for slot4, slot5 in ipairs(Anims_1) do
setCharAnimSpeed(playerPed, slot5, uv2 and uv5 or 1)
end
end

function isFuncEnabled(slot0)
return uv0[getFunc(slot0)] and slot1.data.activated
end

function switchFunc(slot0)
if uv0[getFunc(slot0)] then
slot1.data.activated = not slot1.data.activated

return slot1.data.activated
end
end

function getFunc(slot0)
for slot4, slot5 in ipairs(uv0) do
if slot5.name == slot0 then
return slot4
end
end
end

function isKeyCheckAvailable()
if not isSampfuncsLoaded() then
return true
end

return not isSampfuncsConsoleActive() and not sampIsChatInputActive() and not sampIsDialogActive()
end
 
  • Вау
Реакции: pastow

- |2347| -

Известный
337
116
вот пробуй


код:
script_name("KFC SLIDE")
script_version("2.0")
script_author(" ")
script_dependencies("SAMPFUNCS")
require("lib.sampfuncs")
require("lib.moonloader")

slot0 = require("vkeys")
slot1 = {
    {
        name = "FastWalk",
        data = {
            activated = false
        }
    }
}
slot2 = true
slot3 = 0
slot4 = 70
Anims_1 = {
    "WALK_PLAYER",
    "GUNCROUCHFWD",
    "GUNCROUCHBWD",
    "GUNMOVE_BWD",
    "GUNMOVE_FWD",
    "GUNMOVE_L",
    "GUNMOVE_R",
    "RUN_GANG1",
    "JOG_FEMALEA",
    "JOG_MALEA",
    "RUN_CIVI",
    "RUN_CSAW",
    "RUN_FAT",
    "RUN_FATOLD",
    "RUN_OLD",
    "RUN_ROCKET",
    "RUN_WUZI",
    "SPRINT_WUZI",
    "WALK_ARMED",
    "WALK_CIVI",
    "WALK_CSAW",
    "WALK_DRUNK",
    "WALK_FAT",
    "WALK_FATOLD",
    "WALK_GANG1",
    "WALK_GANG2",
    "WALK_OLD",
    "WALK_SHUFFLE",
    "WALK_START",
    "WALK_START_ARMED",
    "WALK_START_CSAW",
    "WALK_START_ROCKET",
    "WALK_WUZI",
    "WOMAN_WALKBUSY",
    "WOMAN_WALKFATOLD",
    "WOMAN_WALKNORM",
    "WOMAN_WALKOLD",
    "WOMAN_RUNFATOLD",
    "WOMAN_WALKPRO",
    "WOMAN_WALKSEXY",
    "WOMAN_WALKSHOP",
    "RUN_1ARMED",
    "RUN_ARMED",
    "RUN_PLAYER",
    "WALK_ROCKET",
    "CLIMB_IDLE",
    "MUSCLESPRINT",
    "CLIMB_PULL",
    "CLIMB_STAND",
    "CLIMB_STAND_FINISH",
    "SWIM_BREAST",
    "SWIM_CRAWL",
    "SWIM_DIVE_UNDER",
    "SWIM_GLIDE",
    "MUSCLERUN",
    "WOMAN_RUN",
    "WOMAN_RUNBUSY",
    "WOMAN_RUNPANIC",
    "WOMAN_RUNSEXY",
    "SPRINT_CIVI",
    "SPRINT_PANIC",
    "SWAT_RUN",
    "FATSPRINT"
}
slot5 = false
slot6 = false
slot7 = 0
slot8 = 100
slot9 = {
    22,
    23,
    24,
    26,
    27,
    28,
    25,
    29,
    30,
    31,
    33,
    34
}

function setFastWalkMultiplier(slot0)
    if tonumber(slot0) and tonumber(slot0) < slot4 then
        sampAddChatMessage("{7affa0}[KFC SLIDE] {ffdedc}You can't use a speed greater than " .. slot4, -1)
        return
    end

    slot4 = tonumber(slot0) or slot4
    sampAddChatMessage("{7affa0}[KFC SLIDE] set to {ffdedc}" .. slot4, -1)
end

function main()
    if not isSampLoaded() or not isSampfuncsLoaded() then
        return
    end

    while not isSampAvailable() do
        wait(100)
    end

    sampAddChatMessage("{FFA07A}AutoSwitch KFC {20B2AA}LOADED..")
    sampRegisterChatCommand("kfc", function(slot0)
        setFastWalkMultiplier(slot0)
    end)

    while true do
        wait(0)
        doKeyCheck()

        if slot2 then
            doFastCheatWork()
        end
    end
end

function doKeyCheck()
    if not isKeyCheckAvailable() then
        return
    end

    if wasKeyPressed(slot0.VK_OEM_PLUS) then
        slot2 = not slot2
        sampAddChatMessage(slot2 and "{f0dcff}KFC SLIDE {47ff7c}ON" or "{daa9ff}KFC SLIDE {f00800}OFF", -1)

        if switchFunc("FastWalk") then
            setPlayerNeverGetsTired(playerHandle, 1)
        else
            setPlayerNeverGetsTired(playerHandle, 0)
        end
    end
end

function doFastCheatWork()
    if not isFuncEnabled("FastWalk") then
        return
    end

    if isKeyDown(slot0.VK_RBUTTON) and not slot3 then
        slot3 = true
    elseif not isKeyDown(slot0.VK_RBUTTON) and slot3 then
        slot3 = false
        slot4 = true
        slot5 = os.clock() * 1000
    end

    if slot4 and slot8 <= os.clock() * 1000 - slot5 then
        slot4 = false
    end

    for slot9, slot10 in ipairs(Anims_1) do
        setCharAnimSpeed(playerPed, slot10, slot4 and slot7 or 1)
    end
end

function isFuncEnabled(slot0)
    local funcIndex = getFunc(slot0)
    if funcIndex and slot1[funcIndex] then
        return slot1[funcIndex].data.activated
    end
    return false
end

function switchFunc(slot0)
    local funcIndex = getFunc(slot0)
    if funcIndex and slot1[funcIndex] then
        slot1[funcIndex].data.activated = not slot1[funcIndex].data.activated
        return slot1[funcIndex].data.activated
    end
end

function getFunc(slot0)
    for slot4, slot5 in ipairs(slot1) do
        if slot5.name == slot0 then
            return slot4
        end
    end
end

function isKeyCheckAvailable()
    if not isSampfuncsLoaded() then
        return true
    end

    return not isSampfuncsConsoleActive() and not sampIsChatInputActive() and not sampIsDialogActive()
end