Помогите пофиксить под новое луа апи неверлуза

Начинающий
Статус
Оффлайн
Регистрация
5 Авг 2021
Сообщения
16
Реакции[?]
0
Поинты[?]
0
Помогите пофиксить под новое луа апи неверлуза
code_language.lua:
local client, entity_list, globals = EngineClient, EntityList, GlobalVars

local weapons, weapons_index = {}, {}
local weapons_data, weapons_data_types = {[1]={"deagle",1,230,700,"Desert Eagle",7,0.225},[2]={"elite",1,240,400,"Dual Berettas",30,0.12},[3]={"fiveseven",1,240,500,"Five-SeveN",20,0.15},[4]={"glock",1,240,200,"Glock-18",20,0.15},[7]={"ak47",2,215,2700,"AK-47",30,0.1},[8]={"aug",2,220,3300,"AUG",30,0.09},[9]={"awp",2,200,4750,"AWP",10,1.455},[10]={"famas",2,220,2250,"FAMAS",25,0.09},[11]={"g3sg1",2,215,5000,"G3SG1",20,0.25},[13]={"galilar",2,215,2000,"Galil AR",35,0.09},[14]={"m249",3,195,5200,"M249",100,0.08},[16]={"m4a1",2,225,3100,"M4A4",30,0.09},[17]={"mac10",4,240,1050,"MAC-10",30,0.075},[19]={"p90",4,230,2350,"P90",50,0.07},[23]={"mp5sd",4,235,1500,"MP5-SD",30,0.08},[24]={"ump45",4,230,1200,"UMP-45",25,0.09},[25]={"xm1014",3,215,2000,"XM1014",7,0.35},[26]={"bizon",4,240,1400,"PP-Bizon",64,0.08},[27]={"mag7",3,225,1300,"MAG-7",5,0.85},[28]={"negev",3,150,1700,"Negev",150,0.075},[29]={"sawedoff",3,210,1100,"Sawed-Off",7,0.85},[30]={"tec9",1,240,500,"Tec-9",18,0.12},[31]={"taser",5,220,200,"Zeus x27",1,0.15},[32]={"hkp2000",1,240,200,"P2000",13,0.17},[33]={"mp7",4,220,1500,"MP7",30,0.08},[34]={"mp9",4,240,1250,"MP9",30,0.07},[35]={"nova",3,220,1050,"Nova",8,0.88},[36]={"p250",1,240,300,"P250",13,0.15},[38]={"scar20",2,215,5000,"SCAR-20",20,0.25},[39]={"sg556",2,210,2750,"SG 553",30,0.09},[40]={"ssg08",2,230,1700,"SSG 08",10,1.25},[41]={"knifegg",6,250,0,"Knife",-1,0.15},[42]={"knife",6,250,0,"Knife",-1,0.15},[43]={"flashbang",7,245,200,"Flashbang",-1,0.15},[44]={"hegrenade",7,245,300,"High Explosive Grenade",-1,0.15},[45]={"smokegrenade",7,245,300,"Smoke Grenade",-1,0.15},[46]={"molotov",7,245,400,"Molotov",-1,0.15},[47]={"decoy",7,245,50,"Decoy Grenade",-1,0.15},[48]={"incgrenade",7,245,600,"Incendiary Grenade",-1,0.15},[49]={"c4",8,250,0,"C4 Explosive",-1,0.15},[50]={"item_kevlar",5,1,650,"Kevlar Vest",-1,0.15},[51]={"item_assaultsuit",5,1,1000,"Kevlar + Helmet",-1,0.15},[52]={"item_heavyassaultsuit",5,1,6000,"Heavy Assault Suit",-1,0.15},[55]={"item_defuser",5,1,400,"Defuse Kit",-1,0.15},[56]={"item_cutters",5,1,400,"Rescue Kit",-1,0.15},[57]={"healthshot",9,250,0,"Medi-Shot",-1,0.15},[59]={"knife_t",6,250,0,"Knife",-1,0.15},[60]={"m4a1_silencer",2,225,3100,"M4A1-S",25,0.1},[61]={"usp_silencer",1,240,200,"USP-S",12,0.17},[63]={"cz75a",1,240,500,"CZ75-Auto",12,0.1},[64]={"revolver",1,180,600,"R8 Revolver",8,0.5},[68]={"tagrenade",7,245,100,"Tactical Awareness Grenade",-1,0.15},[69]={"fists",6,275,0,"Bare Hands",-1,0.15},[70]={"breachcharge",8,245,300,"Breach Charge",3,0.15},[72]={"tablet",10,220,300,"Tablet",1,0.15},[74]={"melee",6,250,0,"Knife",-1,0.15},[75]={"axe",6,250,0,"Axe",-1,0.15},[76]={"hammer",6,250,0,"Hammer",-1,0.15},[78]={"spanner",6,250,0,"Wrench",-1,0.15},[80]={"knife_ghost",6,250,0,"Spectral Shiv",-1,0.15},[81]={"firebomb",7,245,400,"Fire Bomb",-1,0.15},[82]={"diversion",7,245,50,"Diversion Device",-1,0.15},[83]={"frag_grenade",7,245,300,"Frag Grenade",-1,0.15},[84]={"snowball",7,245,100,"Snowball",-1,0.15},[500]={"bayonet",6,250,0,"Bayonet",-1,0.15},[505]={"knife_flip",6,250,0,"Flip Knife",-1,0.15},[506]={"knife_gut",6,250,0,"Gut Knife",-1,0.15},[507]={"knife_karambit",6,250,0,"Karambit",-1,0.15},[508]={"knife_m9_bayonet",6,250,0,"M9 Bayonet",-1,0.15},[509]={"knife_tactical",6,250,0,"Huntsman Knife",-1,0.15},[512]={"knife_falchion",6,250,0,"Falchion Knife",-1,0.15},[514]={"knife_survival_bowie",6,250,0,"Bowie Knife",-1,0.15},[515]={"knife_butterfly",6,250,0,"Butterfly Knife",-1,0.15},[516]={"knife_push",6,250,0,"Shadow Daggers",-1,0.15},[519]={"knife_ursus",6,250,0,"Ursus Knife",-1,0.15},[520]={"knife_gypsy_jackknife",6,250,0,"Navaja Knife",-1,0.15},[522]={"knife_stiletto",6,250,0,"Stiletto Knife",-1,0.15},[523]={"knife_widowmaker",6,250,0,"Talon Knife",-1,0.15},[1349]={"spraypaint",11,250,0,"Graffiti",0,0}}, {"secondary","rifle","heavy","smg","equipment","melee","grenade","c4","boost","utility","spray"}

