Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local isloot = false
- local choice_loot = {function(player,choice)
- local user_id = vRP.getUserId({player})
- if user_id ~= nil then
- if isloot == false then
- isloot = true
- vRPclient.getNearestPlayer(player,{10},function(nplayer)
- local nuser_id = vRP.getUserId({nplayer})
- if nuser_id ~= nil then
- vRPclient.isInComa(nplayer,{}, function(in_coma)
- if in_coma then
- local revive_seq = {
- {"amb@medic@standing@kneel@enter","enter",1},
- {"amb@medic@standing@kneel@idle_a","idle_a",1},
- {"amb@medic@standing@kneel@exit","exit",1}
- }
- vRPclient.playAnim(player,{false,revive_seq,false}) -- anim
- SetTimeout(15000, function()
- local ndata = vRP.getUserDataTable({nuser_id})
- if ndata ~= nil then
- if ndata.inventory ~= nil then -- gives inventory items
- vRP.clearInventory({nuser_id})
- for k,v in pairs(ndata.inventory) do
- vRP.giveInventoryItem({user_id,k,v.amount,true})
- end
- end
- end
- local nmoney = vRP.getMoney({nuser_id})
- if vRP.tryPayment({nuser_id,nmoney}) then
- vRP.giveMoney({user_id,nmoney})
- end
- end)
- vRPclient.stopAnim(player,{false})
- vRP.giveInventoryItem({user_id,"قلب",1})
- vRP.giveInventoryItem({user_id,"يد",1})
- vRP.giveInventoryItem({user_id,"راس",1})
- else
- vRPclient.notify(player,{lang.emergency.menu.revive.not_in_coma()})
- end
- end)
- else
- vRPclient.notify(player,{lang.common.no_player_near()})
- end
- end)
- SetTimeout(300000,function()
- isloot = false
- end)
- else
- vRPclient.notify(player,{"~o~You can't spam loot, wait 5 minutes."})
- end
- end
- end,"Loot nearby corpse"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement