How to check if handcuffed

local choice_license = {function(player, choice)
  local user_id = vRP.getUserId(player)
   if user_id ~= nil then
    vRP.prompt(player,"UserID: ","",function(player,id)
      id = parseInt(id)
        local source = vRP.getUserSource(id)
        if source ~= nil then
          vRP.license(source)
              vRPclient.notify(source,"You took the driverslicense from" ..id)
        end
    end)
  end
end, lang.police.menu.license.description()}

How can modify this and add the check if the player is nearby and handcuffed? ( for vRP)

      vRPclient.isHandcuffed(nplayer,{}, function(handcuffed)  -- check handcuffed
        if handcuffed then

  vRPclient.getNearestPlayer(player,{10},function(nplayer)


the functions

I am assuming it would be like this:

if vRPclient.isHandcuffed(nplayer,{}, function(handcuffed) then -- check handcuffed
    vRPclient.getNearestPlayer(player,{10},function(nplayer)
end

where to put this ?

Is ok here?

local choice_license = {function(player, choice)
  local user_id = vRP.getUserId(player)
   if user_id ~= nil then
    vRP.prompt(player,"UserID: ","",function(player,id)
      id = parseInt(id)
        local source = vRP.getUserSource(id)
        if source ~= nil then
        if vRPclient.isHandcuffed(nplayer,{}, function(handcuffed) then -- check handcuffed
           vRPclient.getNearestPlayer(player,{10},function(nplayer)
          vRP.license(source)
              vRPclient.notify(source,"You took the driverslicense from" ..id)
        end
        end
    end)
  end
end, lang.police.menu.license.description()}

I am not sure, I do not work with vRP.

UP ? :slight_smile:

Who know how is ok ?