for idx, weapon in pairs(weapons_data) do
    local console_name, weapon_type = ("weapon_" .. weapon[1]):gsub("weapon_item_", "item_"), weapons_data_types[weapon[2]]
    weapons[idx] = {
        console_name = console_name,
        idx = idx,
        type = weapon_type,
        max_speed = weapon[3],
        price = weapon[4],
        name = weapon[5],
        primary_clip_size = weapon[6],
        cycletime = weapon[7]
    }
    weapons_index[console_name] = weapons[idx]
end

local cached_weapons = {}

local function collect_keys(t)
    local lt = {}

    for name in pairs(t or {}) do
        lt[#lt + 1] = name
    end

    table.sort(lt)
    table.insert(lt, 1, "Disabled")

    return lt
end

local function UserIDToEnt(userid)
    return --[[entity_list.GetClientEntity(]]entity_list.GetPlayerForUserID(userid)--[[)]]
end

local function get_weapon(idx)
    if type(idx) == "string" then
        return weapons_index[idx]
    elseif type(idx) == "number" then
        idx = bit.band(idx, 0xFFFF)
        return rawget(weapons, idx)
    end
end

local function say(text)
    local str = string.format("say \"%s\"", text)
    client.ExecuteClientCmd(str)
end

local settings = {}
settings.poses = {
    ["Default"] = {
        text = "nice {wep} config retard",
        hs_text = "nice antiaim bro"
    },
    ["PalaceInterior"] = {
        text = "sit u little palace saving tranny",
        hs_text = "get headshot u little palace saving tranny"
    },
    ["Apartment"] = {
        text = "{name} tried to hide in house, hh",
        hs_text = "hey, {name}, {wep} didn't help to hide, yep?"
    },
    ["Apartments"] = {
        text = "{name} tried to hide in house, hh",
        hs_text = "hey, {name}, {wep} didn't help to hide, yep?"
    },
    ["LeftAlley"] = {
        text = "there was a star between us",
        hs_text = "star between us just got 1`ed you"
    },
    ["BackAlley"] = {
        text = "there was a star between us",
        hs_text = "star between us just got 1`ed you"
    },
    ["BombsiteB"] = {
        text = "hey, {name}, don't fucking sit on B",
        hs_text = "haha, got 1 while sitting on B with {wep}, you sell?"
    },
    ["BombsiteA"] = {
        text = "hey, {name}, don't fucking sit on A",
        hs_text = "haha, got 1 while sitting on A with {wep}, you sell?"
    },
    ["Stairwell"] = {
        text = "nice fall from the stairs",
        hs_text = "oh, that's 1 on my stairs"
    },
    ["Stairs"] = {
        text = "nice fall from the stairs",
        hs_text = "oh, that's 1 on my stairs"
    },
    ["SideHall"] = {
        text = "{name}, don't try to sit in hall",
        hs_text = "oh, that's 1 on my hall"
    },
    ["MainHall"] = {
        text = "never gonna give you up",
        hs_text = "did you try to kill me with {wep}? LOL"
    },
    ["TSpawn"] = {
        text = "yep, try to hide on t spawn",
        hs_text = "sorry, but there is no god on t spawn"
    },
    ["CTSpawn"] = {
        text = "yep, try to hide on ct spawn",
        hs_text = "sorry, but there is no god on ct spawn"
    },
    ["BackEntrance"] = {
        text = "hey, bitch, get out the way, bitch",
        hs_text = "did you came to get 1?"
    },
    ["Overpass"] = {
        text = "get down, mtf",
        hs_text = "nice 1"
    },
    ["Back"] = {
        text = "nice scared to go inside",
        hs_text = "{name} is trying to hide, what a shame"
    },
    ["FrontEntrance"] = {
        text = "why did you get {wep}? to die?",
        hs_text = "came to get 1, hh"
    },
    ["Tunnel"] = {
        text = "died in tunnel like a turtle?",
        hs_text = "turtle has been destroyed"
    },
    ["UpperTunnel"] = {
        text = "died in tunnel like a turtle?",
        hs_text = "turtle has been destroyed"
    },
    ["LowerTunnel"] = {
        text = "died in tunnel like a turtle?",
        hs_text = "turtle has been destroyed"
    },
    ["LongHall"] = {
        text = "did you know you need to move?",
        hs_text = "come to me, my baby"
    },
    ["Middle"] = {
        text = "idiot on middle has been destroyed",
        hs_text = "i'm freaking 1 machine"
    },
    ["TicketBooth"] = {
        text = "{name}, come to me, my dear",
        hs_text = "{name}, don't waste money on {wep}"
    },
    ["TRamp"] = {
        text = "here comes the rampage on a ramp",
        hs_text = "hey, {name}, don't make it bad, Take a sad {wep} cfg and make it better"
    },
    ["Scaffolding"] = {
        text = "did you really come to die?",
        hs_text = "came and got 1, haha"
    },
    ["Jungle"] = {
        text = "Is it Vietnam? So why are in jugles?",
        hs_text = "And he told me: 'Johnny! I can't feel my legs"
    },
    ["Connector"] = {
        text = "You just got disconnected",
        hs_text = "{name} is expecting connection errors"
    },
    ["PalaceAlley"] = {
        text = "get back to your freaking Mexico",
        hs_text = "backtracked to Mexico, again"
    },
    ["SnipersNest"] = {
        text = "and here comes the hax",
        hs_text = "once, it will be just a bad dream for you"
    },
    ["Shop"] = {
        text = "{name}, what did you do in shop? Tried to buy new cfg?",
        hs_text = "{name}, did you buy {wep} in that shop? xD"
    },
    ["CatWalk"] = {
        text = "walking like a real cat, {name}",
        hs_text = "what did you want to do with {wep}? die?"
    }
}

settings.weapons = {
    ["g3sg1"] = "auto",
    ["scar-20"] = "auto",
    ["r8 revolver"] = "r8",
    ["ssg 08"] = "scout",
    ["dual berettas"] = "dualies",
    ["glock-18"] = "glock",
    ["molotov"] = "brain",
    ["flashbang"] = "brain",
    ["smokegrenade"] = "brain",
    ["c4"] = "allakh"
}

settings.phrases = {
    ["Weapon based"] = {
        baim = { "nice {wep} config retard" },
        hs = { "nice {wep} config retard" },
    },
}


settings.presets = {
    ["Position based"] = function(victim, attacker, headshot, callout)
        local cur = settings.poses[callout] or settings.poses["Default"]
        local text = (hs_announce and headshot) and cur.hs_text or cur.text or "I'm just a fag, didn't add phrase to killsay"
        return text
    end
}

for k,v in pairs(settings.phrases) do
    settings.presets[k] = function(victim, attacker, headshot, callout)
        local tbl = (hs_announce and headshot) and v.hs or (v.baim or v)
        return tbl[math.random(#tbl)]
    end
end

local collected = collect_keys(settings.presets)

settings.menu = {
    types = Menu.Combo("Global", "Preset"collected, 0, "Style of killsay"),
}

local function UpdateWeapons()
    for idx = 1, globals.maxClients + 1 do
        local ply = entity_list.GetClientEntity(idx)
        if ply and ply:IsPlayer() then
            local ply_obj = ply:GetPlayer()
            local health = ply_obj:GetProp("DT_BasePlayer", "m_iHealth")
            if (health > 0) then
                local wep = ply_obj:GetProp("DT_BaseCombatCharacter", "m_hActiveWeapon")
                if wep then
                    local wep_obj = entity_list.GetClientEntityFromHandle(wep)
                    if wep_obj then
                        local active_idx = wep_obj:GetProp("DT_BaseAttributableItem", "m_iItemDefinitionIndex")
                        local weapon_data = get_weapon(active_idx)
                        if weapon_data then
                            local weapon_name = string.lower(weapon_data.name or "dildo")
                            weapon_name = settings.weapons[weapon_name] or weapon_name
                            cached_weapons[ply:EntIndex()] = weapon_name
                        end
                    end
                end
            end
        end
    end
end

local events = {
    ["player_death"] = function(event)
        local victim = UserIDToEnt(event:GetInt("userid", -1))
        local attacker = UserIDToEnt(event:GetInt("attacker", -1))
        local localplayer = client.GetLocalPlayer()
        if not attacker or attacker:EntIndex() ~= localplayer or victim == attacker then return end

        local mode = collected[ settings.menu.types:GetInt() + 1 ]
        local preset = settings.presets[ mode ]
        if not preset then return end
        local ply = victim:GetPlayer()
        local name, hs, place, weapon = ply:GetName(), event:GetBool("headshot", false), victim:GetProp("DT_BasePlayer", "m_szLastPlaceName"), (cached_weapons[victim:EntIndex()] or "auto")
        name = name:gsub("'", ""):gsub(";", "") -- prevent exploit, lol
        local text = preset(victim, attacker, hs, place)
        text = text:gsub("{wep}", weapon):gsub("{name}", name)
        say(text)
    end,
    ["item_pickup"] = UpdateWeapons,
    ["weapon_reload"] = UpdateWeapons
}



Cheat.RegisterCallback("events", function(event)
    if not events[event:GetName()] then return end
    events[event:GetName()](event)
end)

Cheat.RegisterCallback("ragebot_shot", UpdateWeapons)
 
Забаненный
Статус
Оффлайн
Регистрация
4 Авг 2022
Сообщения
101
Реакции[?]
47
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Помогите пофиксить под новое луа апи неверлуза
code_language.lua:
local client, entity_list, globals = EngineClient, EntityList, GlobalVars

local weapons, weapons_index = {}, {}
local weapons_data, weapons_data_types = {[1]={"deagle",1,230,700,"Desert Eagle",7,0.225},[2]={"elite",1,240,400,"Dual Berettas",30,0.12},[3]={"fiveseven",1,240,500,"Five-SeveN",20,0.15},[4]={"glock",1,240,200,"Glock-18",20,0.15},[7]={"ak47",2,215,2700,"AK-47",30,0.1},[8]={"aug",2,220,3300,"AUG",30,0.09},[9]={"awp",2,200,4750,"AWP",10,1.455},[10]={"famas",2,220,2250,"FAMAS",25,0.09},[11]={"g3sg1",2,215,5000,"G3SG1",20,0.25},[13]={"galilar",2,215,2000,"Galil AR",35,0.09},[14]={"m249",3,195,5200,"M249",100,0.08},[16]={"m4a1",2,225,3100,"M4A4",30,0.09},[17]={"mac10",4,240,1050,"MAC-10",30,0.075},[19]={"p90",4,230,2350,"P90",50,0.07},[23]={"mp5sd",4,235,1500,"MP5-SD",30,0.08},[24]={"ump45",4,230,1200,"UMP-45",25,0.09},[25]={"xm1014",3,215,2000,"XM1014",7,0.35},[26]={"bizon",4,240,1400,"PP-Bizon",64,0.08},[27]={"mag7",3,225,1300,"MAG-7",5,0.85},[28]={"negev",3,150,1700,"Negev",150,0.075},[29]={"sawedoff",3,210,1100,"Sawed-Off",7,0.85},[30]={"tec9",1,240,500,"Tec-9",18,0.12},[31]={"taser",5,220,200,"Zeus x27",1,0.15},[32]={"hkp2000",1,240,200,"P2000",13,0.17},[33]={"mp7",4,220,1500,"MP7",30,0.08},[34]={"mp9",4,240,1250,"MP9",30,0.07},[35]={"nova",3,220,1050,"Nova",8,0.88},[36]={"p250",1,240,300,"P250",13,0.15},[38]={"scar20",2,215,5000,"SCAR-20",20,0.25},[39]={"sg556",2,210,2750,"SG 553",30,0.09},[40]={"ssg08",2,230,1700,"SSG 08",10,1.25},[41]={"knifegg",6,250,0,"Knife",-1,0.15},[42]={"knife",6,250,0,"Knife",-1,0.15},[43]={"flashbang",7,245,200,"Flashbang",-1,0.15},[44]={"hegrenade",7,245,300,"High Explosive Grenade",-1,0.15},[45]={"smokegrenade",7,245,300,"Smoke Grenade",-1,0.15},[46]={"molotov",7,245,400,"Molotov",-1,0.15},[47]={"decoy",7,245,50,"Decoy Grenade",-1,0.15},[48]={"incgrenade",7,245,600,"Incendiary Grenade",-1,0.15},[49]={"c4",8,250,0,"C4 Explosive",-1,0.15},[50]={"item_kevlar",5,1,650,"Kevlar Vest",-1,0.15},[51]={"item_assaultsuit",5,1,1000,"Kevlar + Helmet",-1,0.15},[52]={"item_heavyassaultsuit",5,1,6000,"Heavy Assault Suit",-1,0.15},[55]={"item_defuser",5,1,400,"Defuse Kit",-1,0.15},[56]={"item_cutters",5,1,400,"Rescue Kit",-1,0.15},[57]={"healthshot",9,250,0,"Medi-Shot",-1,0.15},[59]={"knife_t",6,250,0,"Knife",-1,0.15},[60]={"m4a1_silencer",2,225,3100,"M4A1-S",25,0.1},[61]={"usp_silencer",1,240,200,"USP-S",12,0.17},[63]={"cz75a",1,240,500,"CZ75-Auto",12,0.1},[64]={"revolver",1,180,600,"R8 Revolver",8,0.5},[68]={"tagrenade",7,245,100,"Tactical Awareness Grenade",-1,0.15},[69]={"fists",6,275,0,"Bare Hands",-1,0.15},[70]={"breachcharge",8,245,300,"Breach Charge",3,0.15},[72]={"tablet",10,220,300,"Tablet",1,0.15},[74]={"melee",6,250,0,"Knife",-1,0.15},[75]={"axe",6,250,0,"Axe",-1,0.15},[76]={"hammer",6,250,0,"Hammer",-1,0.15},[78]={"spanner",6,250,0,"Wrench",-1,0.15},[80]={"knife_ghost",6,250,0,"Spectral Shiv",-1,0.15},[81]={"firebomb",7,245,400,"Fire Bomb",-1,0.15},[82]={"diversion",7,245,50,"Diversion Device",-1,0.15},[83]={"frag_grenade",7,245,300,"Frag Grenade",-1,0.15},[84]={"snowball",7,245,100,"Snowball",-1,0.15},[500]={"bayonet",6,250,0,"Bayonet",-1,0.15},[505]={"knife_flip",6,250,0,"Flip Knife",-1,0.15},[506]={"knife_gut",6,250,0,"Gut Knife",-1,0.15},[507]={"knife_karambit",6,250,0,"Karambit",-1,0.15},[508]={"knife_m9_bayonet",6,250,0,"M9 Bayonet",-1,0.15},[509]={"knife_tactical",6,250,0,"Huntsman Knife",-1,0.15},[512]={"knife_falchion",6,250,0,"Falchion Knife",-1,0.15},[514]={"knife_survival_bowie",6,250,0,"Bowie Knife",-1,0.15},[515]={"knife_butterfly",6,250,0,"Butterfly Knife",-1,0.15},[516]={"knife_push",6,250,0,"Shadow Daggers",-1,0.15},[519]={"knife_ursus",6,250,0,"Ursus Knife",-1,0.15},[520]={"knife_gypsy_jackknife",6,250,0,"Navaja Knife",-1,0.15},[522]={"knife_stiletto",6,250,0,"Stiletto Knife",-1,0.15},[523]={"knife_widowmaker",6,250,0,"Talon Knife",-1,0.15},[1349]={"spraypaint",11,250,0,"Graffiti",0,0}}, {"secondary","rifle","heavy","smg","equipment","melee","grenade","c4","boost","utility","spray"}

for idx, weapon in pairs(weapons_data) do
    local console_name, weapon_type = ("weapon_" .. weapon[1]):gsub("weapon_item_", "item_"), weapons_data_types[weapon[2]]
    weapons[idx] = {
        console_name = console_name,
        idx = idx,
        type = weapon_type,
        max_speed = weapon[3],
        price = weapon[4],
        name = weapon[5],
        primary_clip_size = weapon[6],
        cycletime = weapon[7]
    }
    weapons_index[console_name] = weapons[idx]
end

local cached_weapons = {}

local function collect_keys(t)
    local lt = {}

    for name in pairs(t or {}) do
        lt[#lt + 1] = name
    end

    table.sort(lt)
    table.insert(lt, 1, "Disabled")

    return lt
end

local function UserIDToEnt(userid)
    return --[[entity_list.GetClientEntity(]]entity_list.GetPlayerForUserID(userid)--[[)]]
end

local function get_weapon(idx)
    if type(idx) == "string" then
        return weapons_index[idx]
    elseif type(idx) == "number" then
        idx = bit.band(idx, 0xFFFF)
        return rawget(weapons, idx)
    end
end

local function say(text)
    local str = string.format("say \"%s\"", text)
    client.ExecuteClientCmd(str)
end

local settings = {}
settings.poses = {
    ["Default"] = {
        text = "nice {wep} config retard",
        hs_text = "nice antiaim bro"
    },
    ["PalaceInterior"] = {
        text = "sit u little palace saving tranny",
        hs_text = "get headshot u little palace saving tranny"
    },
    ["Apartment"] = {
        text = "{name} tried to hide in house, hh",
        hs_text = "hey, {name}, {wep} didn't help to hide, yep?"
    },
    ["Apartments"] = {
        text = "{name} tried to hide in house, hh",
        hs_text = "hey, {name}, {wep} didn't help to hide, yep?"
    },
    ["LeftAlley"] = {
        text = "there was a star between us",
        hs_text = "star between us just got 1`ed you"
    },
    ["BackAlley"] = {
        text = "there was a star between us",
        hs_text = "star between us just got 1`ed you"
    },
    ["BombsiteB"] = {
        text = "hey, {name}, don't fucking sit on B",
        hs_text = "haha, got 1 while sitting on B with {wep}, you sell?"
    },
    ["BombsiteA"] = {
        text = "hey, {name}, don't fucking sit on A",
        hs_text = "haha, got 1 while sitting on A with {wep}, you sell?"
    },
    ["Stairwell"] = {
        text = "nice fall from the stairs",
        hs_text = "oh, that's 1 on my stairs"
    },
    ["Stairs"] = {
        text = "nice fall from the stairs",
        hs_text = "oh, that's 1 on my stairs"
    },
    ["SideHall"] = {
        text = "{name}, don't try to sit in hall",
        hs_text = "oh, that's 1 on my hall"
    },
    ["MainHall"] = {
        text = "never gonna give you up",
        hs_text = "did you try to kill me with {wep}? LOL"
    },
    ["TSpawn"] = {
        text = "yep, try to hide on t spawn",
        hs_text = "sorry, but there is no god on t spawn"
    },
    ["CTSpawn"] = {
        text = "yep, try to hide on ct spawn",
        hs_text = "sorry, but there is no god on ct spawn"
    },
    ["BackEntrance"] = {
        text = "hey, bitch, get out the way, bitch",
        hs_text = "did you came to get 1?"
    },
    ["Overpass"] = {
        text = "get down, mtf",
        hs_text = "nice 1"
    },
    ["Back"] = {
        text = "nice scared to go inside",
        hs_text = "{name} is trying to hide, what a shame"
    },
    ["FrontEntrance"] = {
        text = "why did you get {wep}? to die?",
        hs_text = "came to get 1, hh"
    },
    ["Tunnel"] = {
        text = "died in tunnel like a turtle?",
        hs_text = "turtle has been destroyed"
    },
    ["UpperTunnel"] = {
        text = "died in tunnel like a turtle?",
        hs_text = "turtle has been destroyed"
    },
    ["LowerTunnel"] = {
        text = "died in tunnel like a turtle?",
        hs_text = "turtle has been destroyed"
    },
    ["LongHall"] = {
        text = "did you know you need to move?",
        hs_text = "come to me, my baby"
    },
    ["Middle"] = {
        text = "idiot on middle has been destroyed",
        hs_text = "i'm freaking 1 machine"
    },
    ["TicketBooth"] = {
        text = "{name}, come to me, my dear",
        hs_text = "{name}, don't waste money on {wep}"
    },
    ["TRamp"] = {
        text = "here comes the rampage on a ramp",
        hs_text = "hey, {name}, don't make it bad, Take a sad {wep} cfg and make it better"
    },
    ["Scaffolding"] = {
        text = "did you really come to die?",
        hs_text = "came and got 1, haha"
    },
    ["Jungle"] = {
        text = "Is it Vietnam? So why are in jugles?",
        hs_text = "And he told me: 'Johnny! I can't feel my legs"
    },
    ["Connector"] = {
        text = "You just got disconnected",
        hs_text = "{name} is expecting connection errors"
    },
    ["PalaceAlley"] = {
        text = "get back to your freaking Mexico",
        hs_text = "backtracked to Mexico, again"
    },
    ["SnipersNest"] = {
        text = "and here comes the hax",
        hs_text = "once, it will be just a bad dream for you"
    },
    ["Shop"] = {
        text = "{name}, what did you do in shop? Tried to buy new cfg?",
        hs_text = "{name}, did you buy {wep} in that shop? xD"
    },
    ["CatWalk"] = {
        text = "walking like a real cat, {name}",
        hs_text = "what did you want to do with {wep}? die?"
    }
}

settings.weapons = {
    ["g3sg1"] = "auto",
    ["scar-20"] = "auto",
    ["r8 revolver"] = "r8",
    ["ssg 08"] = "scout",
    ["dual berettas"] = "dualies",
    ["glock-18"] = "glock",
    ["molotov"] = "brain",
    ["flashbang"] = "brain",
    ["smokegrenade"] = "brain",
    ["c4"] = "allakh"
}

settings.phrases = {
    ["Weapon based"] = {
        baim = { "nice {wep} config retard" },
        hs = { "nice {wep} config retard" },
    },
}


settings.presets = {
    ["Position based"] = function(victim, attacker, headshot, callout)
        local cur = settings.poses[callout] or settings.poses["Default"]
        local text = (hs_announce and headshot) and cur.hs_text or cur.text or "I'm just a fag, didn't add phrase to killsay"
        return text
    end
}

for k,v in pairs(settings.phrases) do
    settings.presets[k] = function(victim, attacker, headshot, callout)
        local tbl = (hs_announce and headshot) and v.hs or (v.baim or v)
        return tbl[math.random(#tbl)]
    end
end

local collected = collect_keys(settings.presets)

settings.menu = {
    types = Menu.Combo("Global", "Preset"collected, 0, "Style of killsay"),
}

local function UpdateWeapons()
    for idx = 1, globals.maxClients + 1 do
        local ply = entity_list.GetClientEntity(idx)
        if ply and ply:IsPlayer() then
            local ply_obj = ply:GetPlayer()
            local health = ply_obj:GetProp("DT_BasePlayer", "m_iHealth")
            if (health > 0) then
                local wep = ply_obj:GetProp("DT_BaseCombatCharacter", "m_hActiveWeapon")
                if wep then
                    local wep_obj = entity_list.GetClientEntityFromHandle(wep)
                    if wep_obj then
                        local active_idx = wep_obj:GetProp("DT_BaseAttributableItem", "m_iItemDefinitionIndex")
                        local weapon_data = get_weapon(active_idx)
                        if weapon_data then
                            local weapon_name = string.lower(weapon_data.name or "dildo")
                            weapon_name = settings.weapons[weapon_name] or weapon_name
                            cached_weapons[ply:EntIndex()] = weapon_name
                        end
                    end
                end
            end
        end
    end
end

local events = {
    ["player_death"] = function(event)
        local victim = UserIDToEnt(event:GetInt("userid", -1))
        local attacker = UserIDToEnt(event:GetInt("attacker", -1))
        local localplayer = client.GetLocalPlayer()
        if not attacker or attacker:EntIndex() ~= localplayer or victim == attacker then return end

        local mode = collected[ settings.menu.types:GetInt() + 1 ]
        local preset = settings.presets[ mode ]
        if not preset then return end
        local ply = victim:GetPlayer()
        local name, hs, place, weapon = ply:GetName(), event:GetBool("headshot", false), victim:GetProp("DT_BasePlayer", "m_szLastPlaceName"), (cached_weapons[victim:EntIndex()] or "auto")
        name = name:gsub("'", ""):gsub(";", "") -- prevent exploit, lol
        local text = preset(victim, attacker, hs, place)
        text = text:gsub("{wep}", weapon):gsub("{name}", name)
        say(text)
    end,
    ["item_pickup"] = UpdateWeapons,
    ["weapon_reload"] = UpdateWeapons
}



Cheat.RegisterCallback("events", function(event)
    if not events[event:GetName()] then return end
    events[event:GetName()](event)
end)

Cheat.RegisterCallback("ragebot_shot", UpdateWeapons)
бро, слово "помогите" не имеет смысл слова "сделайте"
 
Последнее редактирование:
Сверху Снизу