Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local choice_askid = {function(player,choice)
- vRPclient.getNearestPlayer(player,{10},function(nplayer)
- local nuser_id = vRP.getUserId(nplayer)
- if nuser_id ~= nil then
- vRPclient.notify(player,{lang.police.menu.askid.asked()})
- vRP.request(nplayer,lang.police.menu.askid.request(),15,function(nplayer,ok)
- if ok then
- if vRP.hasPermission(user_id, "documenti.falsi") then
- vRP.prompt(nplayer,"'veri' o 'falsi' ","",function(player,doc)
- if doc == "veri" then
- vRP.getUserIdentity(nuser_id, function(identity)
- if identity then
- -- display identity and business
- local name = identity.name
- local firstname = identity.firstname
- local age = identity.age
- local phone = identity.phone
- local registration = identity.registration
- local bname = ""
- local bcapital = 0
- local home = ""
- local number = ""
- vRP.getUserBusiness(nuser_id, function(business)
- if business then
- bname = business.name
- bcapital = business.capital
- end
- vRP.getUserAddress(nuser_id, function(address)
- if address then
- home = address.home
- number = address.number
- end
- local content = lang.police.identity.info({name,firstname,age,registration,phone,bname,bcapital,home,number})
- vRPclient.setDiv(player,{"police_identity",".div_police_identity{ background-color: rgba(0,0,0,0.75); color: white; font-weight: bold; width: 500px; padding: 10px; margin: auto; margin-top: 150px; }",content})
- -- request to hide div
- vRP.request(player, lang.police.menu.askid.request_hide(), 1000, function(player,ok)
- vRPclient.removeDiv(player,{"police_identity"})
- end)
- end)
- end)
- end
- end)
- if doc == "falsi" then
- vRP.getUserIdentityFal(nuser_id, function(identity)
- if identity then
- -- display identity and business
- local name = identity.name
- local firstname = identity.firstname
- local age = identity.age
- local phone = identity.phone
- local registration = identity.registration
- local bname = ""
- local bcapital = 0
- local home = ""
- local number = ""
- vRP.getUserBusiness(nuser_id, function(business)
- if business then
- bname = business.name
- bcapital = business.capital
- end
- vRP.getUserAddress(nuser_id, function(address)
- if address then
- home = address.home
- number = address.number
- end
- local content = lang.police.identity.info({name,firstname,age,registration,phone,bname,bcapital,home,number})
- vRPclient.setDiv(player,{"police_identity",".div_police_identity{ background-color: rgba(0,0,0,0.75); color: white; font-weight: bold; width: 500px; padding: 10px; margin: auto; margin-top: 150px; }",content})
- -- request to hide div
- vRP.request(player, lang.police.menu.askid.request_hide(), 1000, function(player,ok)
- vRPclient.removeDiv(player,{"police_identity"})
- end)
- end)
- end)
- end
- end)
- end
- end
- end)
- end
- else
- vRPclient.notify(player,{lang.common.request_refused()})
- end
- end)
- else
- vRPclient.notify(player,{lang.common.no_player_near()})
- end
- end)
- end, lang.police.menu.askid.description()}
- local choice_forzaid = {function(player,choice)
- vRPclient.getNearestPlayer(player,{10},function(nplayer)
- local nuser_id = vRP.getUserId(nplayer)
- if nuser_id ~= nil then
- vRPclient.notify(player,{"Ti è stato preso il documento d'identità"})
- vRP.getUserIdentity(nuser_id, function(identity)
- if identity then
- -- display identity and business
- local name = identity.name
- local firstname = identity.firstname
- local age = identity.age
- local phone = identity.phone
- local registration = identity.registration
- local bname = ""
- local bcapital = 0
- local home = ""
- local number = ""
- vRP.getUserBusiness(nuser_id, function(business)
- if business then
- bname = business.name
- bcapital = business.capital
- end
- vRP.getUserAddress(nuser_id, function(address)
- if address then
- home = address.home
- number = address.number
- end
- local content = lang.police.identity.info({name,firstname,age,registration,phone,bname,bcapital,home,number})
- vRPclient.setDiv(player,{"police_identity",".div_police_identity{ background-color: rgba(0,0,0,0.75); color: white; font-weight: bold; width: 500px; padding: 10px; margin: auto; margin-top: 150px; }",content})
- -- request to hide div
- vRP.request(player, lang.police.menu.askid.request_hide(), 1000, function(player,ok)
- vRPclient.removeDiv(player,{"police_identity"})
- end)
- end)
- end)
- end
- end)
- else
- vRPclient.notify(player,{lang.common.no_player_near()})
- end
- end)
- end, lang.police.menu.askid.description()}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement