izstas Posted January 30, 2010 Share Posted January 30, 2010 How I can get all player weapons (weapon and ammo)? getPlayerWeapon supports only current weapon on server side. I need to use client function or there is another way? Link to comment
Gamesnert Posted January 30, 2010 Share Posted January 30, 2010 Best bet is to use the client-side variant, yes. function getAllPlayerWeapons(player) local table = {} for i=0,13 do local weapon = getPlayerWeapon(player,i) if weapon and getPlayerTotalAmmo(player,i) ~= 0 then table[#table+1] = weapon end end return table end local myWeapons = getAllPlayerWeapons(getLocalPlayer()) Not tested, but I think this should work. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now