Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2017
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.06 KB | None | 0 0
  1. local ch_lockpick = {function(player,choice)
  2. local user_id = vRP.getUserId(player)
  3. if user_id ~= nil then
  4. -- anim and lockpick
  5. if math.random(1,10) == 1 then
  6. if vRP.tryGetInventoryItem(user_id,"lockpick",1,true) then
  7. vRPclient.getNearestVehicle(player,{5},function(veh)
  8. if veh then
  9. vRPclient.playAnim(player,{false,{task="WORLD_HUMAN_WELDING"},false})
  10. SetTimeout(20000, function()
  11. vRPclient.vc_lockPick(player,{veh})
  12. vRPclient.stopAnim(player,{false})
  13. end)
  14. else
  15. vRPclient.notify(nplayer,{"~g~Quelqu'un a essayé de vous braquer ."})
  16. vRPclient.notify(player,{"~r~Tentative rater."})
  17. end
  18. end)
  19. end
  20. end
  21. end
  22. end,lang.police.menu.handcuff.description()}
  23.  
  24. -- REGISTER MAIN MENU CHOICES
  25. vRP.registerMenuBuilder({"main", function(add, data)
  26. local user_id = vRP.getUserId({data.player})
  27. if user_id ~= nil then
  28. local choices = {}
  29.  
  30. if vRP.hasPermission({user_id,"player.player_menu"}) then
  31. choices["Joueur"] = ch_player_menu -- opens player submenu
  32. end
  33.  
  34. if vRP.hasPermission({user_id,"toggle.service"}) then
  35. choices["Service"] = choice_service -- toggle the receiving of missions
  36. end
  37.  
  38. if vRP.hasPermission({user_id,"player.loot"}) then
  39. choices["💪 Looter corps"] = choice_loot -- take the items of nearest player in coma
  40. end
  41.  
  42. if vRP.hasPermission({user_id,"mugger.mug"}) then
  43. choices["💪 Braquer"] = ch_mug -- steal nearest player wallet
  44. end
  45. if vRP.hasPermission({user_id,"player.handcuff"}) then
  46. choices["🔗 Menotter"] = ch_handcuff -- steal nearest player wallet
  47. end
  48. if vRP.hasPermission({user_id,"player.lockpick"}) then
  49. choices["🔐 Crochetter véhicule"] = ch_lockpick -- steal nearest player wallet
  50. end
  51. if vRP.hasPermission({user_id,"hacker.hack"}) then
  52. choices["Hacker"] = ch_hack -- 1 in 100 chance of stealing 1% of nearest player bank
  53. end
  54.  
  55. add(choices)
  56. end
  57. end})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement