wadsonlucas

Untitled

Jun 26th, 2018
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. choice_loot = {function(player,choice)
  2. local user_id = vRP.getUserId(player)
  3. if user_id ~= nil then
  4. local nplayer = vRPclient.getNearestPlayer(player,10)
  5. local nuser_id = vRP.getUserId(nplayer)
  6. if nuser_id ~= nil then
  7. local in_coma = vRPclient.isInComa(nplayer)
  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. else
  35. vRPclient.notify(player,lang.common.no_player_near())
  36. end
  37. end
  38. end}
Advertisement
Add Comment
Please, Sign In to add comment