Advertisement
Guest User

Untitled

a guest
Dec 7th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.90 KB | None | 0 0
  1. local choice_askid = {function(player,choice)
  2. vRPclient.getNearestPlayer(player,{10},function(nplayer)
  3. local nuser_id = vRP.getUserId(nplayer)
  4. if nuser_id ~= nil then
  5. vRPclient.notify(player,{lang.police.menu.askid.asked()})
  6. vRP.request(nplayer,lang.police.menu.askid.request(),15,function(nplayer,ok)
  7. if ok then
  8. if vRP.hasPermission(user_id, "documenti.falsi") then
  9. vRP.prompt(nplayer,"'veri' o 'falsi' ","",function(player,doc)
  10. if doc == "veri" then
  11. vRP.getUserIdentity(nuser_id, function(identity)
  12. if identity then
  13. -- display identity and business
  14. local name = identity.name
  15. local firstname = identity.firstname
  16. local age = identity.age
  17. local phone = identity.phone
  18. local registration = identity.registration
  19. local bname = ""
  20. local bcapital = 0
  21. local home = ""
  22. local number = ""
  23.  
  24. vRP.getUserBusiness(nuser_id, function(business)
  25. if business then
  26. bname = business.name
  27. bcapital = business.capital
  28. end
  29.  
  30. vRP.getUserAddress(nuser_id, function(address)
  31. if address then
  32. home = address.home
  33. number = address.number
  34. end
  35.  
  36. local content = lang.police.identity.info({name,firstname,age,registration,phone,bname,bcapital,home,number})
  37. vRPclient.setDiv(player,{"police_identity",".div_police_identity{ background-color: rgba(0,0,0,0.75); color: white; font-weight: bold; width: 500px; padding: 10px; margin: auto; margin-top: 150px; }",content})
  38. -- request to hide div
  39. vRP.request(player, lang.police.menu.askid.request_hide(), 1000, function(player,ok)
  40. vRPclient.removeDiv(player,{"police_identity"})
  41. end)
  42. end)
  43. end)
  44. end
  45. end)
  46. if doc == "falsi" then
  47. vRP.getUserIdentityFal(nuser_id, function(identity)
  48. if identity then
  49. -- display identity and business
  50. local name = identity.name
  51. local firstname = identity.firstname
  52. local age = identity.age
  53. local phone = identity.phone
  54. local registration = identity.registration
  55. local bname = ""
  56. local bcapital = 0
  57. local home = ""
  58. local number = ""
  59.  
  60. vRP.getUserBusiness(nuser_id, function(business)
  61. if business then
  62. bname = business.name
  63. bcapital = business.capital
  64. end
  65.  
  66. vRP.getUserAddress(nuser_id, function(address)
  67. if address then
  68. home = address.home
  69. number = address.number
  70. end
  71.  
  72. local content = lang.police.identity.info({name,firstname,age,registration,phone,bname,bcapital,home,number})
  73. vRPclient.setDiv(player,{"police_identity",".div_police_identity{ background-color: rgba(0,0,0,0.75); color: white; font-weight: bold; width: 500px; padding: 10px; margin: auto; margin-top: 150px; }",content})
  74. -- request to hide div
  75. vRP.request(player, lang.police.menu.askid.request_hide(), 1000, function(player,ok)
  76. vRPclient.removeDiv(player,{"police_identity"})
  77. end)
  78. end)
  79. end)
  80. end
  81. end)
  82. end
  83. end
  84. end)
  85. end
  86. else
  87. vRPclient.notify(player,{lang.common.request_refused()})
  88. end
  89. end)
  90. else
  91. vRPclient.notify(player,{lang.common.no_player_near()})
  92. end
  93. end)
  94. end, lang.police.menu.askid.description()}
  95.  
  96. local choice_forzaid = {function(player,choice)
  97. vRPclient.getNearestPlayer(player,{10},function(nplayer)
  98. local nuser_id = vRP.getUserId(nplayer)
  99. if nuser_id ~= nil then
  100. vRPclient.notify(player,{"Ti è stato preso il documento d'identità"})
  101. vRP.getUserIdentity(nuser_id, function(identity)
  102. if identity then
  103. -- display identity and business
  104. local name = identity.name
  105. local firstname = identity.firstname
  106. local age = identity.age
  107. local phone = identity.phone
  108. local registration = identity.registration
  109. local bname = ""
  110. local bcapital = 0
  111. local home = ""
  112. local number = ""
  113.  
  114. vRP.getUserBusiness(nuser_id, function(business)
  115. if business then
  116. bname = business.name
  117. bcapital = business.capital
  118. end
  119.  
  120. vRP.getUserAddress(nuser_id, function(address)
  121. if address then
  122. home = address.home
  123. number = address.number
  124. end
  125.  
  126. local content = lang.police.identity.info({name,firstname,age,registration,phone,bname,bcapital,home,number})
  127. vRPclient.setDiv(player,{"police_identity",".div_police_identity{ background-color: rgba(0,0,0,0.75); color: white; font-weight: bold; width: 500px; padding: 10px; margin: auto; margin-top: 150px; }",content})
  128. -- request to hide div
  129. vRP.request(player, lang.police.menu.askid.request_hide(), 1000, function(player,ok)
  130. vRPclient.removeDiv(player,{"police_identity"})
  131. end)
  132. end)
  133. end)
  134. end
  135. end)
  136. else
  137. vRPclient.notify(player,{lang.common.no_player_near()})
  138. end
  139. end)
  140. end, lang.police.menu.askid.description()}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement