Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- To create a new achievement you need to copy this code bellow.
- do
- local achievement = {
- AchievementName = "New Achievement",
- Description = "Achievements description",
- Icon = "ldt_achievements/achievements/house.png",
- MaxProgress = 1,
- RewardAmount = 1000,
- }
- LDT_Achievements.RegisterAchievementsToCategory('General', achievement)
- if SERVER then
- hook.Add( "PlayerDeath", "LDT_Achievements.AchievementsName", function( victim, inflictor, attacker )
- if victim == attacker then return end
- if not IsValid(attacker) then return end
- LDT_Achievements.AddAchievementProgress(attacker, achievement.AchievementID, 1)
- end )
- end
- end
- The Name is the name that is displayed in the menu. IT HAS TO BE UNIQUE!
- The Description is the description that is displayed in the menu.
- The Icon is the icon that is displayed in the menu.
- The MaxProgress is the amount of progress you need to complete the achievement.
- The RewardAmount is the amount of money you get when you complete the achievement. If you don't want to give money set it to 0.
- The hook.Add is the hook that is used to check if the achievement is completed.
- You need to know what hook to use for the achievement you want to create. So a little bit of lua knowledge is required.
- --]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement