Item id that player currently carries.
4 replies



15.03.14 04:32:06 pm
I want to make use of
But I need this specific item id while all I seen was itemtype id which is useless here.
Quote:
ammoin: ammo currently loaded into the weapon
But I need this specific item id while all I seen was itemtype id which is useless here.
Sniffin'Man "If it cannot be done with lua, it must be you mama, coz she's too fat"
This is not possible in a direct way. See my reply in
LUA: Get a player's current clip and ammo? for an explanation. You can try this though
Weapon Ammo Counts (14) ... btw: funny that you replied
Apache uwu and didn't provide a link to your file






I added a GIF to show what it does on the description of
Weapon Ammo Counts (14)
@
Sudden Death: Maybe that file could work?


@

@
Apache uwu: YES, I finally made it to work but I had to change table for variable. It's really helpfull, thank you for making it.
Btw. almost week for one shit, lol.

Code:
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
addhook("log","_log")
parse("items")
function _log(text)
if string.sub(text,1,20)=="Tpl.weapon: #0, pl: " then
a,b,c,d,e,f=string.match(text,"Tpl.weapon: #0, pl: (.*), typ: (.*) (.*), a: (.*)|(.*), m: (.*)")
ammoin=tonumber(d)
--msg("Ammoin "..ammoin.."")
return 1
end
end
parse("items")
function _log(text)
if string.sub(text,1,20)=="Tpl.weapon: #0, pl: " then
a,b,c,d,e,f=string.match(text,"Tpl.weapon: #0, pl: (.*), typ: (.*) (.*), a: (.*)|(.*), m: (.*)")
ammoin=tonumber(d)
--msg("Ammoin "..ammoin.."")
return 1
end
end
Btw. almost week for one shit, lol.
Sniffin'Man "If it cannot be done with lua, it must be you mama, coz she's too fat"



