Advertisement
Guest User

Untitled

a guest
May 30th, 2019
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. items["contrattopatentea"] = {"Contratto P.A","Firma questo contratto per ottenere la patente A intestata alla tua persona.",function(args)
  2. local choices = {}
  3. local idname = args[1]
  4. local user_id = vRP.getUserId(player)
  5. local wb_choices = {}
  6.  
  7. choices["Firma"] = {function(player,choice,mod) -- bind the money
  8. local user_id = vRP.getUserId(player)
  9. if user_id ~= nil then
  10. if vRP.tryGetInventoryItem(user_id,"penna",1,false) then
  11. if vRP.tryGetInventoryItem(user_id,"contrattopatentea",1,false) then
  12. vRPclient.playAnim(player,{true,{task="CODE_HUMAN_MEDIC_TIME_OF_DEATH"},true})
  13. SetTimeout(5000, function()
  14. vRPclient.stopAnim(player,{false})
  15. end)
  16. vRPclient.notify(player,{"~g~firmando..."})
  17. Citizen.Wait(4000)
  18. vRP.getUserIdentity(user_id,function(identity)
  19. if identity then
  20. vRP.defInventoryItem("Patente A (CF:"..user_id..")","Patente A (CF:"..user_id..")","Patente A di "..identity.firstname.. " "..identity.name.."",function() return wb_choices end,0)
  21. end
  22. end)
  23. vRP.giveInventoryItem(user_id, "Patente A (CF:"..user_id..")", 1, true)
  24. end
  25. else vRPclient.notify(player,{"~g~Ti manca una penna..."})
  26. end
  27. vRP.closeMenu(player)
  28. end
  29. end}
  30.  
  31. return choices
  32. end,0.50}
  33. ---
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement