Advertisement
Guest User

Untitled

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