Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*---------------------------------------------------------------------------
- Perks - these are unlockables you get by achieving certain levels, you can set it to unlock jobs, unlock entities,
- give a one time cash bonus, increase health and a lot more as long as you know the very basics of lua or follow
- the examples below.
- --first template
- local perk = {}
- perk.name = "[name]"
- perk.descripion = "[description]"
- perk.icon = "[icon.png]"
- perk.level = 0 --level required to use
- perk.useCost = 0 --only works for active perks, takes exp on usage
- perk.restriction = function( ply ) return true end --this gets executed before below functions are, to prevent some exploits
- perk.passive = function( ply ) end --this function will be executed on player spawn
- perk.active = function( ply ) end --this function will be executed on player usage of perk
- perk.event = function( ply ) end --this function will be executed once, on level up
- levelup.config.addPerk( perk )
- --second template
- local perk =
- {
- name = ""
- description = ""
- icon = ""
- level = 0
- perk.useCost = 0
- restriction = function( ply ) return true end
- passive = function( ply ) end
- active = function( ply ) end
- event = function( ply ) end
- }
- ---------------------------------------------------------------------------*/
- levelup.perks = {}
- local perk = {}
- perk.name = "level 19!"
- perk.description = "2000 PS points"
- perk.icon = "key.png"
- perk.level = 19
- perk.event = function( ply )
- local points, premiumPoints = 0, 0
- if ply.PS2_Wallet
- then
- points, premiumPoints = ply.PS2_Wallet.points, ply.PS2_Wallet.premiumPoints
- ply:PS2_AddStandardPoints(2000)
- end
- end
- levelup.config.addPerk( perk )
- local perk = {}
- perk.name = "level 20!"
- perk.description = "2000 PS points"
- perk.icon = "key.png"
- perk.level = 20
- perk.event = function( ply )
- local points, premiumPoints = 0, 0
- if ply.PS2_Wallet
- then
- points, premiumPoints = ply.PS2_Wallet.points, ply.PS2_Wallet.premiumPoints
- ply:PS2_AddStandardPoints(2000)
- end
- end
- levelup.config.addPerk( perk )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement