Last active
February 12, 2018 15:48
-
-
Save ValentinFunk/4eb1737d23bfe0d79f84e8ed575386d7 to your computer and use it in GitHub Desktop.
Give extra points on knife kill (Pointshop 2). Create the file below in garrysmod/lua/autorun
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local ptsMap = { | |
| ["csgo_bayonet"] = 10, | |
| others = 5 | |
| } | |
| hook.Add( "PlayerDeath", "ExtraPointsForKnifeKill", function( victim, inflictor, attacker ) | |
| if not IsValid( inflictor ) or not IsValid( attacker ) or not attacker:IsPlayer( ) then | |
| return | |
| end | |
| if inflictor.Category and inflictor.Category == "CS:GO Knives" then | |
| local pts = ptsMap[inflictor:GetClass()] or ptsMap["others"] | |
| attacker:PS2_AddStandardPoints( pts, "Knife Kill", true ) | |
| end | |
| end ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment