axcord.ws
-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Всем привет. Сразу начну с этого: "Я знаю, что в моих локациях, есть локации которые очень трудно будет применить не умерев".
Бегал я со слитым хелпером на неверлуз и решил для себя, что стандартных лок маловато, по этому я решил ещё свои туда заебашить.
Это локации онли на мираж. +Нашел в паблике какие-то пиздатые локации на de_overpass.
Если у кого нет хелпера, вот вам ещё и хелпер.
Спидран по моим локам:
Если у кого то остались вопросы, то мой дискорд: august#6530
Бегал я со слитым хелпером на неверлуз и решил для себя, что стандартных лок маловато, по этому я решил ещё свои туда заебашить.
Это локации онли на мираж. +Нашел в паблике какие-то пиздатые локации на de_overpass.
Если у кого нет хелпера, вот вам ещё и хелпер.
Спидран по моим локам:
Мои локации:
["1656619340974"] = {
pos = Vector.new(563.00103759766, -1472.0202636719, -255.98268127441),
map = "de_mirage",
type = "46",
["Top Palace "] = {
ang = QAngle.new(-19.922361373901, 41.656642913818, 0.0),
runduration = 0,
jumpduration = 0,
speed = 450,
duck = false,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1656619746774"] = {
pos = Vector.new(-375.98587036133, -1528.0291748047, -163.96875),
map = "de_mirage",
type = "46",
["Under Tetris"] = {
ang = QAngle.new(3.2708225250244, -4.7482266426086, 0.0),
runduration = 4,
jumpduration = 0,
speed = 450,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 1,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1656620512550"] = {
pos = Vector.new(-496.04656982422, -1309.0390625, -159.96875),
map = "de_mirage",
type = "46",
["Jungle"] = {
ang = QAngle.new(-5.8478336334229, -152.93508911133, 0.0),
runduration = 6,
jumpduration = 0,
speed = 450,
duck = false,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1656620652790"] = {
pos = Vector.new(181.9853515625, -1717.9731445312, -167.96875),
map = "de_mirage",
type = "46",
["Jungle"] = {
ang = QAngle.new(-15.065578460693, 165.05220031738, 0.0),
runduration = 6,
jumpduration = 0,
speed = 450,
duck = true,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 1,
backupdirection = 2,
backupduration = 1,
extendforward = true,
},
},
["1656620755880"] = {
pos = Vector.new(-114.03125, -2387.96875, -164.37435913086),
map = "de_mirage",
type = "46",
["Jungle"] = {
ang = QAngle.new(-14.272590637207, 129.5103302002, 0.0),
runduration = 7,
jumpduration = 17,
speed = 450,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 0,
extendforward = false,
},
},
["1656620777234"] = {
pos = Vector.new(460.95233154297, -1520.0344238281, -242.44981384277),
map = "de_mirage",
type = "46",
["Stairs"] = {
ang = QAngle.new(-21.607002258301, -178.74566650391, 0.0),
runduration = 0,
jumpduration = 0,
speed = 450,
duck = false,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1656620841502"] = {
pos = Vector.new(491.43087768555, -1707.9816894531, -257.68060302734),
map = "de_mirage",
type = "46",
["On Tetris"] = {
ang = QAngle.new(-15.461809158325, 146.06828308105, 0.0),
runduration = 11,
jumpduration = 15,
speed = 450,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1656621105076"] = {
pos = Vector.new(560.41906738281, -1272.0153808594, -244.68632507324),
map = "de_mirage",
type = "46",
["Palace"] = {
ang = QAngle.new(-20.615863800049, 1.5980712175369, 0.0),
runduration = 0,
jumpduration = 0,
speed = 450,
duck = false,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1656621175672"] = {
pos = Vector.new(1005.5775146484, -1032.03125, -256.14361572266),
map = "de_mirage",
type = "46",
["In Palace"] = {
ang = QAngle.new(-12.488389015198, -37.55260848999, 0.0),
runduration = 14,
jumpduration = 0,
speed = 450,
duck = false,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1656621529708"] = {
pos = Vector.new(219.82336425781, -1585.9516601562, -175.96875),
map = "de_mirage",
type = "46",
["Top Palace"] = {
ang = QAngle.new(-21.111267089844, -88.1875, 0.0),
runduration = 24,
jumpduration = 24,
speed = 390,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 3,
backupdirection = 0,
backupduration = 1,
extendforward = true,
},
},
["1656621567891"] = {
pos = Vector.new(736.84552001953, -1235.9438476562, -262.53610229492),
map = "de_mirage",
type = "46",
["Boost"] = {
ang = QAngle.new(-26.95911026001, 46.014949798584, 0.0),
runduration = 0,
jumpduration = 0,
speed = 450,
duck = false,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1656621613051"] = {
pos = Vector.new(1135.1175537109, -937.53460693359, -261.90606689453),
map = "de_mirage",
type = "46",
["Push"] = {
ang = QAngle.new(-21.805109024048, -132.38053894043, 0.0),
runduration = 0,
jumpduration = 0,
speed = 450,
duck = false,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1656621652002"] = {
pos = Vector.new(1262.1232910156, -813.06512451172, -143.96875),
map = "de_mirage",
type = "44",
["Pit | Best Damage"] = {
ang = QAngle.new(-5.3519358634949, -133.86703491211, 0.0),
runduration = 0,
jumpduration = 0,
speed = 450,
duck = false,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1656621695898"] = {
pos = Vector.new(1064.4173583984, -1409.3718261719, -167.96875),
map = "de_mirage",
type = "46",
["Camping"] = {
ang = QAngle.new(-23.886478424072, -126.73023986816, 0.0),
runduration = 0,
jumpduration = 0,
speed = 450,
duck = false,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1656621719085"] = {
pos = Vector.new(1360.0823974609, -1311.6928710938, -167.96875),
map = "de_mirage",
type = "46",
["Push"] = {
ang = QAngle.new(-13.181991577148, -128.6134185791, 0.0),
runduration = 0,
jumpduration = 0,
speed = 450,
duck = false,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1656621745867"] = {
pos = Vector.new(1412.5968017578, 49.922355651855, -113.33320617676),
map = "de_mirage",
type = "46",
["Tv Push"] = {
ang = QAngle.new(-14.668739318848, 138.81254577637, 0.0),
runduration = 0,
jumpduration = 0,
speed = 450,
duck = false,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1656621895431"] = {
pos = Vector.new(325.53598022461, -2185.6599121094, -39.96875),
map = "de_mirage",
type = "46",
["Between"] = {
ang = QAngle.new(8.2209749221802, 42.546920776367, 0.0),
runduration = 3,
jumpduration = 3,
speed = 450,
duck = true,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1656621952407"] = {
pos = Vector.new(325.53610229492, -2185.6599121094, -39.96875),
map = "de_mirage",
type = "46",
["Palace Push | From T"] = {
ang = QAngle.new(-19.234008789062, 40.961048126221, 0.0),
runduration = 7,
jumpduration = 2,
speed = 0,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 0,
extendforward = false,
},
},
["1656622243684"] = {
pos = Vector.new(-34.046703338623, -1846.1242675781, -167.96875),
map = "de_mirage",
type = "46",
["Under Stairs"] = {
ang = QAngle.new(7.9291610717773, 144.76773071289, 0.0),
runduration = 30,
jumpduration = 25,
speed = 450,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 3,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1656622724396"] = {
pos = Vector.new(-496.00082397461, -1328.6918945312, -159.96875),
map = "de_mirage",
type = "46",
["Under Stairs"] = {
ang = QAngle.new(-0.39629286527634, 90.725486755371, 0.0),
runduration = 1,
jumpduration = 1,
speed = 450,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 5,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1656622805813"] = {
pos = Vector.new(-666.11724853516, -1318.5911865234, -167.96875),
map = "de_mirage",
type = "46",
["Palace"] = {
ang = QAngle.new(-20.318441390991, -51.207763671875, 0.0),
runduration = 11,
jumpduration = 0,
speed = 450,
duck = false,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1656622868662"] = {
pos = Vector.new(-666.10516357422, -1318.5853271484, -167.96875),
map = "de_mirage",
type = "44",
["Palce"] = {
ang = QAngle.new(-20.417530059814, -51.406116485596, 0.0),
runduration = 11,
jumpduration = 0,
speed = 450,
duck = false,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1656622944678"] = {
pos = Vector.new(-511.01028442383, -1949.4190673828, -179.96875),
map = "de_mirage",
type = "46",
["In Palace"] = {
ang = QAngle.new(-17.344955444336, -22.959987640381, 0.0),
runduration = 13,
jumpduration = 15,
speed = 450,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 1,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1656623059821"] = {
pos = Vector.new(639.88293457031, -1227.8538818359, -258.67837524414),
map = "de_mirage",
type = "46",
["Palace"] = {
ang = QAngle.new(-25.670637130737, 28.877330780029, 0.0),
runduration = 55,
jumpduration = 5,
speed = 450,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1656623163818"] = {
pos = Vector.new(-1275.9830322266, -1526.96875, -148.53576660156),
map = "de_mirage",
type = "46",
["Name"] = {
ang = QAngle.new(13.479902267456, 49.617305755615, 0.0),
runduration = 6,
jumpduration = 2,
speed = 450,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1656623252069"] = {
pos = Vector.new(-1120.03125, -1147.1882324219, -167.96875),
map = "de_mirage",
type = "46",
["Push"] = {
ang = QAngle.new(17.24627494812, -153.17291259766, 0.0),
runduration = 2,
jumpduration = 1,
speed = 300,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1656623278187"] = {
pos = Vector.new(-1120.0222167969, -845.27459716797, -167.96875),
map = "de_mirage",
type = "46",
["Under Windows"] = {
ang = QAngle.new(-16.948532104492, 136.55401611328, 0.0),
runduration = 0,
jumpduration = 0,
speed = 0,
duck = true,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 0,
extendforward = false,
},
},
["1656623801475"] = {
pos = Vector.new(-2411.9792480469, -247.98249816895, -164.73988342285),
map = "de_mirage",
type = "46",
["Apps"] = {
ang = QAngle.new(5.9000000953674, 54.300361633301, 0.0),
runduration = 9,
jumpduration = 32,
speed = 380,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 1,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1656623900223"] = {
pos = Vector.new(-2577.2377929688, 104.00346374512, -161.95674133301),
map = "de_mirage",
type = "46",
["Apps"] = {
ang = QAngle.new(4, 45.504241943359, 0.0),
runduration = 11,
jumpduration = 6,
speed = 300,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1656623975150"] = {
pos = Vector.new(-2250.3227539062, 810.69024658203, -121.52648162842),
map = "de_mirage",
type = "46",
["Apps"] = {
ang = QAngle.new(-17.543169021606, -6.5437259674072, 0.0),
runduration = 0,
jumpduration = 0,
speed = 0,
duck = true,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 0,
extendforward = false,
},
},
["1656623992380"] = {
pos = Vector.new(-2325.2275390625, 812.04510498047, -119.78088378906),
map = "de_mirage",
type = "46",
["Kitchen"] = {
ang = QAngle.new(-13.677659988403, -90.19718170166, 0.0),
runduration = 0,
jumpduration = 0,
speed = 450,
duck = false,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1656624048119"] = {
pos = Vector.new(-2263.5698242188, 819.15600585938, -119.20454406738),
map = "de_mirage",
type = "46",
["Windows"] = {
ang = QAngle.new(-18.534301757812, -72.752876281738, 0.0),
runduration = 0,
jumpduration = 0,
speed = 450,
duck = true,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1656624091368"] = {
pos = Vector.new(-2205.0358886719, 803.79388427734, -124.84404754639),
map = "de_mirage",
type = "46",
["B Push"] = {
ang = QAngle.new(17.345491409302, -33.900001525879, 0.0),
runduration = 0,
jumpduration = 0,
speed = 0,
duck = true,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "Custom",
movedirection = 0,
backupdirection = 0,
backupduration = 0,
extendforward = false,
},
},
Локации на de_overpass:
["1620664291357"] =
{
pos = Vector.new(-1368.4357910156, -840.76293945312, 17.266700744629),
map = "de_overpass",
type = "44",
["Pillar"] =
{
ang = QAngle.new(-9.8999996185303, 69, 0.0),
runduration = 6,
jumpduration = 8,
speed = 54.5,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1620664550868"] =
{
pos = Vector.new(-1183.8845214844, -638.96875, 55.19563293457),
map = "de_overpass",
type = "44",
["Pillar"] =
{
ang = QAngle.new(-32.769920349121, 76.65552520752, 0.0),
runduration = 0,
jumpduration = 21,
speed = 0,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 0,
backupdirection = 0,
backupduration = 0,
extendforward = false,
},
},
["1620664839444"] =
{
pos = Vector.new(-1152.3636474609, -594.73272705078, 68.628746032715),
map = "de_overpass",
type = "44",
["Rayzen"] =
{
ang = QAngle.new(12.39999961853, 97.660720825195, 0.0),
runduration = 29,
jumpduration = 0,
speed = 450,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 3,
backupdirection = 3,
backupduration = 18,
extendforward = false,
},
},
["1620665188667"] =
{
pos = Vector.new(-1204.6713867188, -519.24078369141, 49.364593505859),
map = "de_overpass",
type = "46",
["Rayzen"] =
{
ang = QAngle.new(-22.200000762939, -63, 0.0),
runduration = 10,
jumpduration = 0,
speed = 450,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 3,
description = "",
movedirection = 0,
backupdirection = 2,
backupduration = 13,
extendforward = false,
},
},
["1620665282319"] =
{
pos = Vector.new(-1133.1610107422, -638.95172119141, 80.557052612305),
map = "de_overpass",
type = "46",
["Barrels"] =
{
ang = QAngle.new(-18.799907684326, 81.811279296875, 0.0),
runduration = 0,
jumpduration = 18,
speed = 0,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 0,
backupdirection = 0,
backupduration = 0,
extendforward = false,
},
},
["1620665398628"] =
{
pos = Vector.new(-869.78771972656, -578.77752685547, 96.03125),
map = "de_overpass",
type = "44",
["Barrels"] =
{
ang = QAngle.new(-10.65980052948, 87.696578979492, 0.0),
runduration = 0,
jumpduration = 0,
speed = 450,
duck = false,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1620665525214"] =
{
pos = Vector.new(-868.82934570312, -552.47064208984, 96.03125),
map = "de_overpass",
type = "44",
["Pillar"] =
{
ang = QAngle.new(-33.700000762939, 103.75663757324, 0.0),
runduration = 1,
jumpduration = 0,
speed = 79.400001525879,
duck = false,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 0,
backupdirection = 0,
backupduration = 19,
extendforward = false,
},
},
["1620668868926"] =
{
pos = Vector.new(-1343.7780761719, -991.12719726562, 6.7519760131836),
map = "de_overpass",
type = "46",
["Pillar+Water"] =
{
ang = QAngle.new(-22.274982452393, 72.465042114258, 0.0),
runduration = 0,
jumpduration = 0,
speed = 450,
duck = false,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1620668969095"] =
{
pos = Vector.new(-870.31707763672, -551.60687255859, 96.03125),
map = "de_overpass",
type = "46",
["Pillar+Water"] =
{
ang = QAngle.new(-31.844997406006, 103.09977722168, 0.0),
runduration = 0,
jumpduration = 0,
speed = 450,
duck = false,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1620669035590"] =
{
pos = Vector.new(-866.55267333984, -588.15533447266, 96.03125),
map = "de_overpass",
type = "46",
["Barrels+Pillar"] =
{
ang = QAngle.new(-7.8649978637695, 88.059829711914, 0.0),
runduration = 0,
jumpduration = 0,
speed = 450,
duck = false,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1620669572107"] =
{
pos = Vector.new(-1149.4549560547, -591.21075439453, 69.897789001465),
map = "de_overpass",
type = "46",
["Water[push]"] =
{
ang = QAngle.new(12.39999961853, 96, 0.0),
runduration = 38,
jumpduration = 0,
speed = 450,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 3,
backupdirection = 1,
backupduration = 8,
extendforward = true,
},
},
["1620670003177"] =
{
pos = Vector.new(-603.10797119141, -1208.1306152344, 96.100250244141),
map = "de_overpass",
type = "44",
["Barrels"] =
{
ang = QAngle.new(5.6104798316956, 96.800003051758, 0.0),
runduration = 18,
jumpduration = 0,
speed = 450,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 0,
backupdirection = 4,
backupduration = 15,
extendforward = false,
},
},
["1620670227032"] =
{
pos = Vector.new(-443.86584472656, -1198.0173339844, 45.238632202148),
map = "de_overpass",
type = "44",
["Pillar"] =
{
ang = QAngle.new(-19.799999237061, 107, 0.0),
runduration = 21,
jumpduration = 16,
speed = 450,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1620670391566"] =
{
pos = Vector.new(-552.22528076172, -1245.0556640625, 114.56275939941),
map = "de_overpass",
type = "44",
["Water"] =
{
ang = QAngle.new(5.6200160980225, 114.40000152588, 0.0),
runduration = 29,
jumpduration = 1,
speed = 450,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1620670677505"] =
{
pos = Vector.new(-1093.0859375, -529.01971435547, 94.807113647461),
map = "de_overpass",
type = "46",
["Underwater"] =
{
ang = QAngle.new(-9.8999996185303, -105.65022277832, 0.0),
runduration = 11,
jumpduration = 0,
speed = 450,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 0,
backupdirection = 0,
backupduration = 6,
extendforward = false,
},
},
["1620670812632"] =
{
pos = Vector.new(-1029.3851318359, -633.64410400391, 96.03125),
map = "de_overpass",
type = "44",
["Barrels"] =
{
ang = QAngle.new(-10.064931869507, 74.914726257324, 0.0),
runduration = 7,
jumpduration = 0,
speed = 450,
duck = false,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 0,
backupdirection = 3,
backupduration = 54,
extendforward = false,
},
},
["1620671199095"] =
{
pos = Vector.new(-1356.6899414062, -799.86499023438, 15.459613800049),
map = "de_overpass",
type = "46",
["Barrels"] =
{
ang = QAngle.new(-13.310069084167, 82.095062255859, 0.0),
runduration = 37,
jumpduration = 18,
speed = 450,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 3,
backupdirection = 3,
backupduration = 15,
extendforward = false,
},
},
["1620733701996"] =
{
pos = Vector.new(-1095.6713867188, -638.98590087891, 96.03125),
map = "de_overpass",
type = "46",
["Water"] =
{
ang = QAngle.new(-10, 92, 0.0),
runduration = 0,
jumpduration = 7,
speed = 450,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "SAFE",
movedirection = 0,
backupdirection = 3,
backupduration = 23,
extendforward = false,
},
},
["1620734106529"] =
{
pos = Vector.new(-1148.7637939453, -624.07971191406, 71.972564697266),
map = "de_overpass",
type = "44",
["Barrels"] =
{
ang = QAngle.new(2.5, 98.300003051758, 0.0),
runduration = 28,
jumpduration = 9,
speed = 450,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "DANGEROUS",
movedirection = 3,
backupdirection = 3,
backupduration = 40,
extendforward = false,
},
},
["1620735942942"] =
{
pos = Vector.new(-1348.7680664062, -834.15417480469, 13.218696594238),
map = "de_overpass",
type = "46",
["Water"] =
{
ang = QAngle.new(-13.39999961853, 93, 0.0),
runduration = 35,
jumpduration = 28,
speed = 450,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 3,
backupdirection = 1,
backupduration = 35,
extendforward = false,
},
},
["1620736629728"] =
{
pos = Vector.new(-1337.4339599609, -823.92071533203, 11.528617858887),
map = "de_overpass",
type = "44",
["Water"] =
{
ang = QAngle.new(-12.539958000183, 95.506736755371, 0.0),
runduration = 29,
jumpduration = 20,
speed = 450,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 3,
backupdirection = 1,
backupduration = 37,
extendforward = false,
},
},
["1620737009614"] =
{
pos = Vector.new(-1101.1047363281, -638.98577880859, 96.03125),
map = "de_overpass",
type = "44",
["Water"] =
{
ang = QAngle.new(-28.89999961853, 100.59999847412, 0.0),
runduration = 0,
jumpduration = 26,
speed = 0,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 0,
backupdirection = 0,
backupduration = 0,
extendforward = false,
},
},
["1620737134999"] =
{
pos = Vector.new(-869.02484130859, -449.10263061523, 96.03125),
map = "de_overpass",
type = "46",
["Gustello"] =
{
ang = QAngle.new(-5.3899784088135, 177, 0.0),
runduration = 0,
jumpduration = 9,
speed = 0,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 0,
backupdirection = 0,
backupduration = 0,
extendforward = false,
},
},
["1620737289943"] =
{
pos = Vector.new(-878.71148681641, -448.00213623047, 96.03125),
map = "de_overpass",
type = "46",
["ct-site"] =
{
ang = QAngle.new(-5.0500111579895, 156.73556518555, 0.0),
runduration = 0,
jumpduration = 9,
speed = 0,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 0,
backupdirection = 0,
backupduration = 0,
extendforward = false,
},
},
["1620737391018"] =
{
pos = Vector.new(-869.00744628906, -449.08013916016, 96.03125),
map = "de_overpass",
type = "44",
["Gustello"] =
{
ang = QAngle.new(-9.6000003814697, 176.69999694824, 0.0),
runduration = 0,
jumpduration = 12,
speed = 0,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 0,
backupdirection = 0,
backupduration = 0,
extendforward = false,
},
},["1620746936301"] =
{
pos = Vector.new(-1188.0769042969, -638.96875, 53.623321533203),
map = "de_overpass",
type = "46",
["Pillar+Water"] =
{
ang = QAngle.new(-24.10000038147, 79.400001525879, 0.0),
runduration = 0,
jumpduration = 14,
speed = 0,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "SAFE",
movedirection = 0,
backupdirection = 0,
backupduration = 0,
extendforward = false,
},
},
["1620747039554"] =
{
pos = Vector.new(-523.75506591797, -1068.5192871094, 32.674346923828),
map = "de_overpass",
type = "46",
["On-Shot Spot"] =
{
ang = QAngle.new(-26.079957962036, 126.25532531738, 0.0),
runduration = 0,
jumpduration = 0,
speed = 450,
duck = false,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1620747173355"] =
{
pos = Vector.new(-554.94952392578, -1155.0225830078, 64.743049621582),
map = "de_overpass",
type = "46",
["Water"] =
{
ang = QAngle.new(-22.200000762939, 116.30000305176, 0.0),
runduration = 3,
jumpduration = 0,
speed = 450,
duck = false,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1620747213151"] =
{
pos = Vector.new(-605.447265625, -1135.4267578125, 62.509704589844),
map = "de_overpass",
type = "46",
["Barrels"] =
{
ang = QAngle.new(-24.980045318604, 98.765274047852, 0.0),
runduration = 3,
jumpduration = 0,
speed = 450,
duck = false,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1620748323178"] =
{
pos = Vector.new(-1264.0987548828, -873.17034912109, 10.628875732422),
map = "de_overpass",
type = "46",
["Pillar+Water"] =
{
ang = QAngle.new(-25.529916763306, 74.933097839355, 0.0),
runduration = 0,
jumpduration = 0,
speed = 450,
duck = false,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
["1620748630140"] =
{
pos = Vector.new(-1787.5867919922, -1263.7058105469, 96.03125),
map = "de_overpass",
type = "46",
["Barrels"] =
{
ang = QAngle.new(9.8999996185303, 60.762996673584, 0.0),
runduration = 7,
jumpduration = 0,
speed = 450,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 6,
description = "",
movedirection = 0,
backupdirection = 2,
backupduration = 26,
extendforward = false,
},
},
["1620749045437"] =
{
pos = Vector.new(-1764.0732421875, -1288.4440917969, 96.03125),
map = "de_overpass",
type = "46",
["Rayzen"] =
{
ang = QAngle.new(11.39999961853, 48.607666015625, 0.0),
runduration = 24,
jumpduration = 0,
speed = 450,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 6,
description = "",
movedirection = 2,
backupdirection = 4,
backupduration = 42,
extendforward = true,
},
},
["1620749312613"] =
{
pos = Vector.new(-621.03247070312, -1384.7536621094, 144.97343444824),
map = "de_overpass",
type = "46",
["Barrels"] =
{
ang = QAngle.new(1, 110.94766998291, 0.0),
runduration = 44,
jumpduration = 4,
speed = 450,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 3,
backupdirection = 1,
backupduration = 64,
extendforward = true,
},
},
["1620749551089"] =
{
pos = Vector.new(-591.19512939453, -1410.9776611328, 144.66955566406),
map = "de_overpass",
type = "46",
["Water"] =
{
ang = QAngle.new(-12.39999961853, 125.5, 0.0),
runduration = 40,
jumpduration = 13,
speed = 450,
duck = false,
jump = true,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 3,
backupdirection = 1,
backupduration = 52,
extendforward = true,
},
},
["1620750673936"] =
{
pos = Vector.new(-797.65704345703, 50.21166229248, 86.85871887207),
map = "de_overpass",
type = "46",
["Underwater"] =
{
ang = QAngle.new(-11.92512512207, 123.55210113525, 0.0),
runduration = 15,
jumpduration = 0,
speed = 450,
duck = false,
jump = false,
strength = 1,
jumpthresthold = 0,
description = "",
movedirection = 0,
backupdirection = 0,
backupduration = 1,
extendforward = false,
},
},
Grenade Helper:
ffi.cdef[[
void* CreateFileA(
const char* lpFileName,
unsigned long dwDesiredAccess,
unsigned long dwShareMode,
unsigned long lpSecurityAttributes,
unsigned long dwCreationDisposition,
unsigned long dwFlagsAndAttributes,
void* hTemplateFile
);
bool ReadFile(
void* hFile,
char* lpBuffer,
unsigned long nNumberOfBytesToRead,
unsigned long* lpNumberOfBytesRead,
int lpOverlapped
);
bool WriteFile(
void* hFile,
char* lpBuffer,
unsigned long nNumberOfBytesToWrite,
unsigned long* lpNumberOfBytesWritten,
void* lpOverlapped
);
unsigned long GetFileSize(
void* hFile,
unsigned long* lpFileSizeHigh
);
bool CreateDirectoryA(
const char* lpPathName,
void* lpSecurityAttributes
);
void* CloseHandle(void *hFile);
typedef int(__fastcall* clantag_t)(const char*, const char*);
typedef struct _OVERLAPPED {
unsigned long* Internal;
unsigned long* InternalHigh;
union {
struct {
unsigned long Offset;
unsigned long OffsetHigh;
} DUMMYSTRUCTNAME;
void* Pointer;
} DUMMYUNIONNAME;
void* hEvent;
} OVERLAPPED, *LPOVERLAPPED;
typedef struct _class
{
void** this;
}aclass;
]]
ffi.C.CreateDirectoryA("nl\\GrenadeHelper", nil)
local font = Render.InitFont("Tahoma", 13)
local font_p = Render.InitFont("Smallest Pixel-7", 10)
local font_b = Render.InitFont("Tahoma bold", 12)
local menu_elements = {
autostrafe = Menu.FindVar("Miscellaneous", "Main", "Movement", "Auto Strafe"),
autostrafe_smooth = Menu.FindVar("Miscellaneous", "Main", "Movement", "Smoothing"),
thirdpeson = Menu.FindVar("Visuals", "View", "Thirdperson", "Enable Thirdperson"),
fake_angle = Menu.FindVar("Aimbot", "Anti Aim", "Fake Angle", "Enable Fake Angle"),
double_tap = Menu.FindVar("Aimbot", "Ragebot", "Exploits", "Double Tap"),
fakelag = Menu.FindVar("Aimbot", "Anti Aim", "Fake Lag", "Enable Fake Lag"),
}
local lua_elements = {
nade_helper = Menu.Switch("Grenade Helper", "Bind Key", false),
nade_helper_nades = Menu.MultiCombo("Grenade Helper", "Grenades", {"Hegrenade", "Molotov", "Smoke", "Flashbang"}, 0),
nade_helper_types = Menu.MultiCombo("Grenade Helper", "Presets", {"Standard", "locations #1", "locations #2", "locations #3"}, 0),
nade_helper_fov = Menu.SliderInt("Grenade Helper", "FOV", 15, 1, 160),
create_nade = Menu.Button("Locations Creator", "Create Location"),
nade_helper_theme = Menu.Combo("Color Settings", "Theme", {"Default", "Orange", "Blue", "White"}, 1),
yaw_slider = Menu.SliderFloat("Grenade Constructor", "Axis X", 0, -180, 180),
pitch_slider = Menu.SliderFloat("Grenade Constructor", "Axis Y", 0, -89, 89),
throw_strengh = Menu.SliderFloat("Grenade Constructor", "Throw Power", 100, 0, 100),
properties = Menu.MultiCombo("Grenade Constructor", "Properies", {"Run", "Jump", "Duck"}, 0),
run_duration = Menu.SliderInt("Grenade Constructor", "Run Duration", 0, 0, 64),
run_velocity = Menu.SliderFloat("Grenade Constructor", "Run Velocity", 0, 0, 450),
run_direction = Menu.Combo("Grenade Constructor", "Run Direction", {"Forward", "Backward", "Left", "Right"}, 0),
extend_forward_strenght = Menu.Switch("Grenade Constructor", "Extern Forward Strength", false),
backup_direction = Menu.Combo("Grenade Constructor", "Backup Direction", {"None", "Forward", "Backward", "Left", "Right"}, 0),
backup_strafe_duration = Menu.SliderInt("Grenade Constructor", "Backup Duration", 1, 1, 64),
jump_duration = Menu.SliderInt("Grenade Constructor", "Delay", 0, 0, 64),
jump_thresthold = Menu.SliderInt("Grenade Constructor", "Jump Strength", 0, 0, 6),
nade_name = Menu.TextBox("Grenade Constructor", "Position Name", 128, "", "This will be the name of your location"),
nade_description = Menu.TextBox("Grenade Constructor", "Description", 128, "", "Here you can write where the grenade will fly, how it throws, and much more"),
nade_teleport = Menu.Button("Grenade Constructor", "Teleport to Location"),
nade_update_pos_ang = Menu.Button("Grenade Constructor", "Set new Location"),
save_nade_cfg = Menu.Combo("Grenade Constructor", "Save At", { "locations #1", "locations #2", "locations #3"}, 0),
save_nade = Menu.Button("Grenade Constructor", "Confirm"),
remove_nade = Menu.Button("Grenade Constructor", "Cancel"),
user_name = Cheat.GetCheatUserName(),
screensize = EngineClient.GetScreenSize(),
}
local ragebot_helpers = {
DisableTargets = function(self)
for i = 1, 64 do
ragebot.IgnoreTarget(i)
end
end,
ForceHead = function(self, index)
for i = 1, 64 do
if(i ~= index) then
ragebot.IgnoreTarget(i)
else
for j = 2, 18 do
ragebot.EnableHitbox(i, j, false)
end
end
end
end,
}
local math_helpers = {
normalizeangles = function(self, ang)
if(ang.pitch > 180.0) then ang.pitch = ang.pitch - 360.0 end
if(ang.yaw > 180.0) then ang.yaw = ang.yaw - 360.0 end
return ang
end,
normalizefloat = function(self, ang)
if(ang > 180.0) then ang = ang - 360.0 end
if(ang < -180.0) then ang = ang + 360.0 end
return ang
end,
calcangle = function(self, src, dst)
local vecdelta = Vector.new(dst.x - src.x, dst.y - src.y, dst.z - src.z)
local angles = QAngle.new(math.atan2(-vecdelta.z, vecdelta:Length2D()) * 180.0 / math.pi, (math.atan2(vecdelta.y, vecdelta.x) * 180.0 / math.pi), 0.0)
return angles
end,
lerp = function(self, start, vend, time)
return start + (vend - start) * time
end,
clamp = function(self, val, min, max)
if(val > max) then
val = max
elseif(val < min) then
val = min
end
return val
end,
pointinscreen = function(self, point)
if(point.x > 0 and point.x < lua_elements.screensize.x and point.y > 0 and point.y < lua_elements.screensize.x) then
return true
else
return false
end
end,
boxinscreen = function(self, max, min)
if(min.x > 0 and min.x < lua_elements.screensize.x and min.y > 0 and max.y < lua_elements.screensize.x and max.x > 0 and max.x < lua_elements.screensize.x and max.y > 0 and max.y < lua_elements.screensize.x) then
return true
else
return false
end
end,
TIME_TO_TICKS = function(self, time)
return math.floor(time / GlobalVars.interval_per_tick + 0.5)
end,
TICKS_TO_TIME = function(self, tick)
return tick * GlobalVars.interval_per_tick
end,
}
local target_selection = {
distance = function(self, localplayer)
local origin = localplayer:GetProp("DT_BaseEntity", "m_vecOrigin")
local bestdistance = 8192.0
local bestplayer = nil
for i = 1, 64 do
local player = EntityList.GetClientEntity(i)
if(player == nil) then goto continue end
player = player:GetPlayer()
if(player:IsTeamMate() == true or player:m_lifeState() == 0 or player:IsDormant() == true) then goto continue end
local distance = origin:DistTo(player:GetProp("DT_BaseEntity", "m_vecOrigin"))
if(distance < bestdistance) then
bestdistance = distance
bestplayer = player
end
::continue::
end
return bestplayer
end,
fov = function(self)
end,
}
local movement_helper = {
--icon = Render.LoadImageFromFile("nl/image.png", Vector2.new(32, 32)),
in_run = false,
closest_spot = nil,
render_stuff = {},
cmd_number = 1,
init_size = Vector2.new(36, 36),
--movement_list = nil
on_draw = function(self)
local localplayer = EntityList.GetClientEntity(EngineClient.GetLocalPlayer())
if(localplayer == nil) then return end
localplayer = localplayer:GetPlayer()
local weapon = localplayer:GetActiveWeapon()
if(weapon == nil) then return end
local isknife = weapon:IsKnife()
local map = EngineClient.GetLevelNameShort()
local origin = localplayer:GetProp("DT_BaseEntity", "m_vecOrigin")
local eyepos = localplayer:GetEyePosition()
local movement_size = Render.CalcTextSize("movement", 12)
local bestdistance = 200.0
if(self.in_run == false) then self.closest_spot = nil end
for startname, startspot in pairs(self.movement_list) do
if(startspot.map == map and isknife == true) then
local distance = #(startspot.pos - origin)
if(distance < bestdistance) then
distance = bestdistance
if(self.in_run == false) then self.closest_spot = startspot end
end
end
end
for startname, startspot in pairs(self.movement_list) do
if(startspot.map == map) then
if(self.render_stuff[startname] == nil) then self.render_stuff[startname] = {} end
if(self.render_stuff[startname].global_alpha == nil) then self.render_stuff[startname].global_alpha = 0.0 end
if(self.render_stuff[startname].box_length == nil) then self.render_stuff[startname].box_length = self.init_size.x end
if(self.render_stuff[startname].box_height == nil) then self.render_stuff[startname].box_height = self.init_size.y end
if(self.render_stuff[startname].text_alpha == nil) then self.render_stuff[startname].text_alpha = 0.0 end
local distance = #(startspot.pos - origin)
local trace = EngineTrace.TraceRay(eyepos, startspot.pos, localplayer, 0x200400B)
local name_size = Render.CalcTextSize(startspot.name, 12)
local length = math.max(name_size.x, movement_size.x) + self.init_size.x + 8
if(trace.fraction > 0.96) then
self.render_stuff[startname].global_alpha = 1.0
if(distance <= 250.0) then
self.render_stuff[startname].box_length = math_helpers:lerp(self.render_stuff[startname].box_length, length, GlobalVars.frametime * 15.0)
if(math.abs(length - self.render_stuff[startname].box_length) < 1) then
self.render_stuff[startname].text_alpha = math_helpers:lerp(self.render_stuff[startname].text_alpha, 1.0, GlobalVars.frametime * 15.0)
end
else
self.render_stuff[startname].text_alpha = math_helpers:lerp(self.render_stuff[startname].text_alpha, 0.0, GlobalVars.frametime * 15.0)
if(self.render_stuff[startname].text_alpha < 0.01) then
self.render_stuff[startname].box_length = math_helpers:lerp(self.render_stuff[startname].box_length, self.init_size.x, GlobalVars.frametime * 15.0)
end
end
else
self.render_stuff[startname].text_alpha = math_helpers:lerp(self.render_stuff[startname].text_alpha, 0.0, GlobalVars.frametime * 15.0)
if(self.render_stuff[startname].text_alpha < 0.01) then
self.render_stuff[startname].box_length = math_helpers:lerp(self.render_stuff[startname].box_length, self.init_size.x, GlobalVars.frametime * 15.0)
if(math.abs(self.init_size.x - self.render_stuff[startname].box_length) < 1) then
self.render_stuff[startname].global_alpha = 0.0
end
end
end
if(isknife == false or self.render_stuff[startname].global_alpha == 0.0) then goto continue end
local screenpos = Render.WorldToScreen(Vector.new(startspot.pos.x, startspot.pos.y, startspot.pos.z + 16.0))
Render.BoxFilled(Vector2.new(screenpos.x - self.render_stuff[startname].box_length / 2, screenpos.y - self.render_stuff[startname].box_height / 2), Vector2.new(screenpos.x + self.render_stuff[startname].box_length / 2, screenpos.y + self.render_stuff[startname].box_height / 2), Color.new(0.1, 0.1, 0.1, self.render_stuff[startname].global_alpha))
--Render.Image(self.icon, Vector2.new(screenpos.x - self.render_stuff[startname].box_length / 2 + 2, screenpos.y - self.render_stuff[startname].box_height / 2 + 2), Vector2.new(32, 32))
Render.Text("Movement", Vector2.new(screenpos.x - self.render_stuff[startname].box_length / 2 + self.init_size.x + 3, screenpos.y - self.render_stuff[startname].box_height / 2 + 4), Color.new(1.0, 1.0, 1.0, self.render_stuff[startname].text_alpha), 16, font)
Render.Text(startspot.name, Vector2.new(screenpos.x - self.render_stuff[startname].box_length / 2 + self.init_size.x + 4, screenpos.y + self.render_stuff[startname].box_height / 2 - 4 - name_size.y), Color.new(1.0, 1.0, 1.0, self.render_stuff[startname].text_alpha), 15, font)
end
::continue::
end
end,
on_prediction = function(self, cmd)
local localplayer = EntityList.GetClientEntity(EngineClient.GetLocalPlayer())
if(localplayer == nil or self.closest_spot == nil) then return end
localplayer = localplayer:GetPlayer()
local origin = localplayer:GetProp("DT_BaseEntity", "m_vecOrigin")
local vecdelta = (self.closest_spot.pos - origin)
local distance = #vecdelta
local v1 = bit.band(cmd.buttons, 8) == 8
local v2 = bit.band(cmd.buttons, 16) == 16
local v3 = bit.band(cmd.buttons, 512) == 512
local v4 = bit.band(cmd.buttons, 1024) == 1024
local in_move = (v1 or v2 or v3 or v4)
if(in_move == false and self.in_run == false) then
if(distance > 0.01) then
local viewangles = EngineClient.GetViewAngles()
local direction = Cheat.VectorToAngle(vecdelta)
direction.yaw = viewangles.yaw - direction.yaw
local move = Cheat.AngleToForward(direction)
cmd.forwardmove = move.x * (450.0 * (math.exp(math_helpers:clamp(distance, 0.0, 5.0) - 5.0)) - 2.0)
cmd.sidemove = move.y * (450.0 * (math.exp(math_helpers:clamp(distance, 0.0, 5.0) - 5.0)) - 2.0)
else
self.in_run = true
self.cmd_number = 1
end
end
end,
on_createmove = function(self, cmd)
if(self.in_run == true) then
cmd.buttons = self.closest_spot[self.cmd_number].bb
cmd.forwardmove = self.closest_spot[self.cmd_number].fwd
cmd.sidemove = self.closest_spot[self.cmd_number].sd
cmd.viewangles.pitch = self.closest_spot[self.cmd_number].pitch
cmd.viewangles.yaw = self.closest_spot[self.cmd_number].yaw
cmd.weaponselect = self.closest_spot[self.cmd_number].wpnslt
self.cmd_number = self.cmd_number + 1
if(self.cmd_number > #self.closest_spot) then
self.in_run = false
end
end
end,
}
local grenade_helper = {
maps = loadstring("return {" .. Http.Get("Https://pastebin.com/raw/TiUZPQwD") .. "}")(),
custom_maps = {},
nade_type =
{
["44"] = "HeGrenade",
["46"] = "Molotov",
["45"] = "Smoke",
["43"] = "FlashBang",
},
menu_nades =
{
["44"] = 1,
["46"] = 2,
["45"] = 3,
["43"] = 4,
},
theme_colors =
{
[0] = --default
{
body_r = 17/255, -- box behind the text
body_g = 16/255,
body_b = 14/255,
target_r = 17/255, -- box (air) behind the text
target_g = 16/266,
target_b = 14/255,
text_color_r = 104/255, -- text
text_color_g = 93/255,
text_color_b = 140/255,
},
[1] = --orange
{
body_r = 17/255, -- box behind the text
body_g = 16/255,
body_b = 14/255,
target_r = 17/255, -- box (air) behind the text
target_g = 16/266,
target_b = 14/255,
text_color_r = 155/255,
text_color_g = 105/255,
text_color_b = 77/255,
},
[2] = --blue
{
body_r = 17/255, -- box behind the text
body_g = 16/255,
body_b = 14/255,
target_r = 17/255, -- box (air) behind the text
target_g = 16/266,
target_b = 14/255,
text_color_r = 77/255,
text_color_g = 91/255,
text_color_b = 155/255,
},
[3] = --white
{
body_r = 17/255, -- box behind the text
body_g = 16/255,
body_b = 14/255,
target_r = 17/255, -- box (air) behind the text
target_g = 16/266,
target_b = 14/255,
text_color_r = 175/255,
text_color_g = 175/255,
text_color_b = 175/255,
},
},
config_names =
{
"locations #1",
"locations #2",
"locations #3",
},
movedirections =
{
[0] = 0,
[1] = 180,
[2] = 90,
[3] = -90,
},
closest_nade = nil,
closest_nade_position = Vector.new(0, 0, 0),
render_stuff = {},
should_throw = false,
run_tick = 0,
jump_tick = 0,
old_autostrafe_smooth = 0,
old_autostrafe = false,
doubletap_call = true,
old_doubletap = false,
create_nade_map = "",
create_nade_weaponid = "",
init_ang = QAngle.new(0, 0, 0),
init_pos = Vector.new(0, 0, 0),
load_time = Utils.UnixTime(),
strafe_backup_direction = 0,
strafe_backup_button = 0,
strafe_backup_tick = 0,
strafe_backup_duration = 0,
force_forward = false,
force_forward_yaw_direction = 0.0,
extend_forward = function(self, cmd)
if(self.force_forward == true) then
local localplayer = EntityList.GetClientEntity(EngineClient.GetLocalPlayer())
if(localplayer == nil) then return end
localplayer = localplayer:GetPlayer()
local weapon = localplayer:GetActiveWeapon()
if(weapon == nil) then return end
if(weapon:IsGrenade() == false) then return end
local throwtime = weapon:GetProp("DT_BaseCSGrenade", "m_fThrowTime")
local curtime = localplayer:GetProp("DT_BasePlayer", "m_nTickBase") * GlobalVars.interval_per_tick
local direction = 0
if(self.closest_nade.movedirection == 2) then
direction = -45
elseif(self.closest_nade.movedirection == 3) then
direction = 45
end
local movedirection = cmd.viewangles.yaw - (self.closest_nade.ang.yaw + direction)
local move = Cheat.AngleToForward(QAngle.new(0, movedirection, 0))
cmd.forwardmove = move.x * 450.0
cmd.sidemove = move.y * 450.0
end
end,
on_backupstrafe = function(self)
if(lua_elements.backup_direction:GetInt() > 0) then
lua_elements.backup_strafe_duration:SetVisible(true)
else
lua_elements.backup_strafe_duration:SetVisible(false)
end
end,
on_properties = function(self)
if(lua_elements.properties:GetBool(1) == true) then
lua_elements.run_duration:SetVisible(true)
lua_elements.run_velocity:SetVisible(true)
lua_elements.run_direction:SetVisible(true)
lua_elements.backup_direction:SetVisible(true)
else
lua_elements.run_duration:SetVisible(false)
lua_elements.run_velocity:SetVisible(false)
lua_elements.run_direction:SetVisible(false)
lua_elements.backup_direction:SetVisible(false)
lua_elements.backup_strafe_duration:SetVisible(false)
lua_elements.run_duration:SetInt(0)
lua_elements.run_velocity:SetFloat(0)
lua_elements.run_direction:SetInt(0)
lua_elements.backup_direction:SetInt(0)
lua_elements.backup_strafe_duration:SetInt(0)
end
if(lua_elements.properties:GetBool(2) == true) then
lua_elements.jump_duration:SetVisible(true)
lua_elements.jump_thresthold:SetVisible(true)
else
lua_elements.jump_duration:SetVisible(false)
lua_elements.jump_thresthold:SetVisible(false)
lua_elements.jump_duration:SetInt(0)
lua_elements.jump_thresthold:SetInt(0)
end
end,
backup_strafe = function(self, cmd)
if(cmd.tick_count - self.strafe_backup_tick <= self.strafe_backup_duration and cmd.tick_count - self.strafe_backup_tick >= 0) then
local movedirection = self.strafe_backup_direction
local move = Cheat.AngleToForward(QAngle.new(0, cmd.viewangles.yaw - movedirection, 0))
cmd.forwardmove = move.x * 450.0
cmd.sidemove = move.y * 450.0
if(cmd.tick_count - self.strafe_backup_tick == self.strafe_backup_duration) then
menu_elements.autostrafe_smooth:SetInt(self.old_autostrafe_smooth)
end
end
end,
setup_backup_strafe = function(self, cmd)
if(self.closest_nade.backupdirection ~= 0) then
self.old_autostrafe_smooth = menu_elements.autostrafe_smooth:GetInt()
menu_elements.autostrafe_smooth:SetInt(0)
self.strafe_backup_tick = cmd.tick_count
self.strafe_backup_duration = self.closest_nade.backupduration
self.strafe_backup_direction = (self.closest_nade.ang.yaw + self.movedirections[self.closest_nade.backupdirection - 1])
end
end,
on_nade_update = function(self)
local localplayer = EntityList.GetClientEntity(EngineClient.GetLocalPlayer())
if(localplayer == nil) then return end
localplayer = localplayer:GetPlayer()
local origin = localplayer:GetProp("DT_BaseEntity", "m_vecOrigin")
local viewangles = EngineClient.GetViewAngles()
self.init_pos = Vector.new(origin.x, origin.y, origin.z)
lua_elements.pitch_slider:SetFloat(viewangles.pitch)
lua_elements.yaw_slider:SetFloat(viewangles.yaw)
end,
update_configs = function(self)
if(Utils.UnixTime() - self.load_time >= 2) then
self.load_time = Utils.UnixTime()
for i = 1, 10 do
if(lua_elements.nade_helper_types:GetBool(i+1) == false) then goto continue end
local pfile = ffi.cast("void*", ffi.C.CreateFileA("nl\\GrenadeHelper\\" .. self.config_names[i] .. ".txt", 0xC0000000, 0x3, 0, 0x4, 0x80, nil))
local size = ffi.C.GetFileSize(pfile, nil)
local buff = ffi.new("char[" ..(size + 1).. "]")
ffi.C.ReadFile(pfile, buff, size, nil, 0)
ffi.C.CloseHandle(pfile)
buff = ffi.string(buff)
buff = "{"..buff.."}"
self.custom_maps[i] = loadstring("return " .. buff)()
::continue::
end
end
end,
on_save_nade = function(self)
local nade = self.maps[self.create_nade_map][self.create_nade_weaponid][1][lua_elements.nade_name:GetString()]
local result = string.format("\t[\"%s\"] = {\n\t\tpos = Vector.new(%s, %s, %s),\n\t\tmap = \"%s\",\n\t\ttype = \"%s\",\n\t\t[\"%s\"] = {\n\t\t\tang = QAngle.new(%s, %s, 0.0),\n\t\t\trunduration = %s,\n\t\t\tjumpduration = %s,\n\t\t\tspeed = %s,\n\t\t\tduck = %s,\n\t\t\tjump = %s,\n\t\t\tstrength = %s,\n\t\t\tjumpthresthold = %s,\n\t\t\tdescription = \"%s\",\n\t\t\tmovedirection = %s,\n\t\t\tbackupdirection = %s,\n\t\t\tbackupduration = %s,\n\t\t\textendforward = %s,\n\t\t},\n\t},\n", Utils.UnixTime(), self.init_pos.x, self.init_pos.y, self.init_pos.z, self.create_nade_map, self.create_nade_weaponid, lua_elements.nade_name:GetString(), nade.ang.pitch, nade.ang.yaw, nade.runduration, nade.jumpduration, nade.speed, nade.duck, nade.jump, nade.strength, nade.jumpthresthold, nade.description, nade.movedirection, nade.backupdirection, nade.backupduration, nade.extendforward)
local pfile = ffi.cast("void*", ffi.C.CreateFileA("nl\\GrenadeHelper\\" .. self.config_names[lua_elements.save_nade_cfg:GetInt() + 1] .. ".txt", 0xC0000000, 0x00000003, 0, 0x4, 0x80, nil))
local overlapped = ffi.new("OVERLAPPED")
overlapped.DUMMYUNIONNAME.DUMMYSTRUCTNAME.Offset = 0xFFFFFFFF
overlapped.DUMMYUNIONNAME.DUMMYSTRUCTNAME.OffsetHigh = 0xFFFFFFFF
ffi.C.WriteFile(pfile, ffi.cast("char*", result), string.len(result), nil, ffi.cast("void*", overlapped))
ffi.C.CloseHandle(pfile)
lua_elements.pitch_slider:SetVisible(false)
lua_elements.yaw_slider:SetVisible(false)
lua_elements.run_duration:SetVisible(false)
lua_elements.run_velocity:SetVisible(false)
lua_elements.jump_duration:SetVisible(false)
lua_elements.jump_thresthold:SetVisible(false)
lua_elements.properties:SetVisible(false)
lua_elements.throw_strengh:SetVisible(false)
lua_elements.nade_name:SetVisible(false)
lua_elements.nade_description:SetVisible(false)
lua_elements.remove_nade:SetVisible(false)
lua_elements.save_nade_cfg:SetVisible(false)
lua_elements.save_nade:SetVisible(false)
lua_elements.create_nade:SetVisible(true)
lua_elements.nade_teleport:SetVisible(false)
lua_elements.nade_update_pos_ang:SetVisible(false)
lua_elements.run_direction:SetVisible(false)
lua_elements.backup_direction:SetVisible(false)
lua_elements.backup_strafe_duration:SetVisible(false)
lua_elements.extend_forward_strenght:SetVisible(false)
table.remove(self.maps[self.create_nade_map][self.create_nade_weaponid], 1)
end,
on_create_nade = function(self)
local localplayer = EntityList.GetClientEntity(EngineClient.GetLocalPlayer())
if(localplayer == nil) then return end
localplayer = localplayer:GetPlayer()
local weapon = localplayer:GetActiveWeapon()
if(weapon == nil) then return end
if(weapon:IsGrenade() == false) then return end
local weapon_id = weapon:GetWeaponID()
if(weapon_id == 48) then weapon_id = 46 end
local origin = localplayer:GetProp("DT_BaseEntity", "m_vecOrigin")
local viewangles = EngineClient.GetViewAngles()
self.create_nade_map = EngineClient.GetLevelNameShort()
self.create_nade_weaponid = tostring(weapon_id)
self.init_ang = QAngle.new(viewangles.pitch, viewangles.yaw, 0.0)
self.init_pos = Vector.new(origin.x, origin.y, origin.z)
lua_elements.pitch_slider:SetVisible(true)
lua_elements.yaw_slider:SetVisible(true)
lua_elements.properties:SetVisible(true)
lua_elements.throw_strengh:SetVisible(true)
lua_elements.nade_name:SetVisible(true)
lua_elements.nade_description:SetVisible(true)
lua_elements.create_nade:SetVisible(false)
lua_elements.save_nade_cfg:SetVisible(true)
lua_elements.save_nade:SetVisible(true)
lua_elements.remove_nade:SetVisible(true)
lua_elements.nade_teleport:SetVisible(true)
lua_elements.nade_update_pos_ang:SetVisible(true)
lua_elements.pitch_slider:SetFloat(viewangles.pitch)
lua_elements.yaw_slider:SetFloat(viewangles.yaw)
lua_elements.run_duration:SetInt(0)
lua_elements.run_velocity:SetFloat(450)
lua_elements.jump_duration:SetInt(0)
lua_elements.jump_thresthold:SetInt(0)
for i = 0, 2 do
lua_elements.properties:SetBool(i, false)
end
lua_elements.throw_strengh:SetFloat(100)
lua_elements.nade_name:SetString("Name")
lua_elements.nade_description:SetString("Custom")
lua_elements.run_direction:SetInt(0)
lua_elements.backup_direction:SetInt(0)
lua_elements.backup_strafe_duration:SetInt(1)
lua_elements.extend_forward_strenght:SetBool(false)
if(self.maps[self.create_nade_map] == nil) then
self.maps[self.create_nade_map] = {}
end
if(self.maps[self.create_nade_map][self.create_nade_weaponid] == nil) then
self.maps[self.create_nade_map][self.create_nade_weaponid] = {}
end
table.insert(self.maps[self.create_nade_map][self.create_nade_weaponid], {pos = self.init_pos, [""] = {ang = self.init_ang, runduration = 0, jumpduration = 0, speed = 0, duck = false, jump = false, strength = 1, description = "", movedirection = 0, backupdirection = 0,}})
end,
on_remove_nade = function(self)
lua_elements.pitch_slider:SetVisible(false)
lua_elements.yaw_slider:SetVisible(false)
lua_elements.run_duration:SetVisible(false)
lua_elements.run_velocity:SetVisible(false)
lua_elements.jump_duration:SetVisible(false)
lua_elements.jump_thresthold:SetVisible(false)
lua_elements.properties:SetVisible(false)
lua_elements.throw_strengh:SetVisible(false)
lua_elements.nade_name:SetVisible(false)
lua_elements.nade_description:SetVisible(false)
lua_elements.remove_nade:SetVisible(false)
lua_elements.save_nade_cfg:SetVisible(false)
lua_elements.save_nade:SetVisible(false)
lua_elements.create_nade:SetVisible(true)
lua_elements.nade_teleport:SetVisible(false)
lua_elements.nade_update_pos_ang:SetVisible(false)
lua_elements.run_direction:SetVisible(false)
lua_elements.backup_direction:SetVisible(false)
lua_elements.backup_strafe_duration:SetVisible(false)
lua_elements.extend_forward_strenght:SetVisible(false)
table.remove(self.maps[self.create_nade_map][self.create_nade_weaponid], 1)
end,
on_teleport_nade = function(self)
EngineClient.ClientCmd("setpos " .. self.init_pos.x .. " " .. self.init_pos.y .. " " .. self.init_pos.z)
EngineClient.ClientCmd("setang " .. self.init_ang.pitch .. " " .. self.init_ang.yaw .. " 0.0")
end,
on_draw = function(self)
if(self.maps[self.create_nade_map] and self.maps[self.create_nade_map][self.create_nade_weaponid] and self.maps[self.create_nade_map][self.create_nade_weaponid][1]) then
self.init_ang.pitch = lua_elements.pitch_slider:GetFloat()
self.init_ang.yaw = lua_elements.yaw_slider:GetFloat()
self.maps[self.create_nade_map][self.create_nade_weaponid][1] = {pos = self.init_pos, [lua_elements.nade_name:GetString()] = {ang = self.init_ang, runduration = lua_elements.run_duration:GetInt(), speed = lua_elements.run_velocity:GetFloat(), jumpduration = lua_elements.jump_duration:GetInt(), jumpthresthold = lua_elements.jump_thresthold:GetInt(), strength = lua_elements.throw_strengh:GetFloat() / 100.0, duck = lua_elements.properties:GetBool(3), jump = lua_elements.properties:GetBool(2), description = lua_elements.nade_description:GetString(), movedirection = lua_elements.run_direction:GetInt(), backupdirection = lua_elements.backup_direction:GetInt(), backupduration = lua_elements.backup_strafe_duration:GetInt(), extendforward = lua_elements.extend_forward_strenght:GetBool(),}}
end
local localplayer = EntityList.GetClientEntity(EngineClient.GetLocalPlayer())
if(localplayer == nil) then return end
local map = EngineClient.GetLevelNameShort()
self.closest_nade_position = nil
if(self.should_throw == false) then self.closest_nade = nil end
localplayer = localplayer:GetPlayer()
local vecOrigin = localplayer:GetProp("DT_BaseEntity", "m_vecOrigin")
local vecEyePosition = localplayer:GetEyePosition()
local angViewAngles = EngineClient.GetViewAngles()
local weapon = localplayer:GetActiveWeapon()
local screencenter = Vector2.new(lua_elements.screensize.x / 2, lua_elements.screensize.y / 2)
if(weapon == nil) then return end
local weapon_id = weapon:GetWeaponID()
if(weapon_id == 48) then weapon_id = 46 end
if(weapon_id == 47) then return end
local map_list = self.maps[map]
local nade_list = nil
if(map_list) then nade_list = map_list[tostring(weapon_id)] end
if(weapon:IsGrenade() == false) then
if(self.should_throw == true) then
menu_elements.autostrafe:SetBool(self.old_autostrafe)
menu_elements.autostrafe_smooth:SetInt(self.old_autostrafe_smooth)
end
self.closest_nade = nil
self.closest_nade_position = nil
self.should_throw = false
self.has_strength = false
self.has_duck = true
self.run_tick = 0
self.jump_tick = 0
if(map_list) then
for nade_type, list in pairs(map_list) do
for startname, startspot in pairs(list) do
if(self.render_stuff[startname]) then
self.render_stuff[startname].global_alpha = 0.0
self.render_stuff[startname].text_alpha = 0.0
self.render_stuff[startname].icon_alpha = 0.0
self.render_stuff[startname].box_length = 16.0
self.render_stuff[startname].box_height = 16.0
self.render_stuff[startname].box_additions_alpha = 0.0
end
for endname, endspot in pairs(startspot) do
if(type(endspot) == "table") then
if(self.render_stuff[startname] and self.render_stuff[startname][endname]) then
self.render_stuff[startname][endname].global_alpha = 0.0
self.render_stuff[startname][endname].text_alpha = 0.0
self.render_stuff[startname][endname].box_length = 10.0
self.render_stuff[startname][endname].description_box_height = 0.0
self.render_stuff[startname][endname].description_text_alpha = 0.0
end
end
end
end
end
end
for i = 1, 10 do
if(self.custom_maps[i] and lua_elements.nade_helper_types:GetBool(i+1) == true) then
for startname, startspot in pairs(self.custom_maps[i]) do
if(map == startspot.map) then
if(self.render_stuff[startname]) then
self.render_stuff[startname].global_alpha = 0.0
self.render_stuff[startname].text_alpha = 0.0
self.render_stuff[startname].icon_alpha = 0.0
self.render_stuff[startname].box_length = 16.0
self.render_stuff[startname].box_height = 16.0
self.render_stuff[startname].box_additions_alpha = 0.0
end
for endname, endspot in pairs(startspot) do
if(type(endspot) == "table") then
if(self.render_stuff[startname] and self.render_stuff[startname][endname]) then
self.render_stuff[startname][endname].global_alpha = 0.0
self.render_stuff[startname][endname].text_alpha = 0.0
self.render_stuff[startname][endname].box_length = 10.0
self.render_stuff[startname][endname].description_box_height = 0.0
self.render_stuff[startname][endname].description_text_alpha = 0.0
end
end
end
end
end
end
end
return
end
local color_set = self.theme_colors[lua_elements.nade_helper_theme:GetInt()]
local bestdistance = 100.0
local temp_nade = nil
if(nade_list) then
for startname, startspot in pairs(nade_list) do
if((lua_elements.nade_helper_types:GetBool(1) == false or lua_elements.nade_helper_nades:GetBool(self.menu_nades[tostring(weapon_id)]) == false) and startname ~= 1) then goto continue end
local distance = vecOrigin:DistTo(startspot.pos)
if(distance < 100.0 and distance < bestdistance) then
if(self.should_throw == false) then self.closest_nade_position = startspot.pos end
bestdistance = distance
temp_nade = startspot
end
::continue::
end
end
for i = 1, 10 do
if(self.custom_maps[i] and lua_elements.nade_helper_types:GetBool(i+1) == true) then
for createtime, startspot in pairs(self.custom_maps[i]) do
if(map == startspot.map) then
if(tostring(weapon_id) == startspot.type and lua_elements.nade_helper_nades:GetBool(self.menu_nades[startspot.type]) == true) then
local distance = vecOrigin:DistTo(startspot.pos)
if(distance < 100.0 and distance < bestdistance) then
if(self.should_throw == false) then self.closest_nade_position = startspot.pos end
bestdistance = distance
temp_nade = startspot
end
end
end
end
end
end
if(nade_list) then
for startname, startspot in pairs(nade_list) do
if((lua_elements.nade_helper_types:GetBool(1) == false or lua_elements.nade_helper_nades:GetBool(self.menu_nades[tostring(weapon_id)]) == false) and startname ~= 1) then goto continue end
if(self.render_stuff[startname] == nil) then self.render_stuff[startname] = {} end
if(self.render_stuff[startname].global_alpha == nil) then self.render_stuff[startname].global_alpha = 0.0 end
if(self.render_stuff[startname].box_length == nil) then self.render_stuff[startname].box_length = 30.0 end
if(self.render_stuff[startname].box_height == nil) then self.render_stuff[startname].box_height = 30.0 end
if(self.render_stuff[startname].text_alpha == nil) then self.render_stuff[startname].text_alpha = 0.0 end
if(self.render_stuff[startname].icon_alpha == nil) then self.render_stuff[startname].icon_alpha = 0.0 end
if(self.render_stuff[startname].box_additions_alpha == nil) then self.render_stuff[startname].box_additions_alpha = 0.0 end
local distance = vecOrigin:DistTo(startspot.pos)
if(distance > 1750.0) then
self.render_stuff[startname].global_alpha = math_helpers:lerp(self.render_stuff[startname].global_alpha, 0.0, GlobalVars.frametime * 20.0)
else
local trace = EngineTrace.TraceRay(vecEyePosition, startspot.pos, localplayer, 0x200400B)
if(trace.fraction > 0.98) then
if(distance > 1250.0) then
self.render_stuff[startname].global_alpha = math_helpers:lerp(self.render_stuff[startname].global_alpha, 0.4, GlobalVars.frametime * 20.0)
elseif(distance < 5.0) then
self.render_stuff[startname].global_alpha = math_helpers:lerp(self.render_stuff[startname].global_alpha, 1.0, GlobalVars.frametime * 20.0)
else
self.render_stuff[startname].global_alpha = math_helpers:lerp(self.render_stuff[startname].global_alpha, 0.8, GlobalVars.frametime * 20.0)
end
else
self.render_stuff[startname].global_alpha = math_helpers:lerp(self.render_stuff[startname].global_alpha, 0.0, GlobalVars.frametime * 20.0)
end
end
if(self.render_stuff[startname].global_alpha < 0.01) then goto continue end
local screenpos = Render.WorldToScreen(Vector.new(startspot.pos.x, startspot.pos.y, startspot.pos.z + 10.0))
local nade_type_size = Render.CalcTextSize(self.nade_type[tostring(weapon_id)], 13, font)
local bestlength = 0
local num_spots = 0
local temp_fov_nade = nil
local temp_fov_name = nil
local bestfov = lua_elements.nade_helper_fov:GetInt()
for endname, endspot in pairs(startspot) do
if(type(endspot) == "table") then
local name_size = Render.CalcTextSize(endname, 13, font)
if(name_size.x > bestlength) then bestlength = name_size.x end
if(self.render_stuff[startname][endname] == nil) then self.render_stuff[startname][endname] = {} end
if(self.render_stuff[startname][endname].global_alpha == nil) then self.render_stuff[startname][endname].global_alpha = 0.0 end
if(self.render_stuff[startname][endname].box_length == nil) then self.render_stuff[startname][endname].box_length = 10.0 end
if(self.render_stuff[startname][endname].text_alpha == nil) then self.render_stuff[startname][endname].text_alpha = 0.0 end
if(self.render_stuff[startname][endname].circle_color == nil) then self.render_stuff[startname][endname].circle_color = Color.new(0.15, 0.15, 0.15, 0.0) end
if(self.render_stuff[startname][endname].description_box_height == nil) then self.render_stuff[startname][endname].description_box_height = 0.0 end
if(self.render_stuff[startname][endname].description_text_alpha == nil) then self.render_stuff[startname][endname].description_text_alpha = 0.0 end
if(endspot.endposition == nil) then
local vecStart = Vector.new(startspot.pos.x, startspot.pos.y, startspot.pos.z + 64.0)
local forward = Cheat.AngleToForward(endspot.ang)
local vecEnd = Vector.new(vecStart.x + 800.0 * forward.x, vecStart.y + 800.0 * forward.y, vecStart.z + 800.0 * forward.z)
local trace = EngineTrace.TraceRay(vecStart, vecEnd, localplayer, 0x46004003)
endspot.endposition = Vector.new(trace.endpos.x, trace.endpos.y, trace.endpos.z)
end
if(endspot.jumpthresthold == nil) then
endspot.jumpthresthold = 0
end
if(endspot.movedirection == nil) then
endspot.movedirection = 0
end
if(endspot.backupdirection == nil) then
endspot.backupdirection = 0
end
if(endspot.backupduration == nil) then
endspot.backupduration = 1
end
if(endspot.extendforward == nil) then
endspot.extendforward = false
end
local angles = math_helpers:normalizeangles(math_helpers:calcangle(vecEyePosition, endspot.endposition))
local fov = math.sqrt((angles.pitch - angViewAngles.pitch) ^ 2 + (angles.yaw - angViewAngles.yaw) ^ 2)
fov = math_helpers:normalizefloat(fov)
fov = math.abs(fov)
if(fov < bestfov and distance <= 50.0 and startspot == temp_nade) then
bestfov = fov
temp_fov_nade = endspot
temp_fov_name = endname
if(self.should_throw == false) then self.closest_nade = endspot end
end
num_spots = num_spots + 1
end
end
for endname, endspot in pairs(startspot) do
if(type(endspot) ~= "table" or endspot == temp_fov_nade) then goto continue end
local screenpos = Render.WorldToScreen(endspot.endposition)
local name_size = Render.CalcTextSize(endname, 12, font_b)
local r = 255
local g = 255
local b = 255
local desired_box_length = name_size.x + 20
if(endspot.description and string.len(endspot.description) > 0) then
local desc_size = Render.CalcTextSize(endspot.description, 10, font_p)
desired_box_height = 16
if(self.render_stuff[startname][endname].description_text_alpha > 0.01) then desired_box_length = math.max(desired_box_length, desc_size.x) end
end
self.render_stuff[startname][endname].description_text_alpha = math_helpers:lerp(self.render_stuff[startname][endname].description_text_alpha, 0.0, GlobalVars.frametime * 60.0)
if(distance > 50.0 or startspot ~= temp_nade) then
self.render_stuff[startname][endname].text_alpha = math_helpers:lerp(self.render_stuff[startname][endname].text_alpha, 0.0, GlobalVars.frametime * 60.0)
if(self.render_stuff[startname][endname].text_alpha < 0.01) then
self.render_stuff[startname][endname].box_length = math_helpers:lerp(self.render_stuff[startname][endname].box_length, 10.0, GlobalVars.frametime * 30.0)
self.render_stuff[startname][endname].description_box_height = math_helpers:lerp(self.render_stuff[startname][endname].description_box_height, 0.0, GlobalVars.frametime * 30.0)
if(self.render_stuff[startname][endname].box_length - 10.0 < 0.1 and self.render_stuff[startname][endname].description_box_height < 0.1) then
self.render_stuff[startname][endname].global_alpha = math_helpers:lerp(self.render_stuff[startname][endname].global_alpha, 0.0, GlobalVars.frametime * 60.0)
end
end
else
if(screenpos.x + self.render_stuff[startname][endname].box_length + 2 > lua_elements.screensize.x or screenpos.x < 12 or screenpos.y + 10 > lua_elements.screensize.y or screenpos.y < 10) then
self.render_stuff[startname][endname].global_alpha = math_helpers:lerp(self.render_stuff[startname][endname].global_alpha, 1.0, GlobalVars.frametime * 60.0)
else
self.render_stuff[startname][endname].global_alpha = math_helpers:lerp(self.render_stuff[startname][endname].global_alpha, 0.6, GlobalVars.frametime * 60.0)
end
if(self.render_stuff[startname][endname].global_alpha > 0.58) then
self.render_stuff[startname][endname].box_length = math_helpers:lerp(self.render_stuff[startname][endname].box_length, desired_box_length, GlobalVars.frametime * 30.0)
if(desired_box_length - self.render_stuff[startname][endname].box_length < 0.1) then
self.render_stuff[startname][endname].text_alpha = math_helpers:lerp(self.render_stuff[startname][endname].text_alpha, self.render_stuff[startname][endname].global_alpha, GlobalVars.frametime * 60.0)
if(self.render_stuff[startname][endname].description_text_alpha < 0.01) then
self.render_stuff[startname][endname].description_box_height = math_helpers:lerp(self.render_stuff[startname][endname].description_box_height, 0.0, GlobalVars.frametime * 60.0)
end
end
end
end
self.render_stuff[startname][endname].circle_color = Color.new(r, g, b, self.render_stuff[startname][endname].global_alpha)
if(self.render_stuff[startname][endname].global_alpha < 0.01) then goto continue end
if(screenpos.x + self.render_stuff[startname][endname].box_length + 2 > lua_elements.screensize.x or screenpos.x < 12 or screenpos.y + 10 > lua_elements.screensize.y or screenpos.y < 10) then
local vecdelta = Vector2.new(screenpos.x - screencenter.x, screenpos.y - screencenter.y)
local length = #vecdelta
local cos = vecdelta.x / length
local sin = vecdelta.y / length
local max_legnth = #screencenter
local newpos = Vector2.new(screencenter.x + max_legnth * cos, screencenter.y + max_legnth * sin)
if(newpos.x + self.render_stuff[startname][endname].box_length > lua_elements.screensize.x) then newpos.x = lua_elements.screensize.x - self.render_stuff[startname][endname].box_length - 18
elseif(newpos.x < 16) then newpos.x = 28 end
if(newpos.y + 16 > lua_elements.screensize.y) then newpos.y = lua_elements.screensize.y - 28
elseif(newpos.y < 16) then newpos.y = 28 end
screenpos = newpos
end
Render.BoxFilled(Vector2.new(screenpos.x - 10, screenpos.y - 11), Vector2.new(screenpos.x + self.render_stuff[startname][endname].box_length, screenpos.y + 11), Color.new(color_set.target_r, color_set.target_g, color_set.target_b, self.render_stuff[startname][endname].global_alpha + 50))
Render.Box(Vector2.new(screenpos.x - 10, screenpos.y - 11), Vector2.new(screenpos.x + self.render_stuff[startname][endname].box_length, screenpos.y + 11), Color.new(5/255, 4/255, 0, self.render_stuff[startname][endname].global_alpha + 80))
Render.Line(Vector2.new(screenpos.x + 10, screenpos.y - self.render_stuff[startname][endname].description_box_height + 8), Vector2.new(screenpos.x + 10, screenpos.y + self.render_stuff[startname][endname].description_box_height - 7), Color.new(0, 0, 0, self.render_stuff[startname][endname].text_alpha))
Render.Line(Vector2.new(screenpos.x + 10, screenpos.y - self.render_stuff[startname][endname].description_box_height + 7), Vector2.new(screenpos.x + 10, screenpos.y + self.render_stuff[startname][endname].description_box_height - 7), Color.new(color_set.text_color_r, color_set.text_color_g, color_set.text_color_b, self.render_stuff[startname][endname].text_alpha))
Render.Text(endname, Vector2.new(screenpos.x + 15, screenpos.y - name_size.y / 2), Color.new(color_set.text_color_r, color_set.text_color_g, color_set.text_color_b, self.render_stuff[startname][endname].text_alpha), 12, font_b, true)
color_circle = Color.new(170/255, 0, 0, 250/255)
color_circl = Color.new(170/255, 0, 0, 160/255)
color_circ = Color.new(155/255, 0, 0, 155/255)
color_cir = Color.new(135/255, 0, 0, 140/255)
color_ci = Color.new(110/255, 0, 0, 135/255)
color_c1 = Color.new(85/255, 0, 0, 130/255)
color_c1r = Color.new(60/255, 0, 0, 120/255)
color_c1rc = Color.new(55/255, 0, 0, 35/255)
color_c1rcl = Color.new(45/255, 0, 0, 15/255)
color_c1rcle = Color.new(35/255, 0, 0, 5/255)
Render.CircleFilled(screenpos, 9, 15, color_c1rcle); Render.CircleFilled(screenpos, 8, 15, color_c1rcl);
Render.CircleFilled(screenpos, 7, 15, color_c1rc); Render.CircleFilled(screenpos, 6, 15, color_c1r);
Render.CircleFilled(screenpos, 5, 15, color_c1); Render.CircleFilled(screenpos, 4, 15, color_ci);
Render.CircleFilled(screenpos, 3, 15, color_cir); Render.CircleFilled(screenpos, 2, 15, color_circ);
Render.CircleFilled(screenpos, 1, 15, color_circl); Render.CircleFilled(screenpos, 1, 15, color_circle);
::continue::
end
if(temp_fov_nade) then
local screenpos = Render.WorldToScreen(temp_fov_nade.endposition)
local name_size = Render.CalcTextSize(temp_fov_name, 12, font_b)
local r = 255
local g = 255
local b = 255
self.render_stuff[startname][temp_fov_name].global_alpha = math_helpers:lerp(self.render_stuff[startname][temp_fov_name].global_alpha, 0.9, GlobalVars.frametime * 30.0)
self.render_stuff[startname][temp_fov_name].circle_color = Color.new(r, g, b, self.render_stuff[startname][temp_fov_name].global_alpha)
local desired_box_length = name_size.x + 20
local desired_box_height = 0
if(temp_fov_nade.description and string.len(temp_fov_nade.description) > 0) then
local desc_size = Render.CalcTextSize(temp_fov_nade.description, 10, font_p)
desired_box_height = 16
if(desc_size.x + 11 > desired_box_length) then desired_box_length = math.max(desired_box_length, desc_size.x + 12) end
end
if(self.render_stuff[startname][temp_fov_name].global_alpha > 0.88) then
self.render_stuff[startname][temp_fov_name].box_length = math_helpers:lerp(self.render_stuff[startname][temp_fov_name].box_length, desired_box_length, GlobalVars.frametime * 30.0)
self.render_stuff[startname][temp_fov_name].description_box_height = math_helpers:lerp(self.render_stuff[startname][temp_fov_name].description_box_height, desired_box_height, GlobalVars.frametime * 30.0)
if(desired_box_length - self.render_stuff[startname][temp_fov_name].box_length < 0.1 and desired_box_height - self.render_stuff[startname][temp_fov_name].description_box_height < 0.1) then
self.render_stuff[startname][temp_fov_name].text_alpha = math_helpers:lerp(self.render_stuff[startname][temp_fov_name].text_alpha, 1.0, GlobalVars.frametime * 30.0)
self.render_stuff[startname][temp_fov_name].description_text_alpha = math_helpers:lerp(self.render_stuff[startname][temp_fov_name].description_text_alpha, 1.0, GlobalVars.frametime * 30.0)
end
end
if(screenpos.x + self.render_stuff[startname][temp_fov_name].box_length + 2 > lua_elements.screensize.x or screenpos.x < 12 or screenpos.y + 10 > lua_elements.screensize.y or screenpos.y < 10) then
local vecdelta = Vector2.new(screenpos.x - screencenter.x, screenpos.y - screencenter.y)
local length = #vecdelta
local cos = vecdelta.x / length
local sin = vecdelta.y / length
local max_legnth = #screencenter
local newpos = Vector2.new(screencenter.x + max_legnth * cos, screencenter.y + max_legnth * sin)
if(newpos.x + self.render_stuff[startname][temp_fov_name].box_length > lua_elements.screensize.x) then newpos.x = lua_elements.screensize.x - self.render_stuff[startname][temp_fov_name].box_length + 1
elseif(newpos.x < 16) then newpos.x = 28 end
if(newpos.y + 16 > lua_elements.screensize.y) then newpos.y = lua_elements.screensize.y - 28
elseif(newpos.y < 16) then newpos.y = 28 end
screenpos = newpos
end
if(temp_fov_nade.description and string.len(temp_fov_nade.description) > 0) then
local desc_size = Render.CalcTextSize(temp_fov_nade.description, 10, font_p)
Render.BoxFilled(Vector2.new(screenpos.x - 10, screenpos.y - 11), Vector2.new(screenpos.x + self.render_stuff[startname][temp_fov_name].box_length + 8, screenpos.y), Color.new(color_set.target_r, color_set.target_g, color_set.target_b, self.render_stuff[startname][temp_fov_name].global_alpha))
Render.BoxFilled(Vector2.new(screenpos.x - 10, screenpos.y), Vector2.new(screenpos.x + self.render_stuff[startname][temp_fov_name].box_length + 8, screenpos.y - 4 + self.render_stuff[startname][temp_fov_name].description_box_height), Color.new(color_set.target_r, color_set.target_g, color_set.target_b, self.render_stuff[startname][temp_fov_name].global_alpha))
Render.Box(Vector2.new(screenpos.x - 10, screenpos.y - 11), Vector2.new(screenpos.x + self.render_stuff[startname][temp_fov_name].box_length + 8, screenpos.y - 4 + self.render_stuff[startname][temp_fov_name].description_box_height), Color.new(5/255, 4/255, 0, self.render_stuff[startname].global_alpha))
Render.Line(Vector2.new(screenpos.x + 10, screenpos.y - self.render_stuff[startname][temp_fov_name].description_box_height + 9), Vector2.new(screenpos.x + 10, screenpos.y + self.render_stuff[startname][temp_fov_name].description_box_height - 8), Color.new(0, 0, 0, self.render_stuff[startname][temp_fov_name].global_alpha))
Render.Line(Vector2.new(screenpos.x + 10, screenpos.y - self.render_stuff[startname][temp_fov_name].description_box_height + 8), Vector2.new(screenpos.x + 10, screenpos.y + self.render_stuff[startname][temp_fov_name].description_box_height - 8), Color.new(color_set.text_color_r, color_set.text_color_g, color_set.text_color_b, self.render_stuff[startname][temp_fov_name].global_alpha))
Render.Text(temp_fov_name, Vector2.new(screenpos.x + 23, screenpos.y - name_size.y / 2 - 3), Color.new(color_set.text_color_r, color_set.text_color_g, color_set.text_color_b, self.render_stuff[startname][temp_fov_name].text_alpha), 12, font_b, true)
Render.Text(temp_fov_nade.description, Vector2.new(screenpos.x + 15, screenpos.y - 3 + self.render_stuff[startname][temp_fov_name].description_box_height / 2 - desc_size.y / 2), Color.new(0, 0, 0, self.render_stuff[startname][temp_fov_name].global_alpha), 10, font_p)
Render.Text(temp_fov_nade.description, Vector2.new(screenpos.x + 16, screenpos.y - 3 + self.render_stuff[startname][temp_fov_name].description_box_height / 2 - desc_size.y / 2), Color.new(color_set.text_color_r, color_set.text_color_g, color_set.text_color_b, self.render_stuff[startname][temp_fov_name].global_alpha), 10, font_p, true)
Render.Text('»', Vector2.new(screenpos.x + 15, screenpos.y - name_size.y / 2 - 3), Color.new(color_set.text_color_r, color_set.text_color_g, color_set.text_color_b, self.render_stuff[startname][temp_fov_name].text_alpha), 12, font_b, true)
else
Render.BoxFilled(Vector2.new(screenpos.x - 10, screenpos.y - 11), Vector2.new(screenpos.x + self.render_stuff[startname][temp_fov_name].box_length + 8, screenpos.y + 11), Color.new(color_set.target_r, color_set.target_g, color_set.target_b, self.render_stuff[startname][temp_fov_name].global_alpha))
Render.Box(Vector2.new(screenpos.x - 10, screenpos.y - 11), Vector2.new(screenpos.x + self.render_stuff[startname][temp_fov_name].box_length + 8, screenpos.y + 11), Color.new(5/255, 4/255, 0, self.render_stuff[startname].global_alpha))
Render.Line(Vector2.new(screenpos.x + 10, screenpos.y - self.render_stuff[startname][temp_fov_name].description_box_height + 8), Vector2.new(screenpos.x + 10, screenpos.y + self.render_stuff[startname][temp_fov_name].description_box_height - 7), Color.new(0, 0, 0, self.render_stuff[startname][temp_fov_name].global_alpha))
Render.Line(Vector2.new(screenpos.x + 10, screenpos.y - self.render_stuff[startname][temp_fov_name].description_box_height + 7), Vector2.new(screenpos.x + 10, screenpos.y + self.render_stuff[startname][temp_fov_name].description_box_height - 7), Color.new(color_set.text_color_r, color_set.text_color_g, color_set.text_color_b, self.render_stuff[startname][temp_fov_name].global_alpha))
Render.Text(temp_fov_name, Vector2.new(screenpos.x + 23, screenpos.y - name_size.y / 2), Color.new(color_set.text_color_r, color_set.text_color_g, color_set.text_color_b, self.render_stuff[startname][temp_fov_name].text_alpha), 12, font_b, true)
Render.Text('»', Vector2.new(screenpos.x + 15, screenpos.y - name_size.y / 2), Color.new(color_set.text_color_r, color_set.text_color_g, color_set.text_color_b, self.render_stuff[startname][temp_fov_name].text_alpha), 12, font_b, true)
end
if lua_elements.nade_helper:GetBool() == true then
color_circle = Color.new(0, 170/255, 0, 250/255)
color_circl = Color.new(0, 170/255, 0, 160/255)
color_circ = Color.new(0, 155/255, 0, 155/255)
color_cir = Color.new(0, 135/255, 0, 140/255)
color_ci = Color.new(0, 110/255, 0, 135/255)
color_c1 = Color.new(0, 85/255, 0, 130/255)
color_c1r = Color.new(0, 60/255, 0, 120/255)
color_c1rc = Color.new(0, 55/255, 0, 35/255)
color_c1rcl = Color.new(0, 45/255, 0, 15/255)
color_c1rcle = Color.new(0, 35/255, 0, 5/255)
else
color_circle = Color.new(170/255, 170/255, 0, 250/255)
color_circl = Color.new(170/255, 170/255, 0, 160/255)
color_circ = Color.new(155/255, 155/255, 0, 155/255)
color_cir = Color.new(135/255, 135/255, 0, 140/255)
color_ci = Color.new(110/255, 110/255, 0, 135/255)
color_c1 = Color.new(85/255, 85/255, 0, 130/255)
color_c1r = Color.new(60/255, 60/255, 0, 120/255)
color_c1rc = Color.new(55/255, 55/255, 0, 35/255)
color_c1rcl = Color.new(45/255, 45/255, 0, 15/255)
color_c1rcle = Color.new(35/255, 35/255, 0, 5/255)
end
Render.CircleFilled(screenpos, 9, 15, color_c1rcle); Render.CircleFilled(screenpos, 8, 15, color_c1rcl);
Render.CircleFilled(screenpos, 7, 15, color_c1rc); Render.CircleFilled(screenpos, 6, 15, color_c1r);
Render.CircleFilled(screenpos, 5, 15, color_c1); Render.CircleFilled(screenpos, 4, 15, color_ci);
Render.CircleFilled(screenpos, 3, 15, color_cir); Render.CircleFilled(screenpos, 2, 15, color_circ);
Render.CircleFilled(screenpos, 1, 15, color_circl); Render.CircleFilled(screenpos, 1, 15, color_circle);
end
if(bestlength < nade_type_size.x) then bestlength = nade_type_size.x end
if(distance < 400.0 and (temp_nade and temp_nade == startspot or temp_nade == nil or lua_elements.nade_helper:GetBool() == false)) then
self.render_stuff[startname].box_length = math_helpers:lerp(self.render_stuff[startname].box_length, bestlength, GlobalVars.frametime * 20.0)
self.render_stuff[startname].box_height = math_helpers:lerp(self.render_stuff[startname].box_height, num_spots * 14, GlobalVars.frametime * 20.0)
self.render_stuff[startname].icon_alpha = math_helpers:lerp(self.render_stuff[startname].icon_alpha, 0.0, GlobalVars.frametime * 20.0)
self.render_stuff[startname].box_additions_alpha = math_helpers:lerp(self.render_stuff[startname].box_additions_alpha, self.render_stuff[startname].global_alpha, GlobalVars.frametime * 20.0)
if(bestlength - self.render_stuff[startname].box_length < 0.1) then
self.render_stuff[startname].box_additions_alpha = math_helpers:lerp(self.render_stuff[startname].box_additions_alpha, self.render_stuff[startname].global_alpha, GlobalVars.frametime * 20.0)
self.render_stuff[startname].text_alpha = math_helpers:lerp(self.render_stuff[startname].text_alpha, self.render_stuff[startname].global_alpha, GlobalVars.frametime * 20.0)
end
elseif(distance > 400 or (temp_nade and temp_nade ~= startspot)) then
self.render_stuff[startname].text_alpha = math_helpers:lerp(self.render_stuff[startname].text_alpha, 0.0, GlobalVars.frametime * 20.0)
if(self.render_stuff[startname].text_alpha < 0.01) then
self.render_stuff[startname].box_additions_alpha = math_helpers:lerp(self.render_stuff[startname].box_additions_alpha, 0.0, GlobalVars.frametime * 20.0)
self.render_stuff[startname].icon_alpha = math_helpers:lerp(self.render_stuff[startname].icon_alpha, self.render_stuff[startname].global_alpha, GlobalVars.frametime * 20.0)
self.render_stuff[startname].box_length = math_helpers:lerp(self.render_stuff[startname].box_length, 16, GlobalVars.frametime * 20.0)
self.render_stuff[startname].box_height = math_helpers:lerp(self.render_stuff[startname].box_height, 1, GlobalVars.frametime * 20.0)
end
end
Render.BoxFilled(Vector2.new(screenpos.x - self.render_stuff[startname].box_length / 2 - 3, screenpos.y + 6), Vector2.new(screenpos.x + self.render_stuff[startname].box_length / 2 + 3, screenpos.y - self.render_stuff[startname].box_height - 15), Color.new(color_set.body_r, color_set.body_g, color_set.body_b, 0.95 * self.render_stuff[startname].global_alpha)) -- тело
Render.Box(Vector2.new(screenpos.x - self.render_stuff[startname].box_length / 2 - 3, screenpos.y + 5), Vector2.new(screenpos.x + self.render_stuff[startname].box_length / 2 + 3, screenpos.y - self.render_stuff[startname].box_height - 14), Color.new(5/255, 4/255, 0, self.render_stuff[startname].global_alpha))
local icon_size = Render.CalcWeaponIconSize(weapon_id, 15)
Render.WeaponIcon(weapon_id, Vector2.new(screenpos.x - icon_size.x / 2 + 1, screenpos.y - icon_size.y + 2), Color.new(color_set.text_color_r, color_set.text_color_g, color_set.text_color_b, self.render_stuff[startname].icon_alpha), 15, true)
num_spots = 0
for endname, endspot in pairs(startspot) do
if(type(endspot) == "table") then
local icon_size = Render.CalcWeaponIconSize(weapon_id, 15)
local name_size = Render.CalcTextSize(endname, 13, font)
if weapon_id == 46 then
Render.WeaponIcon(weapon_id, Vector2.new(screenpos.x - nade_type_size.x / 2 + 15, screenpos.y - self.render_stuff[startname].box_height - nade_type_size.y), Color.new(color_set.text_color_r, color_set.text_color_g, color_set.text_color_b, self.render_stuff[startname].text_alpha), 15, true)
elseif weapon_id == 44 then
Render.WeaponIcon(weapon_id, Vector2.new(screenpos.x - nade_type_size.x / 2 + 24, screenpos.y - self.render_stuff[startname].box_height - nade_type_size.y), Color.new(color_set.text_color_r, color_set.text_color_g, color_set.text_color_b, self.render_stuff[startname].text_alpha), 15, true)
end
Render.Text(endname, Vector2.new(screenpos.x - name_size.x / 2, screenpos.y - (14 * num_spots / 0.98) - name_size.y + 1), Color.new(color_set.text_color_r, color_set.text_color_g, color_set.text_color_b, self.render_stuff[startname].text_alpha), 13, font, true)
num_spots = num_spots + 1
end
end
::continue::
end
end
for i = 1, 10 do
if(self.custom_maps[i] and lua_elements.nade_helper_types:GetBool(i+1) == true) then
for startname, startspot in pairs(self.custom_maps[i]) do
if(lua_elements.nade_helper_types:GetBool(i+1) == false or lua_elements.nade_helper_nades:GetBool(self.menu_nades[tostring(weapon_id)]) == false or startspot.map ~= map or tostring(weapon_id) ~= startspot.type) then goto continue end
if(self.render_stuff[startname] == nil) then self.render_stuff[startname] = {} end
if(self.render_stuff[startname].global_alpha == nil) then self.render_stuff[startname].global_alpha = 0.0 end
if(self.render_stuff[startname].box_length == nil) then self.render_stuff[startname].box_length = 30.0 end
if(self.render_stuff[startname].box_height == nil) then self.render_stuff[startname].box_height = 30.0 end
if(self.render_stuff[startname].text_alpha == nil) then self.render_stuff[startname].text_alpha = 0.0 end
if(self.render_stuff[startname].icon_alpha == nil) then self.render_stuff[startname].icon_alpha = 0.0 end
if(self.render_stuff[startname].box_additions_alpha == nil) then self.render_stuff[startname].box_additions_alpha = 0.0 end
local distance = vecOrigin:DistTo(startspot.pos)
if(distance > 1750.0) then
self.render_stuff[startname].global_alpha = math_helpers:lerp(self.render_stuff[startname].global_alpha, 0.0, GlobalVars.frametime * 20.0)
else
local trace = EngineTrace.TraceRay(vecEyePosition, startspot.pos, localplayer, 0x200400B)
if(trace.fraction > 0.98) then
if(distance > 1250.0) then
self.render_stuff[startname].global_alpha = math_helpers:lerp(self.render_stuff[startname].global_alpha, 0.4, GlobalVars.frametime * 20.0)
elseif(distance < 5.0) then
self.render_stuff[startname].global_alpha = math_helpers:lerp(self.render_stuff[startname].global_alpha, 1.0, GlobalVars.frametime * 20.0)
else
self.render_stuff[startname].global_alpha = math_helpers:lerp(self.render_stuff[startname].global_alpha, 0.8, GlobalVars.frametime * 20.0)
end
else
self.render_stuff[startname].global_alpha = math_helpers:lerp(self.render_stuff[startname].global_alpha, 0.0, GlobalVars.frametime * 20.0)
end
end
if(self.render_stuff[startname].global_alpha < 0.01) then goto continue end
local screenpos = Render.WorldToScreen(Vector.new(startspot.pos.x, startspot.pos.y, startspot.pos.z + 10.0))
local nade_type_size = Render.CalcTextSize(self.nade_type[tostring(weapon_id)], 13, font)
local bestlength = 0
local num_spots = 0
local temp_fov_nade = nil
local temp_fov_name = nil
local bestfov = lua_elements.nade_helper_fov:GetInt()
for endname, endspot in pairs(startspot) do
if(type(endspot) == "table") then
local name_size = Render.CalcTextSize(endname, 13, font)
if(name_size.x > bestlength) then bestlength = name_size.x end
if(self.render_stuff[startname][endname] == nil) then self.render_stuff[startname][endname] = {} end
if(self.render_stuff[startname][endname].global_alpha == nil) then self.render_stuff[startname][endname].global_alpha = 0.0 end
if(self.render_stuff[startname][endname].box_length == nil) then self.render_stuff[startname][endname].box_length = 10.0 end
if(self.render_stuff[startname][endname].text_alpha == nil) then self.render_stuff[startname][endname].text_alpha = 0.0 end
if(self.render_stuff[startname][endname].circle_color == nil) then self.render_stuff[startname][endname].circle_color = Color.new(0.15, 0.15, 0.15, 0.0) end
if(self.render_stuff[startname][endname].description_box_height == nil) then self.render_stuff[startname][endname].description_box_height = 0.0 end
if(self.render_stuff[startname][endname].description_text_alpha == nil) then self.render_stuff[startname][endname].description_text_alpha = 0.0 end
if(endspot.endposition == nil) then
local vecStart = Vector.new(startspot.pos.x, startspot.pos.y, startspot.pos.z + 64.0)
local forward = Cheat.AngleToForward(endspot.ang)
local vecEnd = Vector.new(vecStart.x + 800.0 * forward.x, vecStart.y + 800.0 * forward.y, vecStart.z + 800.0 * forward.z)
local trace = EngineTrace.TraceRay(vecStart, vecEnd, localplayer, 0x46004003)
endspot.endposition = Vector.new(trace.endpos.x, trace.endpos.y, trace.endpos.z)
end
if(endspot.jumpthresthold == nil) then
endspot.jumpthresthold = 0
end
if(endspot.movedirection == nil) then
endspot.movedirection = 0
end
if(endspot.backupdirection == nil) then
endspot.backupdirection = 0
end
if(endspot.backupduration == nil) then
endspot.backupduration = 1
end
if(endspot.extendforward == nil) then
endspot.extendforward = false
end
local angles = math_helpers:normalizeangles(math_helpers:calcangle(vecEyePosition, endspot.endposition))
local fov = math.sqrt((angles.pitch - angViewAngles.pitch) ^ 2 + (angles.yaw - angViewAngles.yaw) ^ 2)
fov = math_helpers:normalizefloat(fov)
fov = math.abs(fov)
if(fov < bestfov and distance <= 50.0 and startspot == temp_nade) then
bestfov = fov
temp_fov_nade = endspot
temp_fov_name = endname
if(self.should_throw == false) then self.closest_nade = endspot end
end
num_spots = num_spots + 1
end
end
for endname, endspot in pairs(startspot) do
if(type(endspot) ~= "table" or endspot == temp_fov_nade) then goto continue end
local screenpos = Render.WorldToScreen(endspot.endposition)
local name_size = Render.CalcTextSize(endname, 12, font_b)
local r = 255
local g = 255
local b = 255
local desired_box_length = name_size.x + 20
if(endspot.description and string.len(endspot.description) > 0) then
local desc_size = Render.CalcTextSize(endspot.description, 10, font_p)
desired_box_height = 16
if(self.render_stuff[startname][endname].description_text_alpha > 0.01) then desired_box_length = math.max(desired_box_length, desc_size.x) end
end
self.render_stuff[startname][endname].description_text_alpha = math_helpers:lerp(self.render_stuff[startname][endname].description_text_alpha, 0.0, GlobalVars.frametime * 60.0)
if(distance > 50.0 or startspot ~= temp_nade) then
self.render_stuff[startname][endname].text_alpha = math_helpers:lerp(self.render_stuff[startname][endname].text_alpha, 0.0, GlobalVars.frametime * 60.0)
if(self.render_stuff[startname][endname].text_alpha < 0.01) then
self.render_stuff[startname][endname].box_length = math_helpers:lerp(self.render_stuff[startname][endname].box_length, 10.0, GlobalVars.frametime * 30.0)
self.render_stuff[startname][endname].description_box_height = math_helpers:lerp(self.render_stuff[startname][endname].description_box_height, 0.0, GlobalVars.frametime * 30.0)
if(self.render_stuff[startname][endname].box_length - 10.0 < 0.1 and self.render_stuff[startname][endname].description_box_height < 0.1) then
self.render_stuff[startname][endname].global_alpha = math_helpers:lerp(self.render_stuff[startname][endname].global_alpha, 0.0, GlobalVars.frametime * 60.0)
end
end
else
if(screenpos.x + self.render_stuff[startname][endname].box_length + 2 > lua_elements.screensize.x or screenpos.x < 12 or screenpos.y + 10 > lua_elements.screensize.y or screenpos.y < 10) then
self.render_stuff[startname][endname].global_alpha = math_helpers:lerp(self.render_stuff[startname][endname].global_alpha, 1.0, GlobalVars.frametime * 60.0)
else
self.render_stuff[startname][endname].global_alpha = math_helpers:lerp(self.render_stuff[startname][endname].global_alpha, 0.6, GlobalVars.frametime * 60.0)
end
if(self.render_stuff[startname][endname].global_alpha > 0.58) then
self.render_stuff[startname][endname].box_length = math_helpers:lerp(self.render_stuff[startname][endname].box_length, desired_box_length, GlobalVars.frametime * 30.0)
if(desired_box_length - self.render_stuff[startname][endname].box_length < 0.1) then
self.render_stuff[startname][endname].text_alpha = math_helpers:lerp(self.render_stuff[startname][endname].text_alpha, self.render_stuff[startname][endname].global_alpha, GlobalVars.frametime * 60.0)
if(self.render_stuff[startname][endname].description_text_alpha < 0.01) then
self.render_stuff[startname][endname].description_box_height = math_helpers:lerp(self.render_stuff[startname][endname].description_box_height, 0.0, GlobalVars.frametime * 60.0)
end
end
end
end
self.render_stuff[startname][endname].circle_color = Color.new(r, g, b, self.render_stuff[startname][endname].global_alpha)
if(self.render_stuff[startname][endname].global_alpha < 0.01) then goto continue end
if(screenpos.x + self.render_stuff[startname][endname].box_length + 2 > lua_elements.screensize.x or screenpos.x < 12 or screenpos.y + 10 > lua_elements.screensize.y or screenpos.y < 10) then
local vecdelta = Vector2.new(screenpos.x - screencenter.x, screenpos.y - screencenter.y)
local length = #vecdelta
local cos = vecdelta.x / length
local sin = vecdelta.y / length
local max_legnth = #screencenter
local newpos = Vector2.new(screencenter.x + max_legnth * cos, screencenter.y + max_legnth * sin)
if(newpos.x + self.render_stuff[startname][endname].box_length > lua_elements.screensize.x) then newpos.x = lua_elements.screensize.x - self.render_stuff[startname][endname].box_length - 18
elseif(newpos.x < 16) then newpos.x = 28 end
if(newpos.y + 16 > lua_elements.screensize.y) then newpos.y = lua_elements.screensize.y - 28
elseif(newpos.y < 16) then newpos.y = 28 end
screenpos = newpos
end
Render.BoxFilled(Vector2.new(screenpos.x - 10, screenpos.y - 11), Vector2.new(screenpos.x + self.render_stuff[startname][endname].box_length, screenpos.y + 11), Color.new(color_set.target_r, color_set.target_g, color_set.target_b, self.render_stuff[startname][endname].global_alpha + 50))
Render.Box(Vector2.new(screenpos.x - 10, screenpos.y - 11), Vector2.new(screenpos.x + self.render_stuff[startname][endname].box_length, screenpos.y + 11), Color.new(5/255, 4/255, 0, self.render_stuff[startname][endname].global_alpha + 80))
Render.Line(Vector2.new(screenpos.x + 10, screenpos.y - self.render_stuff[startname][endname].description_box_height + 8), Vector2.new(screenpos.x + 10, screenpos.y + self.render_stuff[startname][endname].description_box_height - 7), Color.new(0, 0, 0, self.render_stuff[startname][endname].text_alpha))
Render.Line(Vector2.new(screenpos.x + 10, screenpos.y - self.render_stuff[startname][endname].description_box_height + 7), Vector2.new(screenpos.x + 10, screenpos.y + self.render_stuff[startname][endname].description_box_height - 7), Color.new(color_set.text_color_r, color_set.text_color_g, color_set.text_color_b, self.render_stuff[startname][endname].text_alpha))
Render.Text(endname, Vector2.new(screenpos.x + 15, screenpos.y - name_size.y / 2), Color.new(color_set.text_color_r, color_set.text_color_g, color_set.text_color_b, self.render_stuff[startname][endname].text_alpha), 12, font_b, true)
color_circle = Color.new(170/255, 0, 0, 250/255)
color_circl = Color.new(170/255, 0, 0, 160/255)
color_circ = Color.new(155/255, 0, 0, 155/255)
color_cir = Color.new(135/255, 0, 0, 140/255)
color_ci = Color.new(110/255, 0, 0, 135/255)
color_c1 = Color.new(85/255, 0, 0, 130/255)
color_c1r = Color.new(60/255, 0, 0, 120/255)
color_c1rc = Color.new(55/255, 0, 0, 35/255)
color_c1rcl = Color.new(45/255, 0, 0, 15/255)
color_c1rcle = Color.new(35/255, 0, 0, 5/255)
Render.CircleFilled(screenpos, 9, 15, color_c1rcle); Render.CircleFilled(screenpos, 8, 15, color_c1rcl);
Render.CircleFilled(screenpos, 7, 15, color_c1rc); Render.CircleFilled(screenpos, 6, 15, color_c1r);
Render.CircleFilled(screenpos, 5, 15, color_c1); Render.CircleFilled(screenpos, 4, 15, color_ci);
Render.CircleFilled(screenpos, 3, 15, color_cir); Render.CircleFilled(screenpos, 2, 15, color_circ);
Render.CircleFilled(screenpos, 1, 15, color_circl); Render.CircleFilled(screenpos, 1, 15, color_circle);
::continue::
end
if(temp_fov_nade) then
local screenpos = Render.WorldToScreen(temp_fov_nade.endposition)
local name_size = Render.CalcTextSize(temp_fov_name, 12, font_b)
local r = 255
local g = 255
local b = 255
self.render_stuff[startname][temp_fov_name].global_alpha = math_helpers:lerp(self.render_stuff[startname][temp_fov_name].global_alpha, 0.9, GlobalVars.frametime * 30.0)
self.render_stuff[startname][temp_fov_name].circle_color = Color.new(r, g, b, self.render_stuff[startname][temp_fov_name].global_alpha)
local desired_box_length = name_size.x + 20
local desired_box_height = 0
if(temp_fov_nade.description and string.len(temp_fov_nade.description) > 0) then
local desc_size = Render.CalcTextSize(temp_fov_nade.description, 10, font_p)
desired_box_height = 16
if(desc_size.x + 11 > desired_box_length) then desired_box_length = math.max(desired_box_length, desc_size.x + 12) end
end
if(self.render_stuff[startname][temp_fov_name].global_alpha > 0.88) then
self.render_stuff[startname][temp_fov_name].box_length = math_helpers:lerp(self.render_stuff[startname][temp_fov_name].box_length, desired_box_length, GlobalVars.frametime * 30.0)
self.render_stuff[startname][temp_fov_name].description_box_height = math_helpers:lerp(self.render_stuff[startname][temp_fov_name].description_box_height, desired_box_height, GlobalVars.frametime * 30.0)
if(desired_box_length - self.render_stuff[startname][temp_fov_name].box_length < 0.1 and desired_box_height - self.render_stuff[startname][temp_fov_name].description_box_height < 0.1) then
self.render_stuff[startname][temp_fov_name].text_alpha = math_helpers:lerp(self.render_stuff[startname][temp_fov_name].text_alpha, 1.0, GlobalVars.frametime * 30.0)
self.render_stuff[startname][temp_fov_name].description_text_alpha = math_helpers:lerp(self.render_stuff[startname][temp_fov_name].description_text_alpha, 1.0, GlobalVars.frametime * 30.0)
end
end
if(screenpos.x + self.render_stuff[startname][temp_fov_name].box_length + 2 > lua_elements.screensize.x or screenpos.x < 12 or screenpos.y + 10 > lua_elements.screensize.y or screenpos.y < 10) then
local vecdelta = Vector2.new(screenpos.x - screencenter.x, screenpos.y - screencenter.y)
local length = #vecdelta
local cos = vecdelta.x / length
local sin = vecdelta.y / length
local max_legnth = #screencenter
local newpos = Vector2.new(screencenter.x + max_legnth * cos, screencenter.y + max_legnth * sin)
if(newpos.x + self.render_stuff[startname][temp_fov_name].box_length > lua_elements.screensize.x) then newpos.x = lua_elements.screensize.x - self.render_stuff[startname][temp_fov_name].box_length + 1
elseif(newpos.x < 16) then newpos.x = 28 end
if(newpos.y + 16 > lua_elements.screensize.y) then newpos.y = lua_elements.screensize.y - 28
elseif(newpos.y < 16) then newpos.y = 28 end
screenpos = newpos
end
if(temp_fov_nade.description and string.len(temp_fov_nade.description) > 0) then
local desc_size = Render.CalcTextSize(temp_fov_nade.description, 10, font_p)
Render.BoxFilled(Vector2.new(screenpos.x - 10, screenpos.y - 11), Vector2.new(screenpos.x + self.render_stuff[startname][temp_fov_name].box_length + 8, screenpos.y), Color.new(color_set.target_r, color_set.target_g, color_set.target_b, self.render_stuff[startname][temp_fov_name].global_alpha))
Render.BoxFilled(Vector2.new(screenpos.x - 10, screenpos.y), Vector2.new(screenpos.x + self.render_stuff[startname][temp_fov_name].box_length + 8, screenpos.y - 4 + self.render_stuff[startname][temp_fov_name].description_box_height), Color.new(color_set.target_r, color_set.target_g, color_set.target_b, self.render_stuff[startname][temp_fov_name].global_alpha))
Render.Box(Vector2.new(screenpos.x - 10, screenpos.y - 11), Vector2.new(screenpos.x + self.render_stuff[startname][temp_fov_name].box_length + 8, screenpos.y - 4 + self.render_stuff[startname][temp_fov_name].description_box_height), Color.new(5/255, 4/255, 0, self.render_stuff[startname].global_alpha))
Render.Line(Vector2.new(screenpos.x + 10, screenpos.y - self.render_stuff[startname][temp_fov_name].description_box_height + 9), Vector2.new(screenpos.x + 10, screenpos.y + self.render_stuff[startname][temp_fov_name].description_box_height - 8), Color.new(0, 0, 0, self.render_stuff[startname][temp_fov_name].global_alpha))
Render.Line(Vector2.new(screenpos.x + 10, screenpos.y - self.render_stuff[startname][temp_fov_name].description_box_height + 8), Vector2.new(screenpos.x + 10, screenpos.y + self.render_stuff[startname][temp_fov_name].description_box_height - 8), Color.new(color_set.text_color_r, color_set.text_color_g, color_set.text_color_b, self.render_stuff[startname][temp_fov_name].global_alpha))
Render.Text(temp_fov_name, Vector2.new(screenpos.x + 23, screenpos.y - name_size.y / 2 - 3), Color.new(color_set.text_color_r, color_set.text_color_g, color_set.text_color_b, self.render_stuff[startname][temp_fov_name].text_alpha), 12, font_b, true)
Render.Text(temp_fov_nade.description, Vector2.new(screenpos.x + 15, screenpos.y - 2 + self.render_stuff[startname][temp_fov_name].description_box_height / 2 - desc_size.y / 2), Color.new(0, 0, 0, self.render_stuff[startname][temp_fov_name].global_alpha), 10, font_p)
Render.Text(temp_fov_nade.description, Vector2.new(screenpos.x + 16, screenpos.y - 2 + self.render_stuff[startname][temp_fov_name].description_box_height / 2 - desc_size.y / 2), Color.new(color_set.text_color_r, color_set.text_color_g, color_set.text_color_b, self.render_stuff[startname][temp_fov_name].global_alpha), 10, font_p, true)
Render.Text('»', Vector2.new(screenpos.x + 15, screenpos.y - name_size.y / 2 - 3), Color.new(color_set.text_color_r, color_set.text_color_g, color_set.text_color_b, self.render_stuff[startname][temp_fov_name].text_alpha), 12, font_b, true)
else
Render.BoxFilled(Vector2.new(screenpos.x - 10, screenpos.y - 11), Vector2.new(screenpos.x + self.render_stuff[startname][temp_fov_name].box_length + 8, screenpos.y + 11), Color.new(color_set.target_r, color_set.target_g, color_set.target_b, self.render_stuff[startname][temp_fov_name].global_alpha))
Render.Box(Vector2.new(screenpos.x - 10, screenpos.y - 11), Vector2.new(screenpos.x + self.render_stuff[startname][temp_fov_name].box_length + 8, screenpos.y + 11), Color.new(5/255, 4/255, 0, self.render_stuff[startname].global_alpha))
Render.Line(Vector2.new(screenpos.x + 10, screenpos.y - self.render_stuff[startname][temp_fov_name].description_box_height + 8), Vector2.new(screenpos.x + 10, screenpos.y + self.render_stuff[startname][temp_fov_name].description_box_height - 7), Color.new(0, 0, 0, self.render_stuff[startname][temp_fov_name].global_alpha))
Render.Line(Vector2.new(screenpos.x + 10, screenpos.y - self.render_stuff[startname][temp_fov_name].description_box_height + 7), Vector2.new(screenpos.x + 10, screenpos.y + self.render_stuff[startname][temp_fov_name].description_box_height - 7), Color.new(color_set.text_color_r, color_set.text_color_g, color_set.text_color_b, self.render_stuff[startname][temp_fov_name].global_alpha))
Render.Text(temp_fov_name, Vector2.new(screenpos.x + 23, screenpos.y - name_size.y / 2), Color.new(color_set.text_color_r, color_set.text_color_g, color_set.text_color_b, self.render_stuff[startname][temp_fov_name].text_alpha), 12, font_b, true)
Render.Text('»', Vector2.new(screenpos.x + 15, screenpos.y - name_size.y / 2), Color.new(color_set.text_color_r, color_set.text_color_g, color_set.text_color_b, self.render_stuff[startname][temp_fov_name].text_alpha), 12, font_b, true)
end
if lua_elements.nade_helper:GetBool() == true then
color_circle = Color.new(0, 170/255, 0, 250/255)
color_circl = Color.new(0, 170/255, 0, 160/255)
color_circ = Color.new(0, 155/255, 0, 155/255)
color_cir = Color.new(0, 135/255, 0, 140/255)
color_ci = Color.new(0, 110/255, 0, 135/255)
color_c1 = Color.new(0, 85/255, 0, 130/255)
color_c1r = Color.new(0, 60/255, 0, 120/255)
color_c1rc = Color.new(0, 55/255, 0, 35/255)
color_c1rcl = Color.new(0, 45/255, 0, 15/255)
color_c1rcle = Color.new(0, 35/255, 0, 5/255)
else
color_circle = Color.new(170/255, 170/255, 0, 250/255)
color_circl = Color.new(170/255, 170/255, 0, 160/255)
color_circ = Color.new(155/255, 155/255, 0, 155/255)
color_cir = Color.new(135/255, 135/255, 0, 140/255)
color_ci = Color.new(110/255, 110/255, 0, 135/255)
color_c1 = Color.new(85/255, 85/255, 0, 130/255)
color_c1r = Color.new(60/255, 60/255, 0, 120/255)
color_c1rc = Color.new(55/255, 55/255, 0, 35/255)
color_c1rcl = Color.new(45/255, 45/255, 0, 15/255)
color_c1rcle = Color.new(35/255, 35/255, 0, 5/255)
end
Render.CircleFilled(screenpos, 9, 15, color_c1rcle); Render.CircleFilled(screenpos, 8, 15, color_c1rcl);
Render.CircleFilled(screenpos, 7, 15, color_c1rc); Render.CircleFilled(screenpos, 6, 15, color_c1r);
Render.CircleFilled(screenpos, 5, 15, color_c1); Render.CircleFilled(screenpos, 4, 15, color_ci);
Render.CircleFilled(screenpos, 3, 15, color_cir); Render.CircleFilled(screenpos, 2, 15, color_circ);
Render.CircleFilled(screenpos, 1, 15, color_circl); Render.CircleFilled(screenpos, 1, 15, color_circle);
end
if(bestlength < nade_type_size.x) then bestlength = nade_type_size.x end
if(distance < 400.0 and (temp_nade and temp_nade == startspot or temp_nade == nil or lua_elements.nade_helper:GetBool() == false)) then
self.render_stuff[startname].box_length = math_helpers:lerp(self.render_stuff[startname].box_length, bestlength, GlobalVars.frametime * 20.0)
self.render_stuff[startname].box_height = math_helpers:lerp(self.render_stuff[startname].box_height, num_spots * 14, GlobalVars.frametime * 20.0)
self.render_stuff[startname].icon_alpha = math_helpers:lerp(self.render_stuff[startname].icon_alpha, 0.0, GlobalVars.frametime * 20.0)
self.render_stuff[startname].box_additions_alpha = math_helpers:lerp(self.render_stuff[startname].box_additions_alpha, self.render_stuff[startname].global_alpha, GlobalVars.frametime * 20.0)
if(bestlength - self.render_stuff[startname].box_length < 0.1) then
self.render_stuff[startname].box_additions_alpha = math_helpers:lerp(self.render_stuff[startname].box_additions_alpha, self.render_stuff[startname].global_alpha, GlobalVars.frametime * 20.0)
self.render_stuff[startname].text_alpha = math_helpers:lerp(self.render_stuff[startname].text_alpha, self.render_stuff[startname].global_alpha, GlobalVars.frametime * 20.0)
end
elseif(distance > 400 or (temp_nade and temp_nade ~= startspot)) then
self.render_stuff[startname].text_alpha = math_helpers:lerp(self.render_stuff[startname].text_alpha, 0.0, GlobalVars.frametime * 20.0)
if(self.render_stuff[startname].text_alpha < 0.01) then
self.render_stuff[startname].box_additions_alpha = math_helpers:lerp(self.render_stuff[startname].box_additions_alpha, 0.0, GlobalVars.frametime * 20.0)
self.render_stuff[startname].icon_alpha = math_helpers:lerp(self.render_stuff[startname].icon_alpha, self.render_stuff[startname].global_alpha, GlobalVars.frametime * 20.0)
self.render_stuff[startname].box_length = math_helpers:lerp(self.render_stuff[startname].box_length, 16, GlobalVars.frametime * 20.0)
self.render_stuff[startname].box_height = math_helpers:lerp(self.render_stuff[startname].box_height, 1, GlobalVars.frametime * 20.0)
end
end
Render.BoxFilled(Vector2.new(screenpos.x - self.render_stuff[startname].box_length / 2 - 3, screenpos.y + 6), Vector2.new(screenpos.x + self.render_stuff[startname].box_length / 2 + 3, screenpos.y - self.render_stuff[startname].box_height - 15), Color.new(color_set.body_r, color_set.body_g, color_set.body_b, 0.95 * self.render_stuff[startname].global_alpha)) -- тело
Render.Box(Vector2.new(screenpos.x - self.render_stuff[startname].box_length / 2 - 3, screenpos.y + 5), Vector2.new(screenpos.x + self.render_stuff[startname].box_length / 2 + 3, screenpos.y - self.render_stuff[startname].box_height - 14), Color.new(5/255, 4/255, 0, self.render_stuff[startname].global_alpha))
local icon_size = Render.CalcWeaponIconSize(weapon_id, 15)
Render.WeaponIcon(weapon_id, Vector2.new(screenpos.x - icon_size.x / 2 + 1, screenpos.y - icon_size.y + 2), Color.new(color_set.text_color_r, color_set.text_color_g, color_set.text_color_b, self.render_stuff[startname].icon_alpha), 15, true)
num_spots = 0
for endname, endspot in pairs(startspot) do
if(type(endspot) == "table") then
local icon_size = Render.CalcWeaponIconSize(weapon_id, 15)
local name_size = Render.CalcTextSize(endname, 13, font)
if weapon_id == 46 then
Render.WeaponIcon(weapon_id, Vector2.new(screenpos.x - nade_type_size.x / 2 + 15, screenpos.y - self.render_stuff[startname].box_height - nade_type_size.y), Color.new(color_set.text_color_r, color_set.text_color_g, color_set.text_color_b, self.render_stuff[startname].text_alpha), 15, true)
elseif weapon_id == 44 then
Render.WeaponIcon(weapon_id, Vector2.new(screenpos.x - nade_type_size.x / 2 + 24, screenpos.y - self.render_stuff[startname].box_height - nade_type_size.y), Color.new(color_set.text_color_r, color_set.text_color_g, color_set.text_color_b, self.render_stuff[startname].text_alpha), 15, true)
end
Render.Text(endname, Vector2.new(screenpos.x - name_size.x / 2, screenpos.y - (14 * num_spots / 0.98) - name_size.y + 1), Color.new(color_set.text_color_r, color_set.text_color_g, color_set.text_color_b, self.render_stuff[startname].text_alpha), 13, font, true)
num_spots = num_spots + 1
end
end
::continue::
end
end
end
end,
on_pre_prediction = function(self, cmd)
self:backup_strafe(cmd)
self:extend_forward(cmd)
if(self.should_throw == true) then
if(self.closest_nade.duck == true) then cmd.buttons = bit.bor(cmd.buttons, 4)
else cmd.buttons = bit.band(cmd.buttons, bit.bnot(4)) end
end
end,
on_prediction = function(self, cmd)
self:update_configs()
local localplayer = EntityList.GetClientEntity(EngineClient.GetLocalPlayer())
if(localplayer == nil) then return end
localplayer = localplayer:GetPlayer()
local velocity = Vector.new(localplayer:GetProp("DT_BasePlayer", "m_vecVelocity[0]"), localplayer:GetProp("DT_BasePlayer", "m_vecVelocity[1]"), localplayer:GetProp("DT_BasePlayer", "m_vecVelocity[2]"))
local weapon = localplayer:GetActiveWeapon()
if(weapon == nil) then return end
local throwtime = weapon:GetProp("DT_BaseCSGrenade", "m_fThrowTime")
local duckamount = localplayer:GetProp("DT_BasePlayer", "m_flDuckAmount")
local throwstrengh = weapon:GetProp("DT_BaseCSGrenade", "m_flThrowStrength")
if(self.should_throw == true) then
cmd.buttons = bit.bor(cmd.buttons, 1)
if(self.closest_nade.duck == true and duckamount ~= 1.0) then return end
if(self.closest_nade.duck == false and duckamount ~= 0.0) then return end
if(self.closest_nade.strength ~= 1.0 and throwstrengh > self.closest_nade.strength) then cmd.buttons = bit.bor(cmd.buttons, 2048); cmd.buttons = bit.band(cmd.buttons, bit.bnot(1)); return end
if(throwstrengh < self.closest_nade.strength) then cmd.buttons = bit.bor(cmd.buttons, 1) end
if(self.run_tick == 0) then self.run_tick = cmd.tick_count end
if(self.closest_nade.runduration > 0 and self.force_forward == false) then
local speedfactor = 1.0
if(self.closest_nade.duck) then speedfactor = 2.93 end
local movedirection = cmd.viewangles.yaw - (self.closest_nade.ang.yaw + self.movedirections[self.closest_nade.movedirection])
local move = Cheat.AngleToForward(QAngle.new(0, movedirection, 0))
cmd.forwardmove = (move.x) * (self.closest_nade.speed * speedfactor)
cmd.sidemove = (move.y) * (self.closest_nade.speed * speedfactor)
end
if(cmd.tick_count - self.run_tick >= self.closest_nade.runduration) then
if(self.jump_tick == 0) then self.jump_tick = cmd.tick_count end
if(self.closest_nade.jump and self.closest_nade.jumpthresthold <= 0) then
cmd.buttons = bit.bor(cmd.buttons, 2)
end
if(cmd.tick_count - self.jump_tick >= self.closest_nade.jumpduration or self.closest_nade.jumpthresthold > 0) then
cmd.buttons = bit.band(cmd.buttons, bit.bnot(1))
cmd.buttons = bit.band(cmd.buttons, bit.bnot(2048))
cmd.viewangles = self.closest_nade.ang
self.force_forward = self.closest_nade.extendforward
end
if(self.closest_nade.jumpthresthold > 0 and cmd.tick_count - self.jump_tick >= self.closest_nade.jumpthresthold) then
cmd.buttons = bit.bor(cmd.buttons, 2)
end
end
if(throwtime > 0.0 and throwtime < GlobalVars.curtime) then
self:setup_backup_strafe(cmd)
self.closest_nade = nil
self.closest_nade_position = nil
self.should_throw = false
self.run_tick = 0
self.jump_tick = 0
self.force_forward = false
menu_elements.autostrafe:SetBool(self.old_autostrafe)
FakeLag.ForceSend()
end
elseif(self.closest_nade_position and lua_elements.nade_helper:GetBool() == true) then
cmd.buttons = bit.band(cmd.buttons, bit.bnot(2048))
local origin = localplayer:GetProp("DT_BaseEntity", "m_vecOrigin")
local onground = (bit.band(localplayer:GetProp("DT_BasePlayer", "m_fFlags"), 1) == 1)
local delta = (self.closest_nade_position - origin)
local length = #delta
if(onground == true and length < 100.0) then
local viewangles = EngineClient.GetViewAngles()
local direction = Cheat.VectorToAngle(delta)
direction.yaw = viewangles.yaw - direction.yaw
local move = Cheat.AngleToForward(direction)
local v1 = bit.band(cmd.buttons, 8) == 8
local v2 = bit.band(cmd.buttons, 16) == 16
local v3 = bit.band(cmd.buttons, 512) == 512
local v4 = bit.band(cmd.buttons, 1024) == 1024
local in_duck = bit.band(cmd.buttons, 4) == 4
local in_move = (v1 or v2 or v3 or v4)
if(in_move == false and length > 0.1) then
cmd.forwardmove = move.x * (450.0 * (math.exp(math_helpers:clamp(length, 0.0, 5.0) - 5.0)) + 1.0)
cmd.sidemove = move.y * (450.0 * (math.exp(math_helpers:clamp(length, 0.0, 5.0) - 5.0)) + 1.0)
if(in_duck == true) then
cmd.forwardmove = cmd.forwardmove * 2.93
cmd.sidemove = cmd.sidemove * 2.93
end
elseif(weapon:GetProp("DT_BaseCSGrenade", "m_bPinPulled") and self.closest_nade and velocity:Length2D() < 10.0) then
self.should_throw = true
self.old_autostrafe = menu_elements.autostrafe:GetBool()
menu_elements.autostrafe:SetBool(false)
end
end
end
end,
}
local function on_firebullet(shot)
end
local function on_ragebotshot(shot)
end
local function on_event(event)
end
local function on_pre_prediction(cmd)
grenade_helper:on_pre_prediction(cmd)
end
local function on_overrideview(setup)
end
local function on_draw()
lua_elements.screensize = EngineClient.GetScreenSize()
grenade_helper:on_draw()
--movement_helper:on_draw()
end
local function on_createmove(cmd)
--movement_helper:on_createmove(cmd)
end
local function on_prediction(cmd)
grenade_helper:on_prediction(cmd)
--movement_helper:on_prediction(cmd)
end
local function on_registered_shot(shot)
end
local function on_destroy()
end
local function on_create_button()
grenade_helper:on_create_nade()
end
local function on_remove_button()
grenade_helper:on_remove_nade()
end
local function on_save_button()
grenade_helper:on_save_nade()
end
local function on_teleport_button()
grenade_helper:on_teleport_nade()
end
local function on_nade_update_button()
grenade_helper:on_nade_update()
end
local function on_properties_combo()
grenade_helper:on_properties()
end
local function on_backupdirection_combo()
grenade_helper:on_backupstrafe()
end
local function on_run_direction_combo()
if(lua_elements.run_direction:GetInt() > 0) then
lua_elements.extend_forward_strenght:SetVisible(true)
else
lua_elements.extend_forward_strenght:SetVisible(false)
end
end
local function check_sub()
for name, element in pairs(lua_elements) do
if(name == "user_name" or name == "screensize") then goto continue end
element:SetVisible(false)
::continue::
end
return 0
end
local sub_state = check_sub()
if(sub_state == 0) then
for name, element in pairs(lua_elements) do
if(string.find(name, "nade_helper") ~= nil or name == "create_nade") then
element:SetVisible(true)
end
end
Cheat.RegisterCallback("createmove", on_createmove)
Cheat.RegisterCallback("draw", on_draw)
Cheat.RegisterCallback("override_view", on_overrideview)
Cheat.RegisterCallback("fire_bullet", on_firebullet)
Cheat.RegisterCallback("ragebot_shot", on_ragebotshot)
Cheat.RegisterCallback("events", on_event)
Cheat.RegisterCallback("pre_prediction", on_pre_prediction)
Cheat.RegisterCallback("prediction", on_prediction)
Cheat.RegisterCallback("registered_shot", on_registered_shot)
Cheat.RegisterCallback("destroy", on_destroy)
lua_elements.create_nade:RegisterCallback(on_create_button)
lua_elements.remove_nade:RegisterCallback(on_remove_button)
lua_elements.save_nade:RegisterCallback(on_save_button)
lua_elements.nade_teleport:RegisterCallback(on_teleport_button)
lua_elements.nade_update_pos_ang:RegisterCallback(on_nade_update_button)
lua_elements.properties:RegisterCallback(on_properties_combo)
lua_elements.backup_direction:RegisterCallback(on_backupdirection_combo)
lua_elements.run_direction:RegisterCallback(on_run_direction_combo)
end