Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › MultiPlayer Game Hacks & Cheats › Steam Games Hacks & Cheats › Garry's Mod Hacks & Cheats › Garry's Mod Coding & Resources › killmarker not hitmarker [LUA]

Questionkillmarker not hitmarker [LUA]

Posts 1–7 of 7 · Page 1 of 1
BL
bloodstain97
killmarker not hitmarker [LUA]
i used game listen entity_killed didnt solve the problem im new on this can you guys do this for me please i just wanted to see
#1 · 6y ago
GU
guessjoe1
Code:
local drawkilltime = 0
gameevent.Listen("entity_killed") --We want to listen to the event if any entities die.
hook.Add("entity_killed", "killmarker",function(data)
	local victim = Entity(data.entindex_killed)
	local attacker = Entity(data.entindex_attacker)
	if !IsValid(victim) || !IsValid(attacker) then return end --Always check if they entities are there.
	if attacker == LocalPlayer() && victim:IsPlayer() then 
		drawkilltime = CurTime()+1 --Draw the marker for 1 second
	end
end)

hook.Add("HUDPaint", "DrawKillmarker",function())
	if drawkilltime >= CurTime() then
		--Draw killmarker here
	end
end
#2 · edited 6y ago · 6y ago
BL
bloodstain97
thanks that was very usefull for me
#3 · 6y ago
BL
bloodstain97
im trying to add this line but i fail everytime can you help

Code:
        sound.PlayFile("killmarker.wav", "mono", function()
#4 · 6y ago
GU
guessjoe1
Quote Originally Posted by bloodstain97 View Post
im trying to add this line but i fail everytime can you help

Code:
        sound.PlayFile("killmarker.wav", "mono", function()
Code:
sound.PlayFile( "killmarker.wav", "", function( station )
	if ( IsValid( station ) ) then station:Play() end --Check if the sound exists and can play if not don't do anything.
end )
#5 · 6y ago
BL
bloodstain97
thanks but im trying to tell when i kill player killmarker.wav play


edit: oh ok

Code:
surface.PlaySound("killmarker.wav")

i add this and problem solved
#6 · edited 6y ago · 6y ago
OS
Oskarr123
Thanks guessjoe1. I normally code in C, but i am getting into .lua now.
#7 · 6y ago
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

  • my killmarks not working ;(By rdblade in CrossFire Mods & Rez Modding
    3Last post 16y ago
  • Lua scripts not openingBy GokusDog in Garry's Mod Discussions & Help
    4Last post 13y ago
  • Lua running not working?By colbol99 in Garry's Mod Discussions & Help
    1Last post 13y ago
  • Lua not working for me?By DanVs in Garry's Mod Discussions & Help
    18Last post 12y ago
  • Couldn't include file 'AXpublic.lua' (File not found) (<nowhere>)By pizzadk in Garry's Mod Discussions & Help
    4Last post 12y ago

Tags for this Thread

None