проверить не смогу но ща с вт перепишуИщу подлетающий вверх индикатор дамага, который работает НА ВСЕХ. Только на локала не нужно
local m_enable = Menu.Switch("1","Enable")
function lerp(a, b, c) return a+(b-a)*c end
local hits = []
function on_damage(e)
if e:GetName() ~= "player_hurt" then return end
local entity_attacker = EntityList.GetPlayerForUserID(e:GetInt("attacker"));
local entity_attacked = EntityList.GetPlayerForUserID(e:GetInt("userid"));
local hitgroup = e:GetInt("hitgroup")
local damage = e:GetInt("dmg_health");
local color = (hitgroup == 0) and Color.new(1,0.2,0.2,1) or Color.new(1,1,1,1)
color.a = 0
if (entity_attacker == EntityList.GetLocalPlayer() and entity_attacker ~= entity_attacked)
for i = 1,#hits.length do
if(hits[i].ent == entity_attacked)
hits[i].damage = damage + hits[i].damage
hits[i].alpha = 0
hits[i].offset = 0
return;
end
end
local pos = entity_attacked:GetRenderOrigin()
table.insert(hits,
{
ent = entity_attacked,
hitbox = hitgroup,
position = pos,
damage = damage,
color = color,
offset = 0,
toalphaup = true
}
);
}
}
Cheat.RegisterCallback('events', on_damage)
function draw1()
if not m_enable:Get() then return end
for i = 0, #hits.length do
if(hits[i].pos)then
if(hits[i].toalphaup) then
hits[i].color.a = math.ceil(lerp(hits[i].color.a,1350,4*GlobalVars.frametime))
hits[i].toalphaup = hits[i].color.a < 1350
else
hits[i].color.a = math.floor(lerp(hits[i].color.a,0,2*GlobalVars.frametime))
end
local position = Render.WorldToScreen(hits[i].position)
hits[i].color.a = math.min(255,hits[i].color.a/6)
hits[i].offset = hits[i].offset+50*GlobalVars.frametime
if(hits[i].color.a > 0) then
Render.Text(
'-' .. hits[i].damage,
position,
hits[i].color,
12
)
else
hits[i] = nil
end
end
end
end
Cheat.RegisterCallback('draw', draw1)
это вроде на локал онли, да и переписывать очень лень под нл :спроверить не смогу но ща с вт перепишу
flying damaga:local m_enable = Menu.Switch("1","Enable") function lerp(a, b, c) return a+(b-a)*c end local hits = [] function on_damage(e) if e:GetName() ~= "player_hurt" then return end local entity_attacker = EntityList.GetPlayerForUserID(e:GetInt("attacker")); local entity_attacked = EntityList.GetPlayerForUserID(e:GetInt("userid")); local hitgroup = e:GetInt("hitgroup") local damage = e:GetInt("dmg_health"); local color = (hitgroup == 0) and Color.new(1,0.2,0.2,1) or Color.new(1,1,1,1) color.a = 0 if (entity_attacker == EntityList.GetLocalPlayer() and entity_attacker ~= entity_attacked) for i = 1,#hits.length do if(hits[i].ent == entity_attacked) hits[i].damage = damage + hits[i].damage hits[i].alpha = 0 hits[i].offset = 0 return; end end local pos = entity_attacked:GetRenderOrigin() table.insert(hits, { ent = entity_attacked, hitbox = hitgroup, position = pos, damage = damage, color = color, offset = 0, toalphaup = true } ); } } Cheat.RegisterCallback('events', on_damage) function draw1() if not m_enable:Get() then return end for i = 0, #hits.length do if(hits[i].pos)then if(hits[i].toalphaup) then hits[i].color.a = math.ceil(lerp(hits[i].color.a,1350,4*GlobalVars.frametime)) hits[i].toalphaup = hits[i].color.a < 1350 else hits[i].color.a = math.floor(lerp(hits[i].color.a,0,2*GlobalVars.frametime)) end local position = Render.WorldToScreen(hits[i].position) hits[i].color.a = math.min(255,hits[i].color.a/6) hits[i].offset = hits[i].offset+50*GlobalVars.frametime if(hits[i].color.a > 0) then Render.Text( '-' .. hits[i].damage, position, hits[i].color, 12 ) else hits[i] = nil end end end end Cheat.RegisterCallback('draw', draw1)
дак я переписал под нл, и как понять не локал онли? тип когда любого хитают? окэто вроде на локал онли, да и переписывать очень лень под нл :с
local m_enable = Menu.Switch("1","Enable",false)
function lerp(a, b, c) return a+(b-a)*c end
local hits = {}
function on_damage(e)
if e:GetName() ~= "player_hurt" then return end
local entity_attacker = EntityList.GetPlayerForUserID(e:GetInt("attacker"));
local entity_attacked = EntityList.GetPlayerForUserID(e:GetInt("userid"));
local hitgroup = e:GetInt("hitgroup")
local damage = e:GetInt("dmg_health");
local color = (hitgroup == 0) and Color.new(1,0.2,0.2,1) or Color.new(1,1,1,1)
color.a = 0
--if (entity_attacker == EntityList.GetLocalPlayer() and entity_attacker ~= entity_attacked) then
for i = 1,#hits.length do
if(hits[i].ent == entity_attacked)
hits[i].damage = damage + hits[i].damage
hits[i].alpha = 0
hits[i].offset = 0
return;
end
end
local pos = entity_attacked:GetRenderOrigin()
table.insert(hits,
{
ent = entity_attacked,
hitbox = hitgroup,
position = pos,
damage = damage,
color = color,
offset = 0,
toalphaup = true
}
);
--end
end
Cheat.RegisterCallback('events', on_damage)
function draw1()
if not m_enable:Get() then return end
for i = 0, #hits.length do
if(hits[i].pos)then
if(hits[i].toalphaup) then
hits[i].color.a = math.ceil(lerp(hits[i].color.a,1350,4*GlobalVars.frametime))
hits[i].toalphaup = hits[i].color.a < 1350
else
hits[i].color.a = math.floor(lerp(hits[i].color.a,0,2*GlobalVars.frametime))
end
local position = Render.WorldToScreen(hits[i].position)
hits[i].color.a = math.min(255,hits[i].color.a/6)
hits[i].offset = hits[i].offset+50*GlobalVars.frametime
if(hits[i].color.a > 0) then
Render.Text(
'-' .. hits[i].damage,
position,
hits[i].color,
12
)
else
hits[i] = nil
end
end
end
end
Cheat.RegisterCallback('draw', draw1)
[neverlose.cc][Lua] Error in "marker": [string "local m_enable = Menu.Switch..."]:41: attempt to get length of field 'length' (a nil value)дак я переписал под нл, и как понять не локал онли? тип когда любого хитают? ок
C-like:local m_enable = Menu.Switch("1","Enable",false) [QUOTE="Xissayala, post: 2569243, member: 490962"] дак я переписал под нл, и как понять не локал онли? тип когда любого хитают? ок [CODE=clike]local m_enable = Menu.Switch("1","Enable",false) function lerp(a, b, c) return a+(b-a)*c end local hits = {} function on_damage(e) if e:GetName() ~= "player_hurt" then return end local entity_attacker = EntityList.GetPlayerForUserID(e:GetInt("attacker")); local entity_attacked = EntityList.GetPlayerForUserID(e:GetInt("userid")); local hitgroup = e:GetInt("hitgroup") local damage = e:GetInt("dmg_health"); local color = (hitgroup == 0) and Color.new(1,0.2,0.2,1) or Color.new(1,1,1,1) color.a = 0 --if (entity_attacker == EntityList.GetLocalPlayer() and entity_attacker ~= entity_attacked) then for i = 1,#hits.length do if(hits[i].ent == entity_attacked) hits[i].damage = damage + hits[i].damage hits[i].alpha = 0 hits[i].offset = 0 return; end end local pos = entity_attacked:GetRenderOrigin() table.insert(hits, { ent = entity_attacked, hitbox = hitgroup, position = pos, damage = damage, color = color, offset = 0, toalphaup = true } ); --end end Cheat.RegisterCallback('events', on_damage) function draw1() if not m_enable:Get() then return end for i = 0, #hits.length do if(hits[i].pos)then if(hits[i].toalphaup) then hits[i].color.a = math.ceil(lerp(hits[i].color.a,1350,4*GlobalVars.frametime)) hits[i].toalphaup = hits[i].color.a < 1350 else hits[i].color.a = math.floor(lerp(hits[i].color.a,0,2*GlobalVars.frametime)) end local position = Render.WorldToScreen(hits[i].position) hits[i].color.a = math.min(255,hits[i].color.a/6) hits[i].offset = hits[i].offset+50*GlobalVars.frametime if(hits[i].color.a > 0) then Render.Text( '-' .. hits[i].damage, position, hits[i].color, 12 ) else hits[i] = nil end end end end Cheat.RegisterCallback('draw', draw1)
Дай SS
бля забыл поменять, на[neverlose.cc][Lua] Error in "marker": [string "local m_enable = Menu.Switch..."]:41: attempt to get length of field 'length' (a nil value)
stack traceback:
[string "local m_enable = Menu.Switch..."]:41: in function <[string "local m_enable = Menu.Switch..."]:39>
ну вот к примеру. я хитнул чувака на 10 хп, и он меня на 10 хп. тоже самое работает на всех игроков.
(особенно удобно при игре 2х2, 5х5, чтобы видеть как дают дамаг твои тиммейты/видеть как их ебашут)
local m_enable = Menu.Switch("1","Enable",false)
function lerp(a, b, c) return a+(b-a)*c end
local hits = {}
function on_damage(e)
if e:GetName() ~= "player_hurt" then return end
local entity_attacker = EntityList.GetPlayerForUserID(e:GetInt("attacker"));
local entity_attacked = EntityList.GetPlayerForUserID(e:GetInt("userid"));
local hitgroup = e:GetInt("hitgroup")
local damage = e:GetInt("dmg_health");
local color = (hitgroup == 0) and Color.new(1,0.2,0.2,1) or Color.new(1,1,1,1)
color.a = 0
--if (entity_attacker == EntityList.GetLocalPlayer() and entity_attacker ~= entity_attacked) then
for i = 1,#hits do
if(hits[i].ent == entity_attacked)
hits[i].damage = damage + hits[i].damage
hits[i].alpha = 0
hits[i].offset = 0
return;
end
end
local pos = entity_attacked:GetRenderOrigin()
table.insert(hits,
{
ent = entity_attacked,
hitbox = hitgroup,
position = pos,
damage = damage,
color = color,
offset = 0,
toalphaup = true
}
);
--end
end
Cheat.RegisterCallback('events', on_damage)
function draw1()
if not m_enable:Get() then return end
for i = 0, #hits do
if(hits[i].pos)then
if(hits[i].toalphaup) then
hits[i].color.a = math.ceil(lerp(hits[i].color.a,1350,4*GlobalVars.frametime))
hits[i].toalphaup = hits[i].color.a < 1350
else
hits[i].color.a = math.floor(lerp(hits[i].color.a,0,2*GlobalVars.frametime))
end
local position = Render.WorldToScreen(hits[i].position)
hits[i].color.a = math.min(255,hits[i].color.a/6)
hits[i].offset = hits[i].offset+50*GlobalVars.frametime
if(hits[i].color.a > 0) then
Render.Text(
'-' .. hits[i].damage,
position,
hits[i].color,
12
)
else
hits[i] = nil
end
end
end
end
Cheat.RegisterCallback('draw', draw1)
[string "local m_enable = Menu.Switch..."]:42: in function <[string "local m_enable = Menu.Switch..."]:39>бля забыл поменять, на
Код:local m_enable = Menu.Switch("1","Enable",false) function lerp(a, b, c) return a+(b-a)*c end local hits = {} function on_damage(e) if e:GetName() ~= "player_hurt" then return end local entity_attacker = EntityList.GetPlayerForUserID(e:GetInt("attacker")); local entity_attacked = EntityList.GetPlayerForUserID(e:GetInt("userid")); local hitgroup = e:GetInt("hitgroup") local damage = e:GetInt("dmg_health"); local color = (hitgroup == 0) and Color.new(1,0.2,0.2,1) or Color.new(1,1,1,1) color.a = 0 --if (entity_attacker == EntityList.GetLocalPlayer() and entity_attacker ~= entity_attacked) then for i = 1,#hits do if(hits[i].ent == entity_attacked) hits[i].damage = damage + hits[i].damage hits[i].alpha = 0 hits[i].offset = 0 return; end end local pos = entity_attacked:GetRenderOrigin() table.insert(hits, { ent = entity_attacked, hitbox = hitgroup, position = pos, damage = damage, color = color, offset = 0, toalphaup = true } ); --end end Cheat.RegisterCallback('events', on_damage) function draw1() if not m_enable:Get() then return end for i = 0, #hits do if(hits[i].pos)then if(hits[i].toalphaup) then hits[i].color.a = math.ceil(lerp(hits[i].color.a,1350,4*GlobalVars.frametime)) hits[i].toalphaup = hits[i].color.a < 1350 else hits[i].color.a = math.floor(lerp(hits[i].color.a,0,2*GlobalVars.frametime)) end local position = Render.WorldToScreen(hits[i].position) hits[i].color.a = math.min(255,hits[i].color.a/6) hits[i].offset = hits[i].offset+50*GlobalVars.frametime if(hits[i].color.a > 0) then Render.Text( '-' .. hits[i].damage, position, hits[i].color, 12 ) else hits[i] = nil end end end end Cheat.RegisterCallback('draw', draw1)
[string "local m_enable = Menu.Switch..."]:42: in function <[string "local m_enable = Menu.Switch..."]:39>
[neverlose.cc][Lua] Error in "marker": [string "local m_enable = Menu.Switch..."]:42: attempt to index a nil value
stack traceback:
[string "local m_enable = Menu.Switch..."]:42: in function <[string "local m_enable = Menu.Switch..."]:39>
local m_enable = Menu.Switch("1","Enable",false)
function lerp(a, b, c) return a+(b-a)*c end
local hits = {}
function on_damage(e)
if e:GetName() ~= "player_hurt" then return end
local entity_attacker = EntityList.GetPlayerForUserID(e:GetInt("attacker"));
local entity_attacked = EntityList.GetPlayerForUserID(e:GetInt("userid"));
local hitgroup = e:GetInt("hitgroup")
local damage = e:GetInt("dmg_health");
local color = (hitgroup == 0) and Color.new(1,0.2,0.2,1) or Color.new(1,1,1,1)
color.a = 0
--if (entity_attacker == EntityList.GetLocalPlayer() and entity_attacker ~= entity_attacked) then
for i = 1,#hits do
if(hits[i].ent == entity_attacked)
hits[i].damage = damage + hits[i].damage
hits[i].alpha = 0
hits[i].offset = 0
return;
end
end
local pos = entity_attacked:GetRenderOrigin()
table.insert(hits,
{
ent = entity_attacked,
hitbox = hitgroup,
position = pos,
damage = damage,
color = color,
offset = 0,
toalphaup = true
}
);
--end
end
Cheat.RegisterCallback('events', on_damage)
function draw1()
if not m_enable:Get() then return end
for i = 1, #hits do
if(hits[i])then
if(hits[i].position)then
if(hits[i].toalphaup) then
hits[i].color.a = math.ceil(lerp(hits[i].color.a,1350,4*GlobalVars.frametime))
hits[i].toalphaup = hits[i].color.a < 1350
else
hits[i].color.a = math.floor(lerp(hits[i].color.a,0,2*GlobalVars.frametime))
end
local position = Render.WorldToScreen(hits[i].position)
hits[i].color.a = math.min(255,hits[i].color.a/6)
hits[i].offset = hits[i].offset+50*GlobalVars.frametime
if(hits[i].color.a > 0) then
Render.Text(
'-' .. hits[i].damage,
position,
hits[i].color,
12
)
else
hits[i] = nil
end
end
end
end
end
Cheat.RegisterCallback('draw', draw1)
на каждом челе оно просто суммируется + на 17 строке забыл thenКод:local m_enable = Menu.Switch("1","Enable",false) function lerp(a, b, c) return a+(b-a)*c end local hits = {} function on_damage(e) if e:GetName() ~= "player_hurt" then return end local entity_attacker = EntityList.GetPlayerForUserID(e:GetInt("attacker")); local entity_attacked = EntityList.GetPlayerForUserID(e:GetInt("userid")); local hitgroup = e:GetInt("hitgroup") local damage = e:GetInt("dmg_health"); local color = (hitgroup == 0) and Color.new(1,0.2,0.2,1) or Color.new(1,1,1,1) color.a = 0 --if (entity_attacker == EntityList.GetLocalPlayer() and entity_attacker ~= entity_attacked) then for i = 1,#hits do if(hits[i].ent == entity_attacked) hits[i].damage = damage + hits[i].damage hits[i].alpha = 0 hits[i].offset = 0 return; end end local pos = entity_attacked:GetRenderOrigin() table.insert(hits, { ent = entity_attacked, hitbox = hitgroup, position = pos, damage = damage, color = color, offset = 0, toalphaup = true } ); --end end Cheat.RegisterCallback('events', on_damage) function draw1() if not m_enable:Get() then return end for i = 1, #hits do[ATTACH type="full"]198027[/ATTACH] if(hits[i])then if(hits[i].position)then if(hits[i].toalphaup) then hits[i].color.a = math.ceil(lerp(hits[i].color.a,1350,4*GlobalVars.frametime)) hits[i].toalphaup = hits[i].color.a < 1350 else hits[i].color.a = math.floor(lerp(hits[i].color.a,0,2*GlobalVars.frametime)) end local position = Render.WorldToScreen(hits[i].position) hits[i].color.a = math.min(255,hits[i].color.a/6) hits[i].offset = hits[i].offset+50*GlobalVars.frametime if(hits[i].color.a > 0) then Render.Text( '-' .. hits[i].damage, position, hits[i].color, 12 ) else hits[i] = nil end end end end end Cheat.RegisterCallback('draw', draw1)
на каждом челе оно просто суммируется + на 17 строке забыл then
теперь работает, но надо добавить таймер на отключение, а еще обнулять дамаг который в тебя летит :)Код:local m_enable = Menu.Switch("1","Enable",false) function lerp(a, b, c) return a+(b-a)*c end local hits = {} function on_damage(e) if e:GetName() ~= "player_hurt" then return end local entity_attacker = EntityList.GetPlayerForUserID(e:GetInt("attacker")); local entity_attacked = EntityList.GetPlayerForUserID(e:GetInt("userid")); local hitgroup = e:GetInt("hitgroup") local damage = e:GetInt("dmg_health"); local color = (hitgroup == 0) and Color.new(1,0.2,0.2,1) or Color.new(1,1,1,1) color.a = 0 --if (entity_attacker == EntityList.GetLocalPlayer() and entity_attacker ~= entity_attacked) then for i = 1,#hits do if(hits[i].ent == entity_attacked) hits[i].damage = damage + hits[i].damage hits[i].alpha = 0 hits[i].offset = 0 return; end end local pos = entity_attacked:GetRenderOrigin() table.insert(hits, { ent = entity_attacked, hitbox = hitgroup, position = pos, damage = damage, color = color, offset = 0, toalphaup = true } ); --end end Cheat.RegisterCallback('events', on_damage) function draw1() if not m_enable:Get() then return end for i = 1, #hits do if(hits[i])then if(hits[i].position)then if(hits[i].toalphaup) then hits[i].color.a = math.ceil(lerp(hits[i].color.a,1350,4*GlobalVars.frametime)) hits[i].toalphaup = hits[i].color.a < 1350 else hits[i].color.a = math.floor(lerp(hits[i].color.a,0,2*GlobalVars.frametime)) end local position = Render.WorldToScreen(hits[i].position) hits[i].color.a = math.min(255,hits[i].color.a/6) hits[i].offset = hits[i].offset+50*GlobalVars.frametime if(hits[i].color.a > 0) then Render.Text( '-' .. hits[i].damage, position, hits[i].color, 12 ) else hits[i] = nil end end end end end Cheat.RegisterCallback('draw', draw1)
я ж говорю переписал с жс вантапа, мне сложно делать без дебагатеперь работает, но надо добавить таймер на отключение, а еще обнулять дамаг который в тебя летит :)
могу гс дать, будет дебаг)я ж говорю переписал с жс вантапа, мне сложно делать без дебага
могу гс дать, будет дебаг)
это все очень классно но 17 строка...Пожалуйста, авторизуйтесь для просмотра ссылки.
складывает дамагэто все очень классно но 17 строка...
скрипт не мойпроверить не смогу но ща с вт перепишу
Проект предоставляет различный материал, относящийся к сфере киберспорта, программирования, ПО для игр, а также позволяет его участникам общаться на многие другие темы. Почта для жалоб: admin@yougame.biz