@@ -328,7 +328,7 @@ local choice_seize_weapons = {function(player, choice)
328328 local nuser_id = vRP .getUserId (nplayer )
329329 if nuser_id and vRP .hasPermission (nuser_id , " police.seizable" ) then
330330 if vRPclient .isHandcuffed (nplayer ) then -- check handcuffed
331- local weapons = vRPclient .getWeapons (nplayer )
331+ local weapons = vRPclient .replaceWeapons (nplayer , {} )
332332 for k ,v in pairs (weapons ) do -- display seized weapons
333333 -- vRPclient._notify(player,lang.police.menu.seize.seized({k,v.ammo}))
334334 -- convert weapons to parametric weapon items
@@ -338,8 +338,6 @@ local choice_seize_weapons = {function(player, choice)
338338 end
339339 end
340340
341- -- clear all weapons
342- vRPclient ._giveWeapons (nplayer ,{},true )
343341 vRPclient ._notify (nplayer ,lang .police .menu .seize .weapons .seized ())
344342 else
345343 vRPclient ._notify (player ,lang .police .not_handcuffed ())
@@ -478,17 +476,14 @@ end, lang.police.menu.fine.description()}
478476local choice_store_weapons = {function (player , choice )
479477 local user_id = vRP .getUserId (player )
480478 if user_id then
481- local weapons = vRPclient .getWeapons (player )
479+ local weapons = vRPclient .replaceWeapons (player , {} )
482480 for k ,v in pairs (weapons ) do
483481 -- convert weapons to parametric weapon items
484482 vRP .giveInventoryItem (user_id , " wbody|" .. k , 1 , true )
485483 if v .ammo > 0 then
486484 vRP .giveInventoryItem (user_id , " wammo|" .. k , v .ammo , true )
487485 end
488486 end
489-
490- -- clear all weapons
491- vRPclient ._giveWeapons (player ,{},true )
492487 end
493488end , lang .police .menu .store_weapons .description ()}
494489
0 commit comments