Print Ammotypes

I want to print the ammotypes of a server on DarkRP.
So far I have tried


concommand.Add( "ammotypes", function( ply, cmd, args )
	print(GAMEMODE.AmmoTypes)
end )

and that prints a single random “table: 0x68547f30”

I tried


concommand.Add( "ammotypes", function( ply, cmd, args )
	for k,v in pairs (GAMEMODE.AmmoTypes) do
print(k, v)
	end
end )

and that prints three of them.

What can I use instead that will print the actual contents of GAMEMODE.AmmoTypes???
Thanks for the help.

Call

game.BuildAmmoTypes to get the table

Sorry, I never received an email notifying me of a response. Thank you for the post but I’m not sure how to use this. When I try this it gives me tables again. I don’t want to get ‘ID’ of a table if that’s what that is… I want to get the actual readable contents.


print(game.BuildAmmoTypes())

returns “table: 0x1497d1f0”

PrintTable

To display table uses PrintTable


PrintTable(GAMEMODE.AmmoTypes)

or use



for k, v in pairs(GAMEMODE.AmmoTypes) do
	print(v)
end


Thank you, worked wonderfully!