English Item id that player currently carries.

4 replies
Goto Page
To the start Previous 1 Next To the start
Up
Sudden Death
User
Offline Off
I want to make use of
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"
15.03.14 04:57:36 pm
Up
Apache uwu
User
Offline Off
Does cs2d lua cmd player(,'weapontype') suffice?
15.03.14 05:41:30 pm
Up
DC
Admin
Offline Off
This is not possible in a direct way. See my reply in thread cs2d LUA: Get a player's current clip and ammo? for an explanation. You can try this though file cs2d Weapon Ammo Counts (14) ... btw: funny that you replied user Apache uwu and didn't provide a link to your file
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
15.03.14 08:50:54 pm
Up
Apache uwu
User
Offline Off
I added a GIF to show what it does on the description of file cs2d Weapon Ammo Counts (14)

@user Sudden Death: Maybe that file could work?
23.03.14 06:41:27 pm
Up
Sudden Death
User
Offline Off
@user 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.
Code:
1
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

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"
To the start Previous 1 Next To the start