Advertisement
Guest User

Untitled

a guest
Oct 4th, 2017
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. local Tunnel = module("vrp", "lib/Tunnel")
  2. local Proxy = module("vrp", "lib/Proxy")
  3.  
  4. vRP = Proxy.getInterface("vRP")
  5. vRPclient = Tunnel.getInterface("vRP","vRP_static_menus")
  6.  
  7. local Lang = module("vrp", "lib/Lang")
  8. local cfg = module("vrp", "cfg/base")
  9. local lang = Lang.new(module("vrp", "cfg/lang/"..cfg.lang) or {})
  10.  
  11.  
  12.  
  13.  
  14. --loot corpse
  15. local choice_lockpick = {function(player,choice)
  16. local user_id = vRP.getUserId({player})
  17. if user_id ~= nil then
  18. if vRP.tryGetInventoryItem(user_id,"lockpick",1,true) then
  19. vRPclient.playAnim(player,{false,{task="WORLD_HUMAN_WELDING"},false})
  20. SetTimeout(15000, function()
  21. vRPclient.SetVehicleDoorsLocked(player,{7})
  22. vRPclient.stopAnim(player,{false})
  23. end
  24. end
  25. end})
  26.  
  27.  
  28.  
  29. -- REGISTER MAIN MENU CHOICES
  30. vRP.registerMenuBuilder({"main", function(add, data)
  31. local user_id = vRP.getUserId({data.player})
  32. if user_id ~= nil then
  33. local choices = {}
  34.  
  35. if vRP.hasPermission({user_id,"player.lockpick"}) then
  36. choices["lockpick"] = choice_lockpick
  37. end
  38.  
  39. add(choices)
  40. end
  41. end})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement