
parse("strip "..id.." "..player(id,"weapontype").."")
I've tried using :
1
2
3
4
2
3
4
local items = playerweapons(id)
for _,var in pairs(items) do
if var == "ak47" and player(id,"score") >= Shop_AK47 then
...
Used this as a reference from website
https://stackoverflow.com/questions/656199/search-for-an-item-in-a-lua-list
These are snippets of my code where this is happening :
Try 1 :
Try 2 :
Try 3 :
So, how do I access the playerweapons table of the player(buyer) and detect the ak47 if its not in hands but in inventory, the goal is just to give ammo to ak47.