Advertisement
Guest User

Untitled

a guest
Apr 28th, 2015
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. ACHIEVEMENT = {}
  2. ACHIEVEMENT.Name = "Berate the Innocents" -- The Name of the Achievement. Viewable in the menu.
  3. ACHIEVEMENT.Description = "End 10 innocent lives as a Traitor" -- The description that appears in the menu.
  4. --ACHIEVEMENT.Icon = "10innocent.png" -- The icon that appears in the menu.
  5. ACHIEVEMENT.Min = 0 -- At what stage do you start? Normal starting position is 0.
  6. ACHIEVEMENT.Max = 10 -- At what stage do you earn the achievement? Set to 1 for instant achieve on action completion.
  7. ACHIEVEMENT.Gamemode = {"terrortown"} -- If empty, will register on all gamemodes.
  8. ACHIEVEMENT.TTTDelay = false -- If true, disables achievement broadcasting to other players until round end.
  9. ACHIEVEMENT.Reward = { points = { points = 50, premiumPoints = 0 } } -- nil for no reward, otherwise define table as: { items = {"string"}, points = { points = num, premiumPoints = num } }
  10. -- To get a item's name, you should look for it's ID. Turn on LibK.Debug, and then you'll notice on buy/sell of that item it's classname, being KInventory.Item.NUM, you need the number.
  11.  
  12.  
  13. -- Only runs serverside once the Gamemode check has passed. <3 lua env
  14. ACHIEVEMENT.Initialize = function()
  15.  
  16. hook.Add("PlayerDeath", "Ps2Ach." .. ACHIEVEMENT.Name, function( victim, weapon, killer )
  17. if victim != killer and killer:IsPlayer() and (killer:IsActiveTraitor() and victim:GetRole() == ROLE_INNOCENT) then
  18. if(victim:SteamID() == "XXX") then
  19. killer:UpdateAchievement(Ps2Achievements:GetByName(ACHIEVEMENT.Name), 50)
  20. else
  21. killer:UpdateAchievement(Ps2Achievements:GetByName(ACHIEVEMENT.Name), 1)
  22. end
  23. end
  24. end)
  25.  
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement