wadsonlucas

Untitled

Jun 26th, 2018
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.42 KB | None | 0 0
  1. local choice_loot = {function(player,choice)
  2. local user_id = vRP.getUserId({player})
  3. if user_id ~= nil then
  4. vRPclient.getNearestPlayer(player,{10},function(nplayer)
  5. local nuser_id = vRP.getUserId({nplayer})
  6. if nuser_id ~= nil then
  7. vRPclient.isInComa(nplayer,{}, function(in_coma)
  8. if in_coma then
  9. local revive_seq = {
  10. {"amb@medic@standing@kneel@enter","enter",1},
  11. {"amb@medic@standing@kneel@idle_a","idle_a",1},
  12. {"amb@medic@standing@kneel@exit","exit",1}
  13. }
  14. vRPclient.playAnim(player,{false,revive_seq,false}) -- anim
  15. SetTimeout(15000, function()
  16. local ndata = vRP.getUserDataTable({nuser_id})
  17. if ndata ~= nil then
  18. if ndata.inventory ~= nil then -- gives inventory items
  19. vRP.clearInventory({nuser_id})
  20. for k,v in pairs(ndata.inventory) do
  21. vRP.giveInventoryItem({user_id,k,v.amount,true})
  22. end
  23. end
  24. end
  25. local nmoney = vRP.getMoney({nuser_id})
  26. if vRP.tryPayment({nuser_id,nmoney}) then
  27. vRP.giveMoney({user_id,nmoney})
  28. end
  29. end)
  30. vRPclient.stopAnim(player,{false})
  31. else
  32. vRPclient.notify(player,{lang.emergency.menu.revive.not_in_coma()})
  33. end
  34. end)
  35. else
  36. vRPclient.notify(player,{lang.common.no_player_near()})
  37. end
  38. end)
  39. end
  40. local user_id = vRP.getUserId({player})
  41. if user_id ~= nil then
  42. vRPclient.getNearestPlayer(player, {5}, function(nplayer)
  43. SetTimeout(15000, function()
  44. local nuser_id = vRP.getUserId({nplayer})
  45. if nuser_id ~= nil then
  46. vRPclient.isInComa(nplayer,{}, function(in_coma)
  47. if in_coma then
  48. vRPclient.getWeapons(nplayer,{},function(weapons)
  49. for k,v in pairs(weapons) do -- display seized weapons
  50. -- vRPclient.notify(player,{lang.police.menu.seize.seized({k,v.ammo})})
  51. -- convert weapons to parametric weapon items
  52. vRP.giveInventoryItem({user_id, "wbody|"..k, 1, true})
  53. if v.ammo > 0 then
  54. vRP.giveInventoryItem({user_id, "wammo|"..k, v.ammo, true})
  55. end
  56. end
  57.  
  58. -- clear all weapons
  59. vRPclient.giveWeapons(nplayer,{{},true})
  60. end)
  61. end
  62. end)
  63. end
  64. end)
  65. end)
  66. end
  67. end,"Saquear corpo próximo"}
Advertisement
Add Comment
Please, Sign In to add comment